Data Mining - Pattern identification T Sql

Hi All ,
I have a table that stores customer complaints on daily basis .
Example :
The table stores customer Information : Customer Name, Complaint Description , Priority .. i want to group the complaints that share the Nearly the same Complaint Description ..
CustomerName
Complaint Description 
Priority
Aroan
AMC server Down
High
James
MNC server Down
Critical
Ryun
node not responding al1232
low
Fred
node not responding 54313
Medium
Maroon 
Network down type rt:1234
High
Rish
Network Down Type rt :3828
Critical
So here even though Complaint Description for Aroan and James is not exactly same but the issue is same server down .Same for Ryun and Fred . is there a way to find the common patterns and present output somewhat like below :
Count 
Complaint Type 
2
Server Down 
2
Node Not Responding 
2
Network Down 
The Data base is OLTP one but not with frequent loads please help with an example how a query should look like for above requirement .
Thanks
Priya

There are 100 ways to answer this question, ranging from reasonably simple (my answer) to getting extremely sophisticated, but in the case of text matching like this, no matter how sophisticated you get, you'll never get a perfect answer (the closest thing
to perfect would be to force the user or help desk agent to pick from a list of complaints up front, before you get this far). 
If your scenario is as simple and predictable as your posted example, this should work fine.  For this answer, I mocked up the data via a SQL statement, but I would recommend creating a permanent table for the "Similarity List Table", that you can easily
add to (so if a new common complaint like 'I can't find the "any key"' needs to be added, you just add to the table, you don't need to modify the query). Note that this also uses "top 1" plus "order by rank" so that only one, the one that you designate
as the highest ranking will ever match.
With EXAMPLE_DATA (Name, Complaint, Severity) as (
Select 'Aroan', 'AMC server Down', 'High'
UNION ALL Select 'James', 'MNC server Down', 'Critical'
UNION ALL Select 'JRyun ', 'node not responding al1232', 'low'
UNION ALL Select 'JFred', 'node not responding 54313', 'Medium'
UNION ALL Select 'JMaroon', 'Network down type rt:1234', 'High'
UNION ALL Select 'JRish', 'Network Down Type rt :3828', 'Critical'
UNION ALL Select 'John', 'The darn network is down again rt:5646', 'High'
UNION ALL Select 'Tom', 'MNC server down, my node not responding abcd1234, and network down type jm:1234', 'Critical'
, Similarity_List_Table (rank, match_wildcard, Complaint_Category) as
Select 1, '%Server Down%', '0001 - Server Down'
UNION ALL Select 2, '%node not responding%', '0002 - Node not responding'
UNION ALL Select 3, '%network down type%', '0003 - Network down type'
Select *, Coalesce(complaint_category, Complaint) as filtrered_complain
from Example_Data
Outer Apply (Select top (1) complaint_category
from Similarity_list_table
where complaint like match_wildcard order by rank) as X
If your situation is more complex and unpredictable (which I am guessing it is), keep in mind what I said, no matter how complex you make something like this, it will still never be perfect.  Consider forcing the users up front to pick a category, and
even with that, expect an inordinate number of "Other" categories being chosen.  :-)

Similar Messages

  • Choosing the correct Excel Data Mining Addin

    My company has SQL Server 2008 (not R2) and Office 2010.  I checked the Excel Data Mining Add-in downloads on both the Microsoft site and SQLServerDataMining.com looking for this combination but cannot find it.  The DM Addin for Office 2010 are
    all SQL Server 2012 and the SQL Server 2008 version has Office 2007.  I installed the SQL Server 2008/Office 2007 add-in but it keeps getting disabled.  I get an error message stating that there are compatibility issues.  Does anyone have an
    idea on what the best add-in is to install?  There are many users in the organization and the version of SQL Server is way above my pay grade.
    Thanks,
     

    Hi ChuWil2,
    The Data Mining Add-ins for SQL Server 2008 is a free download that can be used with either Excel 2007 or Excel 2010. When you use the data mining add-ins, you can connect to an existing instance of 
    SQL Server 2008 Analysis Services and use the data mining algorithms and services provided by that server to perform data mining on the data in your Excel workbook and other supported data sources.
     To use both add-ins on the same computer, you must install the same version of both add-ins. Each version requires the corresponding version of Excel. When installing SQL Server 2008 Data Mining Add-Ins and it
    can be used together with 32-bit version of Microsoft Office 2010 . In addition, if you are running a version of Windows other than Windows 7, you will need to download and install .NET Framework 3.5 SP1. For more information, see:
    http://social.technet.microsoft.com/wiki/contents/articles/1090.how-to-use-the-sql-server-data-mining-add-ins-with-powerpivot-for-excel.aspx
    There is detail about how to troubleshoot installations of add-ins, you can review it.
    http://social.technet.microsoft.com/wiki/contents/articles/13737.troubleshooting-installations-of-powerpivot-and-other-add-ins.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Beginner installing SQL Server 2014 for Excel Data Mining

    Hello, I'm a complete beginner with servers but Im desperately trying to gain access to the SQL server for use with the data mining addin for excel.
    Could someone please help. When I try to make a connection in Excel by choosing DATA MINING> <No Connection> New> it then asks me for a Server Name in the connect to Analysis Services box. How can I find out what my Sever name is please? I have
    tried all sorts of names that I have found such as SQLEXPRESS or localhost but nothing works. It also tells me to 'Ensure that the Server is running'. Another error message I receive: No connection can be
    made because 'the target machine actively refused it'.
    I would be really grateful for some troubleshooting tips.
    Thank you

    Hi Alberto,
    Thanks very much for getting back to me.
    Here are the results of the Analysis Services report:
    Microsoft SQL Server 2014 Setup Discovery Report
    Product
    Instance
    Instance ID
    Feature
    Language
    Edition
    Version
    Clustered
    Configured
    Microsoft SQL Server 2014
    SQLEXPRESS
    MSSQL12.SQLEXPRESS
    Database Engine Services
    1033
    Express Edition
    12.0.2000.8
    No
    Yes
    Microsoft SQL Server 2014
    SQLEXPRESS
    MSSQL12.SQLEXPRESS
    SQL Server Replication
    1033
    Express Edition
    12.0.2000.8
    No
    Yes
    I then ran the System Configuration Checker and these are the results:
    Passed: 9. Failed: 1.
    Edition WOW 64 Platform    Failed
    (I can't paste the images as my account has not been verified)
    Should I assume that I have installed the wrong version? I am running 64 Bit Windows 8.
    I just need the most basic version for personal data analysis in Excel with the Data Mining Add-in. 
    Thanks again

  • SQL Developer 3.0 error message on Data mining feature

    Hello,
    I have installed the 3.0 Oracle SQL Developer and am now getting the following error when I attempt to connect to an existing database connection:
    Connection Error - Oracle XMLDB and Text Features are not installed.
    Please install the Oracle XMLDB adn Text features, or see your database administrator for assistance.
    We are on Oracle 11.2.0.1 with windows env.
    I have installed this new released SQL dev 3.0 for data mining purpose, but I am not sure whether we need a licence for this or it is free.
    Does anyone have any idea please share with me.
    Thanks for your assistance.
    Regards.

    This post can help you:
    Connection Error - Oracle XMLDB and Text Features are not installed.
    sql developer is free, not licence needed.

  • Creating Data Mining PL/SQL Package in SQL Developer

    hi,
    i have built a model and want to create a PL/SQL package.
    in SQL developer, i launch a "New Gallery", select "All Items" from the drop-down menu, and click on "Database Objects". but in the right window pane, i am not able to see "Data Mining PL/SQL Package" in the options.
    can somebody please tell me how to fix this?
    thanks!

    To verify that Oracle Data Mining PL/SQL Package extension is properly installed, please do the following:
    Select Menu Help->About, click on "Extensions" tab. Look for "Oracle Data Mining PL/SQL Package" in the Name column ( you can sort it).
    If it is, please make a note of the version installed and post it here as well as the SQL Developer version.
    Just to clarify, you don't see "Data Mining PL/SQL Package" item in the "Database Objects" at all or is it grayed out?
    Thanks

  • Association rule in SQL Server Data Mining

    I have been working on a problem on association rules in SQL Server Data Tools (Visual Studio 2008) for quite a while but have not yet been able to figure out the solution.
    The problem is: I have a table named Sales_history in my SQL database. This table has following columns: CustomerID, ItemID, Month (from May2012 to April 2013), QtyShipped. I am looking to find association between Items and i want to provide recommendation
    to the Customer (In this case CustomerID) based on their purchases.
    Note: there are around 630 customers and about 34000 products in my table. 
    My approach:
    I marked History_Table as both Key and nested. And in the Key, i checked CustomerID as input and Key whereas in nested, i checked ItemId as Key, input and Predict. 
    When i run the model, i get a solution but i am not sure if i am configuring it right. Also i am not sure how i can write prediction join query to generate Item recommendations . I am really struggling with
    this problem, eagerly waiting for the reply. Thank you.

    Hi Tatyana,
    Thank you so much for your reply. I have now been able to create the data mining model using association rule and by writing a DMX query, i am able to generate the item recommendations to be given to customers for items they have purchased. However, i have
    noticed one thing that in the DMX query, it gives the same item recommendation for any item i put inside the query. 
    Also, if i put any item in the DMX query from the generated list of recommended items, the output of that query also shows the item that is inputted inside the query.
    Here is the query, that i am writing to generate item recommendations
    SELECT predictassociation (CrossSellingModelV3.[Ztb Customer Item v3],INCLUDE_STATISTICS,5)
    FROM CrossSellingModelV3
    NATURAL PREDICTION JOIN 
    (SELECT
    (SELECT '17IS56126' as m )
    AS Ms)
    AS t
    What can be the possible reason behind this? Is this something related to the kind of data i have? In my data, there are 632 distinct customers and 34000 distinct products. 
    If i execute this query in management studio.
    select customer_CD, COUNT(Item_CD) from ztb_Sales_History
    group by customer_CD
    order by 2 desc
    the output shows that  there are some customers who have bought just 1 item and also there are customers who have bought 2400 items. i mean the range is very high. 

  • SQL Server Tutorials for beginners: OLAP / Data Mining

    I teach a DBMS + BI course to non-CS (business) students, using SQL Server. To illustrate OLAP I use the nice interactive online demo at "olaponline.radar-soft.com".
    Is there a simple tutorial for SQL Server that is similar? Prepackaged, Illustrating OLAP, BI, or Data Mining algorithms? Everything I've seen so far is too complicated and requires many preparation steps before interacting with the model/cube.
    Alternatively can you recommend other online tools / demos? Thanks,
    -- Shaul

    Hello,
    The best way to learn about data mining is the list of 22 lessons created y Daniel Calbimonte:
    http://www.sqlservercentral.com/Authors/Articles/Daniel_Calbimonte/1486684/
    About Business Intelligence, please take the following free training:
    http://www.microsoftvirtualacademy.com/training-topics/business_intelligence_topic_page_en
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Microsoft Sql server data-mining add-on for excel 2013:

    In browsing the models using excel data-mining add-on the browsing query recognized that the query times out after 60 seconds. The question is how we can increase the query time-out
    time for data-mining add-on?

    Perhaps you are meaning the timeout settings for your Analysis Server -- under Properties, General, DatabaseConnectionPoolConnectTimeout defaults to 60.   Though I doubt that browsing any model should take 60 seconds.  Try browsing the model
    from Management Studio and seeing if you also need a lot of time.
    Mark Tabladillo PhD (MVP, SAS Expert; MCT, MCITP, MCAD .NET) http://www.marktab.net

  • SQL Server Excel Add In for Data Mining: How do I retrieve the coefficients underlying the logististic regression model in excel

    I constructed a logistics regression model inside Excel using the Data Mining Add In.  I would like to see the coefficients for each input variable.  I can't seem to find this inside excel.  I tried running queries in DMX inside
    Mgt Studio but that seems to return multiple coefficients
    for each input  variable.  I am seeking
    ONE coefficient for each variable.
    Other applications I have used in the past provided the intercept and one coefficient for each input variable.  Can someone advise on how I can achieve that inside excel or Analysis Services?
    Thanks
    Rich
     

    We have this problem when we install the add-in using an Administrator's login ID.
    The problem is that the add-in automatically registers the Excel add-in. This causes a whole host of problems, including the one you describe (even when we install with the user as the admin on their own machine). Other problems include conflicts with other Add-ins (e.g. nVision) & utlities that import PDF into Excel.
    For our Citrix environment we do the following:
    · Install Essbase Add-In as Administrator
    · Replace “ntuser.dat” file in Default User profile with the “ntuser.dat” file from Administrator’s profile. (Replace C:\Documents and Settings\Default User\NTUSER.DAT with C:\Documents and Settings\Administrator\NTUSER.DAT).
    · Delete existing user profile from the system
    Once user logs back in, a new profile will be created to work with Essbase add-in.
    Note:
    1. 1. NTUSER.DAT file is a hidden file. It is only visible if show hidden file option is enabled
    2. Deleting user profile from the system remove all user customization such as shortcuts, favorites, pst file etc. as well.
    BUG NOTE: When you try to Unregister the Excel Add-in from your Start button, the shortcut points to the wrong file name. The file name should be "unRegExcelAddin.exe"
    I hope this helps.

  • Data mining is Loading after upgrade from 10.1.0.4 to 10.2.0.4

    SQL> select comp_name, version, status from dba_registry;
    COMP_NAME
    VERSION STATUS
    Oracle Ultra Search
    10.1.0.4.0 NO SCRIPT
    Oracle XML Database
    10.2.0.4.0 VALID
    Oracle Enterprise Manager
    10.2.0.4.0 VALID
    COMP_NAME
    VERSION STATUS
    Oracle Text
    10.2.0.4.0 VALID
    Oracle interMedia
    10.2.0.4.0 VALID
    Oracle Expression Filter
    10.2.0.4.0 VALID
    COMP_NAME
    VERSION STATUS
    Oracle Workspace Manager
    10.2.0.4.3 VALID
    Oracle Data Mining
    LOADING
    Oracle Database Catalog Views
    10.2.0.4.0 VALID
    COMP_NAME
    VERSION STATUS
    Oracle Database Packages and Types
    10.2.0.4.0 VALID
    JServer JAVA Virtual Machine
    10.2.0.4.0 VALID
    Oracle XDK
    10.2.0.4.0 VALID
    ** How to fix ti..
    *** I can find below error in dbua log
    ===
    dbua
    Oracle_Server.log 470085 select dbms_java.full_ncomp_enabled from dual;
    470086 select dbms_java.full_ncomp_enabled from dual
    470087 *
    470088 ERROR at line 1:
    470089 ORA-29558: JAccelerator (NCOMP) not installed. Refer to Install Guide for
    470090 instructions.
    470091 ORA-06512: at "SYS.DBMS_JAVA", line 236
    470092
    470093
    470094 Rem If Intermedia, Ultrasearch, Spatial, Data Mining upgrade,
    470095 Rem first install JAVAVM if it is not loaded
    470096
    470097 BEGIN
    470098 2 IF dbms_registry.is_loaded('JAVAVM') IS NULL AND
    470099 3 (dbms_registry.is_loaded('ORDIM') IS NOT NULL OR
    470100 4 dbms_registry.is_loaded('WK') IS NOT NULL OR
    470101 5 dbms_registry.is_loaded('SDO') IS NOT NULL OR
    470102 6 dbms_registry.is_loaded('EXF') IS NOT NULL OR
    470103 7 dbms_registry.is_loaded('ODM') IS NOT NULL) THEN
    470104 8 :dbinst_name := dbms_registry_server.JAVAVM_path || 'initjvm.sql';
    470105 9 ELSE
    470106 10 :dbinst_name := dbms_registry.nothing_script;
    470107 11 END IF;
    470108 12 END;
    470109 13 /
    470110
    470111 PL/SQL procedure successfully completed.
    470112
    470113 SELECT :dbinst_name FROM DUAL;
    470114
    *** Then I can apply 10.2.0.5 PSR ( in data mining is loading)?

    You can try de-install and install this component using the following note
    Master Note for Oracle Data Mining (Doc ID 1087643.1)

  • Mining Models used in SQL Developer 3.0 and models created PL/SQL scripts

    Hi,
    Pardon my ignorance if some of my questions are very basic. I am just gaining understanding about building/using mining models.
    I installed sql developer and went thru some OBE exercises to build models ( classification models)
    While building workflows the exercise required to supply data for the pre built models ( the four models pre-created). The question is - is this exercise is about building models or using models ?
    How those pre-built models were created? Are these models are restricted in their usage. or are they generic models that they can be applied for solving similar problems?
    What type of models can be used in workflows?
    I am also seeing some smaples of pl/sql scripts used in creating some models. Is it correect to assume they are created using PL/SQL APIs ( DBMS_DATA_MINING, DBMS_DATA_MINING_TRANSFORM etc).
    What is the differrence between these two model building process ?
    Thanks

    Hi,
    The OBE exercises show you both how to build models and then to apply (Score) new data using the built models.
    A model is always built using some form of input data, so it is built specifically with that form of data in mind.
    It is not a generic model at all.
    When you apply a model you provide data in the same format as the original data.
    In the case of a Classification or Regression model, you are applying the model to generate a prediction on new data that conforms with the build data provided to the model.
    The online help provides details on all the models that are available.
    Data Miner uses the data mining pl/sql packages (package name DBMS_DATA_MINING) to create and test models.
    There are also sql data mining prediction functions as well.
    Thanks, Mark

  • Oracle Data Mining - How to use PREDICTION function with a regression model

    I've been searching this site for Data Mining Q&A specifically related to prediction function and I wasn't able to find something useful on this topic. So I hope that posting it as a new thread will get useful answers for a beginner in oracle data mining.
    So here is my issue with prediction function:
    Given a table with 17 weeks of sales for a given product, I would like to do a forecast to predict the sales for the week 18th.
    For that let's start preparing the necessary objects and data:
    CREATE TABLE T_SALES
    PURCHASE_WEEK DATE,
    WEEK NUMBER,
    SALES NUMBER
    SET DEFINE OFF;
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('11/27/2010 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 1, 55488);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('12/04/2010 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 2, 78336);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('12/11/2010 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 3, 77248);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('12/18/2010 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 4, 106624);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('12/25/2010 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 5, 104448);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('01/01/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 6, 90304);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('01/08/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 7, 44608);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('01/15/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 8, 95744);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('01/22/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 9, 129472);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('01/29/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 10, 110976);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('02/05/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 11, 139264);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('02/12/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 12, 87040);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('02/19/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 13, 47872);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('02/26/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 14, 120768);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('03/05/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 15, 98463.65);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('03/12/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 16, 67455.84);
    Insert into T_SALES
    (PURCHASE_WEEK, WEEK, SALES)
    Values
    (TO_DATE('3/19/2011 23:59:59', 'MM/DD/YYYY HH24:MI:SS'), 17, 100095.66);
    COMMIT;
    There are a lot of linear regression models and approaches for sales forecast out on the market, however I will focus on what oracle 11g offers i.e. package SYS.DBMS_DATA_MINING to create a model using regression as mining function and then, once the model is created, to apply prediction function on the model.
    Therefore I'll have to go through few steps:
    i) normalization of data
    CREATE OR REPLACE VIEW t_sales_norm AS
    SELECT week,
    sales,
    (sales - 91423.95)/27238.3693126778 sales_norm
    FROM t_sales;
    whereas the numerical values are the mean and the standard deviation:
    select avg(sales) from t_sales;
    91423.95
    select stddev(sales) from t_sales;
    27238.3693126778
    ii) auto-correlation. For the sake of simplicity, I will safely assume that there is no auto-correlation (no repetitive pattern in sales among the weeks). Therefore to define the lag data I will consider the whole set:
    CREATE OR REPLACE VIEW t_sales_lag AS
    SELECT a.*
    FROM (SELECT week,
    sales,
    LAG(sales_norm, 1) OVER (ORDER BY week) L1,
    LAG(sales_norm, 2) OVER (ORDER BY week) L2,
    LAG(sales_norm, 3) OVER (ORDER BY week) L3,
    LAG(sales_norm, 4) OVER (ORDER BY week) L4,
    LAG(sales_norm, 5) OVER (ORDER BY week) L5,
    LAG(sales_norm, 6) OVER (ORDER BY week) L6,
    LAG(sales_norm, 7) OVER (ORDER BY week) L7,
    LAG(sales_norm, 8) OVER (ORDER BY week) L8,
    LAG(sales_norm, 9) OVER (ORDER BY week) L9,
    LAG(sales_norm, 10) OVER (ORDER BY week) L10,
    LAG(sales_norm, 11) OVER (ORDER BY week) L11,
    LAG(sales_norm, 12) OVER (ORDER BY week) L12,
    LAG(sales_norm, 13) OVER (ORDER BY week) L13,
    LAG(sales_norm, 14) OVER (ORDER BY week) L14,
    LAG(sales_norm, 15) OVER (ORDER BY week) L15,
    LAG(sales_norm, 16) OVER (ORDER BY week) L16,
    LAG(sales_norm, 17) OVER (ORDER BY week) L17
    FROM t_sales_norm) a;
    iii) choosing the training data. Again, I will choose the whole set of 17 weeks, as for this discussion in not relevant how big should be the set of training data.
    CREATE OR REPLACE VIEW t_sales_train AS
    SELECT week, sales,
    L1, L2, L3, L4, L5, L6, L7, L8, L9, L10,
    L11, L12, L13, L14, L15, L16, L17
    FROM t_sales_lag a
    WHERE week >= 1 AND week <= 17;
    iv) build the model
    -- exec SYS.DBMS_DATA_MINING.DROP_MODEL('t_SVM');
    BEGIN
    sys.DBMS_DATA_MINING.CREATE_MODEL( model_name => 't_SVM',
    mining_function => dbms_data_mining.regression,
    data_table_name => 't_sales_train',
    case_id_column_name => 'week',
    target_column_name => 'sales');
    END;
    v) finally, where I am confused is applying the prediction function against this model and making sense of the results.
    On a search on Google I found 2 ways of applying this function to my case.
    One way is the following:
    SELECT week, sales,
    PREDICTION(t_SVM USING
    LAG(sales,1) OVER (ORDER BY week) as l1,
    LAG(sales,2) OVER (ORDER BY week) as l2,
    LAG(sales,3) OVER (ORDER BY week) as l3,
    LAG(sales,4) OVER (ORDER BY week) as l4,
    LAG(sales,5) OVER (ORDER BY week) as l5,
    LAG(sales,6) OVER (ORDER BY week) as l6,
    LAG(sales,7) OVER (ORDER BY week) as l7,
    LAG(sales,8) OVER (ORDER BY week) as l8,
    LAG(sales,9) OVER (ORDER BY week) as l9,
    LAG(sales,10) OVER (ORDER BY week) as l10,
    LAG(sales,11) OVER (ORDER BY week) as l11,
    LAG(sales,12) OVER (ORDER BY week) as l12,
    LAG(sales,13) OVER (ORDER BY week) as l13,
    LAG(sales,14) OVER (ORDER BY week) as l14,
    LAG(sales,15) OVER (ORDER BY week) as l15,
    LAG(sales,16) OVER (ORDER BY week) as l16,
    LAG(sales,17) OVER (ORDER BY week) as l17
    ) pred
    FROM t_sales a;
    WEEK, SALES, PREDICTION
    1, 55488, 68861.084076412
    2, 78336, 104816.995823913
    3, 77248, 104816.995823913
    4, 106624, 104816.995823913
    As you can see for the first row there is a value of 68861.084 and for the rest of 16 values is always one and the same 104816.995.
    Question: where is my week 18 prediction ? or maybe I should say which one is it ?
    Another way of using prediction even more confusing is against the lag table:
    SELECT week, sales,
    PREDICTION(t_svm USING a.*) pred
    FROM t_sales_lag a;
    WEEK, SALES, PREDICTION
    1, 55488, 68861.084076412
    2, 78336, 75512.3642096908
    3, 77248, 85711.5003385927
    4, 106624, 98160.5009687461
    Each row out of 17, its own 'prediction' result.
    Same question: which one is my week 18th prediction ?
    Thank you very much for all help that you can provide on this matter.
    It is as always highly appreciated.
    Serge F.

    Kindly let me know how to give input to predict the values for example script to create model is as follows
    drop table data_4svm
    drop table svm_settings
    begin
    dbms_data_mining.drop_model('MODEL_SVMR1');
    CREATE TABLE data_4svm (
    id NUMBER,
    a NUMBER,
    b NUMBER
    INSERT INTO data_4svm VALUES (1,0,0);
    INSERT INTO data_4svm VALUES (2,1,1);
    INSERT INTO data_4svm VALUES (3,2,4);
    INSERT INTO data_4svm VALUES (4,3,9);
    commit;
    --setting table
    CREATE TABLE svm_settings
    setting_name VARCHAR2(30),
    setting_value VARCHAR2(30)
    --settings
    BEGIN
    INSERT INTO svm_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.algo_name, dbms_data_mining.algo_support_vector_machines);
    INSERT INTO svm_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.svms_kernel_function, dbms_data_mining.svms_linear);
    INSERT INTO svm_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.svms_active_learning, dbms_data_mining.svms_al_enable);
    COMMIT;
    END;
    --create model
    BEGIN
    DBMS_DATA_MINING.CREATE_MODEL(
    model_name => 'Model_SVMR1',
    mining_function => dbms_data_mining.regression,
    data_table_name => 'data_4svm',
    case_id_column_name => 'ID',
    target_column_name => 'B',
    settings_table_name => 'svm_settings');
    END;
    --to show the out put
    select class, attribute_name, attribute_value, coefficient
    from table(dbms_data_mining.get_model_details_svm('MODEL_SVMR1')) a, table(a.attribute_set) b
    order by abs(coefficient) desc
    -- to get predicted values (Q1)
    SELECT PREDICTION(MODEL_SVMR1 USING *
    ) pred
    FROM data_4svm a;
    Here i am not sure how to predict B values . Please suggest the proper usage . Moreover In GUI (.NET windows form ) how user can give input and system can respond using the Q1

  • Help with data mining add ins-excel 2010

    I've wasted hours of my life now trying to figure out how to establish a connection on the data mining add in on excel 2010.  I have installed and re-installed the microsoft sql server 2012 express multiple times and don't understand what it takes
    to get this to work...Do I need SQL server and why? Do I need to download the adventureworks data file and why?  (For some reason I was able to download it properly on my first sql server install, but when I went to work the data mining connection it
    said the SQL browser must be connected...What???...I thought it was connected...there are no instructions on how that is fixed...Now I have reinstalled sql 2012 but can't download adventureworks...it says it can't
    establish a connection...I am beyond the point of frustration)...I'm not a developer or know anything about code/programming, so a lot of the lingo is way over my head anyway when I am searching for troubleshooting solutions...I just want to be able to use
    this feature in excel and it is upsetting me that I can't get it to work.  I have followed step by step instructions, watched youtube videos, etc...nothing doing...If anyone can help me it would be greatly appreciated. Thanks.

    >I'm not a developer or know anything about code/programming,
    You have two choices:
    1. Hire a programmer type to assist you
    2. Become a programmer
    BOL: Data Mining Add-ins
    Instead of Express, consider purchasing SQL Server 2012 Developer Edition:
    http://www.amazon.com/SQL-Server-Developer-Edition-2012/dp/B007RFXQAM/ref=sr_1_1?s=software&ie=UTF8&qid=1397437432&sr=1-1&keywords=sql+server+2012+developer+edition
    Install it.
    Download AdventureWorks2012 and AdventureWorksDW2012 sample databases and install them.
    Desirable (but not for beginner): install Adventure Works Cube.  This is how it looks after installation:
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Collation error when data mining

    I'm trying to process a data mining model but keep getting this error: "Errors in the OLAP storage
    engine: The sort order specified for distinct count records is incorrect. Errors in the OLAP storage engine: An error occurred while processing the..."
    I changed my sql server collation to to Latin1_General_CS_AI with a compatibility level of 100, and in SSAS, I set it to Latin1_General_100 and "Case Sensitive" checked...but I still get the same error...am I not setting the collation correctly?

    I changed my sql server collation to to Latin1_General_CS_AI ...
    The SQL Server setting is just a default value for new databases, when you don't explicit define the collation in the CREATE DATABASE command; same for the database setting, also just a default value. The effective collation is defined on column level.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Oracle 9i data mining algorithm

    Does oracle 9i data mining provider decision tree and clusting algorithm?

    yes, I know that DataMining is installed, but from what I know, it should be checked before the creation of the database.
    for example I am performing the post installation steps:
    Unlock the Data Mining Accounts
    1. From a SQL*Plus session logged on as SYS, enter the following:
    alter user odm account unlock;
    alter user odm_mtr account unlock;
    Start the Oracle Data Mining Task Monitor
    1.From a SQL*Plus session, execute the following:
    connect odm/[email protected]
    exec odm_start_monitor
    this gives me an error: odb_start_monitor not defined...
    what should I do?

Maybe you are looking for

  • Application to iBooks problem: iTunes account already used for apps

    Hi, I work at a publishing company, where we have an iTunes Connect account we use to sell apps to the appstore. I'm trying to use this same account to distribute iBooks as well. So I go to the application portal at https://itunesconnect.apple.com/We

  • Transfering video to pc?

    I went to a concert last night,Scorpions,I shot a few vids and when i came home to put them on my pc everything tranfered except for the sound of each video??? Why is that?My pc says to look up a "codec' for the sound.Does anyone know which codec I s

  • POS file into IS retail

    Hi experts, A POS file with fields Header- Date, Time - ITEM- Barcode, Quantity sold, Amount received and discount is been posted in application server.Now I need to Pick up this file and use Idocs and post them into SAP ISRetail system nad need to g

  • Using CLR Integration functionality in SQL Server 2005 in CR 2008

    I have several CLR SQLProcedures in my SQL Database for performing performing complex selects with regex etc. These work exceptionally well form with Visual Strudio for retrieving a dataset. However from within Crystal Reports I can not see these sto

  • Missing Calendar icon in Spotlight

    I recently got an iPhone 6 Plus (128GB) running iOS 8.1.2, and I've noticed that in Spotlight the calendar icon appears blank. I've tried restarting several times and even resetting the phone and restoring my backup, but no luck. I even tested settin