问题
Im new to weka and I'm confused with the tool. What I needed to do is im having a data set about fruit price and relating attributes and im trying to predict the specific fruit price using the data set. Since I'm new to weka I couldn't figure out how to do this task. Please help me or guide me to a tutorial about how to do predictions and what is the best method or the algorithm to do this task.
Thank You.
回答1:
If you want to know more about how to save a trained classifier and load the same later on to predict, please refer the following.
With the assumption that you want to use the Weka GUI, you have to go through 2 steps as below:
First using some pre-labelled data train a classifier[use your fruit prices data]. Make sure it is in ARFF format. After training save the model to your disk. More on this can be found here: http://weka.wikispaces.com/Saving+and+loading+models
In the second step, you have use the already trained model[done in step 1]. Precisely you have to load the model file[saved in step 1] and then use the 'supplied test set" option on the "Classifiers" tab. In "supplied test set" option select the un-labelled data. More on this can be found here: http://weka.wikispaces.com/Making+predictions
I would suggest first playing around with the already provided ARFF data with your Weka install [these ARFF files basically sitting under your Weka install directory, In my case it is under: C:\Program Files\Weka-3-7\data].
Some more useful URLS:
- http://www.ibm.com/developerworks/opensource/library/os-weka1/index.html
- http://ortho.clmed.ncku.edu.tw/~emba/2006EMBA_MIS/3_16_2006/WekaIntro.pdf
Hope that helps.
来源:https://stackoverflow.com/questions/13432781/how-to-use-weka-for-predict-results