No its not SimpleObjectCodec problem. I know the reason behind it. Let me explain you
When you are using GitHub algos, you can use it as an app . Instruction has been given in the readme file
If you want to use it inside MLTK by copying the algo in Toolkit, please do the following
Copy the algo file to $SPLUNK_HOME/etc/apps/Splunk_ML_Toolkit/bin/algos
Open the file and change line 64 as shown below
Change : codecs_manager.add_codec('algos_contrib.CustomDecisionTreeClassifier', 'CustomDecisionTreeClassifier', SimpleObjectCodec)
To : codecs_manager.add_codec('algos.CustomDecisionTreeClassifier', 'CustomDecisionTreeClassifier', SimpleObjectCodec)
i.e you are replacing "algos_contrib" to "algos"
-Make sure to register your algorithm under algos.conf
-restart splunk and it will work for you 🙂
Here is the syntax to use class_weight
| fit DecisionTreeClassifier class_weight="{'Yes':1,'No':0.1}"
... View more