I am using OCI's machine learning feature to use association rule model for my data. I have below settings.
setting = {'ASSO_MIN_SUPPORT':'0.04', 'ASSO_MIN_CONFIDENCE':'0.1', 'ASSO_MAX_RULE_LENGTH': '2', 'ODMS_ITEM_ID_COLUMN_NAME':'PRODUCT_NAME'}
ar_mod = oml.ar(**setting) ar_mod = ar_mod.fit(SALES_TRANS_CUST, case_id = 'CUST_ID')
and i am getting below error:
oracledb.thick_impl._raise_from_info oracledb.exceptions.DatabaseError: ORA-40104: invalid training data for model build
I am trying to train a model using fit() method but its giving error.
The Oracle Machine Learning (OML) in-database algorithms check the data_length value in all_tab_columns, and if the data_length is > 4K, the column is treated as text instead of varchar. To check the data length for a column:
SQL> SELECT column_name, data_type, data_length FROM all_tab_columns WHERE table_name = 'SALES_TRANS_CUST';
Check the maximum length for the PRODUCT_NAME column. If it is less than 4K, changing the PRODUCT_NAME data type to varchar(x), where x < 4K will resolve the problem.