Data for Association rules

Hi,
I want to apply an AR model to data that are not "Transactional Data" but "Single-record case data".
Is it possible to do it with Oracle Data Miner (SQL3) ?
The docs says :
"Association Rules is normally used with transactional data, but it can also be applied to single-record case data (similar to other algorithms)."
But I don't found how !
TKS

Hi,
The Association node in ODMr only takes transactional data input, BUT, you can create a AR model using 2d data using the API and then use the Model node in ODMr to pull the AR model in for viewing.
See simple script below that can be run in SQL Developer Worksheet as a script:
BEGIN
DBMS_DATA_MINING.CREATE_MODEL(
model_name => 'AR_2D_MODEL',
mining_function => dbms_data_mining.association,
data_table_name => 'mining_data_build_v',
case_id_column_name => 'cust_id');
END;
See the server api for more details on how to change the default settings for the create_model operation.
http://www.oracle.com/technetwork/database/options/odm/odm-documentation-170506.html
Thanks, Mark

Similar Messages

  • Error in Mapping of Data for Scrambling Rule due to Inconsistency detected in Mapping Engine PIFD

    Hi all,
    We are performing an HCM Data scrambling, however, in Package Setting phase, we are encountering error in mapping of data for scrambling rule, saying there are inconsistency detected in mapping Engine PIFD.
    We have already implemented and checked below SAP notes, but still no luck.
    1854557 - Missing PIFD objects or mappings after LT AddOn install.
    1665861
    - TDMS 4.0 - Collective note for Scrambling
    Please advise how to fix the issue? Project is at stand still due to this.
    OSS message already opened.
    Thanks and regards,
    Philip

    Hi
    This is bug 5195315, which looks to be fixed in a 10.2 patch. If you can pick up the latest 10.2 patch there is like 3 years of fixes worth picking up.
    Cheers
    David

  • Two Parameters for Association Rules Algorithm

    I'm working on association rules algorithm dmx.
    every sample is just on parameter. Like Product name. Then algorithm find correlation with products.
    But in my db has many products that is the same name but different supplier name. So i must to calculate and find relation by supplier name and product name. Do you have any idea or sample?

    Hello -- if you look at the "Sample Excel Data" which comes with the Excel data mining add-in, there is a table in there which shows the layout.  There would be one record per product, and then you could have multiple records per supplier.
    Or you could be saying that the transactions have multiple combinations of products and suppliers.  In that case, you can perform the analysis either on the supplier or the product.  Since the product names are same across suppliers, I would concatenate
    product and supplier together into a single field.
    Mark Tabladillo PhD (MVP, SAS Expert; MCT, MCITP, MCAD .NET) http://www.marktab.net

  • Error in dmx query for association rules to get list of products likely to be bought next

    Hello
    I have a created and train an association model with the following structure:
    SELECT PredictAssociation( [dbo].[AssociationV] , 5)
    FROM  [Association]
    PREDICTION JOIN
    (SELECT (SELECT 'Road-150 Red' AS [col1]
      UNION SELECT 'Mountain-100' AS [col2]) AS [AssociationV]) AS t
    In this specific example I’m getting this error:
    Executing the query ...
    Parser: The end of the input was reached.
    Execution complete
    Thanks in advance
    Rama

    Try this :
    http://social.technet.microsoft.com/Forums/en-US/38fde948-c7f2-4b40-8777-a283cc5f0d06/parser-the-end-of-the-input-was-reached?forum=ppsmonitoringandanalytics
    http://social.msdn.microsoft.com/Forums/en-US/64fa39b9-9c2e-4a3d-a999-c2e9d2d75f00/parser-the-end-of-the-input-was-reached-msmgdsrv

  • Association rules Java API (non-transactional data)

    Hi
    I am looking at the demo java program (dmardemo.java) for association rules.
    This iconverts the data from transactional format to non by using a nested column.
    In my case the data are already non-transactional do I have to create a nested column or the model can be build based on the original columns?
    Thank u
    Kate

    Hi Kate,
    Here is what we provide for ODM 10.2 (thanks to Kathy from our doc team in compiling this for me).
    The following are db docs provided by Oracle, with sections noted that contain more info on transformations.
    You can go to this link to view them: http://www.oracle.com/pls/db102/homepage
    Concepts - Chapter 2 (general data prep)
    Application Developer's Guide - Chapters 2 (general data prep), 5 (text transformation), and 7 (Java data prep).
    Java API Reference (javadoc)
    PL/SQL Packages and Types Reference -- DBMS_DATA_MINING_TRANSFORM. In 10.2, the source code is still available.
    Here are a few more sources:
    Sample programs (The source code and embedded comments are quite helpful)
    View this at: http://www.oracle.com/technology/products/bi/odm/index.html
    ODMr Tutorial -- Chapter 2
    View this at: http://www.oracle.com/technology/products/bi/odm/odminer.html
    There is also a book on the java api that is out.
    You can go to Amazon and check it out:
    http://www.amazon.com/Java-Data-Mining-architecture-implementation/dp/0123704529/sr=8-1/qid=1172519948/ref=pd_bbs_sr_1/105-8560904-8042036?ie=UTF8&s=books
    In ODM 11, there have been alot of improvements related to transformations, but I can say anything about that until ODM 11 is released.
    Thanks, Mark

  • Association Rule : Settings in PL/SQL

    I've developed a model in ODM GUI for association rules.
    I'm now looking to develop the same in PL/SQL.
    I need to know how to specify the case id that has 2 attributes (CUST_ID and TIME_ID) and I have the PROD_ID as the ITEM ID. I have the following settings table and PLSQL
    BEGIN
    INSERT INTO assoc_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.algo_name, dbms_data_mining.ALGO_APRIORI_ASSOCIATION_RULES);
    INSERT into assoc_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.prep_auto, dbms_data_mining.prep_auto_on);
    INSERT into assoc_sample_settings (setting_name, setting_value) VALUES
    (ODMS_ITEM_ID_COLUMN_NAME, ‘PROD_ID’);
    END;
    DBMS_DATA_MINING.CREATE_MODEL(
    model_name => 'ASSOC_MODEL_2',
    mining_function => dbms_data_mining.association,
    data_table_name => 'SH.SALES',
    case_id_column_name => ‘CUST_ID, TIME_ID’,
    target_column_name => null,
    settings_table_name => 'assoc_sample_settings');
    Is this correct? for setting the CASE ID to 'CUST_ID, TIME_ID', is this correct and/or in the correct place
    Also the setting of the PROD_ID also correct?
    Do I need to use the ODMS_ITEM_VALUE_COLUMN_NAME setting ?

    Thank you for your reply, but it is still not working. There is the code that I have used for setting up and running. What is missing or incorrect with the following. The data is from the SH.SALES table.
    Settings Table
    BEGIN
    INSERT INTO assoc_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.algo_name, dbms_data_mining.ALGO_APRIORI_ASSOCIATION_RULES);
    INSERT into assoc_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.prep_auto, dbms_data_mining.prep_auto_off);
    INSERT into assoc_sample_settings (setting_name, setting_value) VALUES
    (dbms_data_mining.ODMS_ITEM_ID_COLUMN_NAME, ‘PROD_ID’);
    COMMIT;
    END;
    Create the view
    CREATE VIEW ASSOC_DATA_V AS (
    SELECT RANK() OVER (ORDER BY CUST_ID, TIME_ID) CASE_ID, t.*
    FROM SH.SALES t );
    Create the model
    BEGIN
    DBMS_DATA_MINING.CREATE_MODEL(
    model_name => 'ASSOC_MODEL_2',
    mining_function => DBMS_DATA_MINING.ASSOCIATION,
    data_table_name => 'ASSOC_DATA_V',
    case_id_column_name => ‘CASE_ID’,
    target_column_name => null,
    settings_table_name => 'assoc_sample_settings');
    END;
    BEGIN
    ERROR at line 1:
    ORA-40104: invalid training data for model build
    ORA-06512: at "SYS.DBMS_DATA_MINING", line 1798
    ORA-06512: at line 2
    Any ideas what is causing this?

  • Problems with Association Rules

    Hi all,
    I am trying to use ODMr to run association rules and am getting the following error message:
    Server task state: error
    Server task detail:
    ORA-40101: Data Mining System Error ORA-40101: Data Mining System Error ORA-40101: Data Mining System Error ODM_ASSOCIATION_MODEL-BUILD--20010
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "DMSYS.ODM_ASSOCIATION_RULE_MODEL", line 144
    ORA-06512: at "DMSYS.ODM_ASSOCIATION_RULE_MODEL", line 1396
    ORA-00902: invalid datatype
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "DMSYS.ODM_ASSOCIATION_RULE_MODEL", line 144
    ORA-06512: at "DMSYS.ODM_ASSOCIATION_RULE_MODEL", line 1396
    ORA-06512: at "DMSYS.DBMS_DATA_MINING", line 305
    ORA-06512: at "DMSYS.DBMS_JDM_INTERNAL", line 157
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "DMSYS.DBMS_JDM_INTERNAL", line 179
    ORA-06512: at line 1
    This error is generated on the sample data as used in the ORACLE 10G Release 2 Data Mining Tutorial, and on other datasets that I tried.
    My sense is that the algorithm is expecting data in the datatype of DM_NESTED_NUMERICALS, even though the documentation asks for transactional data. When I converted to nested columns, the prog errored out again as it was expecting a number rather than nested column.??

    Hi Carolyn,
    I reviewed the tutorial and tested out the example for Association Rules. The example uses SH.SALES and SH.PRODUCTS.
    It worked fine.
    ODMr converts the "transactional" data, in the case of Association Rules, into DM_NESTED_NUMERICALS.
    When ODM documentation refers to transactional data, it implies the use of nested columns. This can be confusing given that older versions of ODM actually supported a "transactional format", which is now supported only through nested columns.
    I copied the following view definition that was passed in to ODM to build the Association Rules model (based on the tutorial noted above). Take a look at them to get a better understanding on what ODMr is doing to prepare the data.
    If you can give us a specific example including the tutorial table you used and the settings you specified in the Association Rules Wizard, I can review that to see what the problem might be.
    Thanks, Mark
    SELECT caseTable."DMR$CASE_ID", txnTable1."PROD_ID" FROM "DMUSER"."DM4J$VSALES657013432" caseTable, (SELECT "DMR$CASE_ID", CAST(COLLECT(DM_Nested_Numerical("NAME", "VALUE")) AS DM_Nested_Numericals) "PROD_ID" FROM "DMUSER"."DM4J$SALES423975876" GROUP BY "DMR$CASE_ID") txnTable1 WHERE caseTable."DMR$CASE_ID" = txnTable1."DMR$CASE_ID"
    The view makes references to other tables/views defined below:
    DM4J$VSALES657013432 is shown below:
    SELECT distinct "DMR$CASE_ID" FROM
         (SELECT "CUST_ID","TIME_ID", DENSE_RANK() OVER (ORDER BY "CUST_ID","TIME_ID") DMR$CASE_ID FROM "SH"."SALES")
    ORDER BY "DMR$CASE_ID"
    DM4J$SALES423975876 is shown below:
    SELECT DMR$CASE_ID, CAST("PROD_ID" AS VARCHAR2(30)) as NAME, 1 as VALUE
    FROM
    (SELECT "PROD_ID", "CUST_ID","TIME_ID", DENSE_RANK() OVER (ORDER BY "CUST_ID","TIME_ID") DMR$CASE_ID FROM "SH"."SALES")
    ORDER BY DMR$CASE_ID

  • 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. 

  • Association rules ( non - transactional data)

    Hi
    Is there a way to calculate association rules in a table that its not in a transactional format? In my case the data is like that:
    fid attribute1 attribute2 attribute3
    1
    2
    3
    If not is there an easy way to convert it to a transactional format?
    Thank you very much
    K

    It is possible to do it with ODM using the APIs (PL/SQL and Java). One needs to be careful as, usually, data in the format like yours are not sparse. In this case you should start with a large value for support and confidence to avoid generating too many rules and running out of system resources.
    ODMR 10.2, however, only supports association rules (AR) on transaction data. AR models built using the APIs can be viewed through ODMR.
    --Marcos                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • What is this message: Base Line Date for rule 11 not set ?

    Hello all,
    I am doing some test.
    Cenario:
    I need to create a Scheduling Agreement in transaction: VA41
    The material I am using to create the VA41, I have just created.
    I created in MM01 the views: Basic Datas 1 and 2, Sales View 1,2 and 3 and Account View 1.
    Issue:
    When I am creating the VA41 and I enter the material, the system shows the messages:
    1) Dates from:: Base line date for rule 11 not set
    2) Dates from:: Base line date for rule 9 not set
    *obs: the messages dos not block the creation of VA41. It is a information message.
    Question:
    What that means? What will happen if I do not fix that? What should I do in order to not have more these messages?
    Tks & Rgds,
    Barbara
    Message was edited by:
            Barbara Barbos

    Hi
    Please check whether you have assigned - payment terms both at company code and sales area level
    VVR

  • Wrong GL Dates for Distributions for Credit Memo with Rules

    Hi all
    Using Autoinvoice, Ive created Invoice with Invoice date 17-APR-08 and 12 month payment term. Invoice line has amount of $460 and deferred accounting rule of type "Accounting, Fixed Duration". Rule start date is 17-APR-08 and duration is 1.
    I run the Revenue Recognition and then Revenue Adjustment API "ar_revenueadjust_pub.earn_revenue" to create revenue account schedule for 12 month period based on business rules. Now I issue credit memo of $60 on 18-JUN-08 with LIFO rule method and LIFO split term method, against the above invoice line.
    I run revenue recognition, go to the credit memo distributions. All the distributions show GL Date as 17-APR-08 with correct percentages and amount as in the original invoice line.
    Can anyone help me understand why all distributions of credit memo have same gl date?

    Hi Nagamohan,
    Credit Memo is applied to invoice line with deferred rule.
    If I issue credit memo on 18-JUN-08 with LIFO against a Invoice line which uses "Daily Revenue - All Periods" rule, the distributions show
    GL Date - Dr - Cr - Amount
    17-FEB-09 REV UNEARN 0.77
    17-MAR-09 REV UNEARN 39.07
    16-MAR-09 REV UNEARN 20.16
    The above amounts are exactly the reverse distributions as in Original Invoice line.
    I was expecting the same thing to happen in Deferred Fixed rule, but the only difference is for Fixed rule I cannot populate Rule_End_Date through Autoinvoice or manually.
    Kishore.
    Message was edited by:
    chakoo

  • Sales Order VA01 - "No control data for checking group 04 and checking rule

    Dear Gurus,
    When saving a sales order in VA01, I get the following message: "No control data for checking group 04 and checking rule A"
    Can anyone explain to me what that means?
    How can I correct this error?
    Regards
    Chris

    Check this thread
    [Re: Process Order Material availability check error|Re: Process Order Material availability check error;
    thanks
    G. Lakshmipathi

  • Generate Association rules using Oracle 10 g Data Mining Tool

    Hi,
    How to Generate Association rules using Oracle 10 g Data Mining Tool ?

    As far as I remember in 10g it is pretty much the same
    http://download.oracle.com/docs/cd/B28359_01/datamine.111/b28129/market_basket.htm
    Regards,
    Husnu

  • Hiding Sensitive Association Rule for Sanitization algorithm implementation

    Hello Sir,
    I am doing my research in the area of Data Mining and my problem is hiding industrial information using Hiding Sensitive Association Rule. If anybody having Sanitization process and algorithm implementation using Java.
    If anybody having relate materials, algorithms implementation, documentation and related web address. Please send to my mail id: [email protected]
    Regard
    Kannan
    Message was edited by:
    user591845

    And your version of Oracle is?
    If 10g look into using Transparent Data Encryption (TDE). You can find docs on it at http://tahiti.oracle.com.

  • More than one conequent in an association rule possible with SQL Developer?

    Dear experts
    Is it somehow possible to show more than one element in the consequence? According to the article http://docs.oracle.com/cd/B28359_01/datamine.111/b28129/algo_apriori.htm#autoId2 it seems not to be possible:
    "Oracle Data Mining supports association rules that have one or more items in the antecedent and a single item in the consequent."
    But is it somehow possible to (mathematically?) prove that e.g. xx, yy -> zz is the same as zz -> xx, yy? Or is there any other way to show more consequent items?
    For example I have the rule a,b,c -> d, e. How can I find this rule with the limitation of a single element in the consequence?
    Any help will be apreciated!
    Thanks in advance.

    Hi,
    The Oracle AR model only has one consequent.
    You can, however, write queries to extract out rules of interest that are filtered by both antecedent and consequent items along with other metrics.
    See the GET_ASSOCIATION_RULES pl/sql api doc: http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_datmin.htm#ARPLS65840
    Here is an example of such a query:
    SELECT t.rule_id rule_id,
      t.rule_support rule_support,
      t.rule_confidence rule_confidence,
      t.rule_lift rule_lift,
      t.antecedent,
      t.consequent,
      t.number_of_items rule_length,
      t.antecedent_support rule_antecedent_support,
      t.consequent_support rule_consequent_support
    FROM TABLE(dbms_data_mining.get_association_rules('SALES62992_AS', 100, NULL, .10, .01, 5, 1, dmsys.ora_mining_varchar2_nt('RULE_CONFIDENCE DESC', 'RULE_SUPPORT DESC'), DM_ITEMS(DM_ITEM('PROD_ID','23',NULL,NULL)), DM_ITEMS(DM_ITEM('PROD_ID','25',NULL,NULL), DM_ITEM('PROD_ID','26',NULL,NULL)),.10)) t
    ORDER BY rule_idThanks, Mark

Maybe you are looking for

  • Custom metadata fields wont export

    I have created two custom metadata fields but they dont export when you export meta for excel, how can I do this?

  • Introduction of Oracle Table Partitions into PeopleSoft HRMS environment

    I would like to pose a general question and see if anyone has found any published advice / suggestions from PeopleSoft or Oracle on this. I believe that Oracle table partitioning isn't supported through the PeopleTools application designer functional

  • Number of records in an LUW

    Hi, Im new to BI. How many records can be there in an LUW?

  • Photoshop elements 11- Quick time player

    Hello form, Sorry for my English, but I hope that you can understand my big problem. My problem is, how can I install Quick Time Player in PSE 11. I have install Quick Time Player (QTP) normal on my PC, and that works. My os is Window 7. I hope someo

  • Menu bar account listing--want it to show up!

    My family of seven has seven accounts on each of our two iMacs. In five of the seven accounts, in the upper right of the menu bar, you can see the name of the account that you're on. If you click that, you get a list of all accounts and can switch ac