I am using weka data mining tool. In weka I am trying to use开发者_JS百科 metacost classifier to classify my data. But while executing it, there is a error popup saying "On-demand cost file doesn't exist".
Anyone know how to create on-demand cost file?
If you are using GUI, You need to create a cost matrix first. Use "use explicit cost matrix" option, create a cost matrix from "cost matrix" option. You can simply use this option to train your base classifier.
If you want cost file on demand option, save this cost file as "relation name of the training data(arff file) ".cost" file.
When you select "Load matrix on demand" in Weka GUI, provide it with a directory path on "onDemand Directory" for the path where you have saved the cost file.
Remember that your name of the cost file must be "relation name of the training data plus ".cost". Now you can train your base classifier with on-demand cost.
Edit :For more details: http://weka.sourceforge.net/doc/weka/classifiers/meta/MetaCost.html
Its similar in weka API too.
精彩评论