How to use Weka for predicting results
Asked Answered
E

2

12

I'm new to Weka and I'm confused with the tool. I have a data set about fruit prices and related attributes. I'm 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 algorithm for this task.

Extensity answered 17/11, 2012 at 17:11 Comment(1)
Give us some sample of your input and the desired resultDirected
S
21

If you want to know more about saving a trained classifier and loading it later to predict, please refer to the following.

With the assumption that you want to use the Weka GUI, you have to go through these two steps:

  1. First, use some pre-labelled data to train a classifier (use your fruit prices data). Make sure the data is in ARFF format. After training, save the model to your disk. More on this can be found here: https://waikato.github.io/weka-wiki/saving_and_loading_models/

  2. In the second step, you use the already trained model (done in step 1). Specifically, you have to load the model file (saved in step 1) and then use the 'supplied test set" option on the "Classifiers" tab. In the "supplied test set" option, select the un-labelled data. More on this can be found here: https://waikato.github.io/weka-wiki/making_predictions/

I would suggest first playing around with the ARFF data files that come with your Weka install (these ARFF files are basically sitting under your Weka install directory. In my case it is under: C:\Program Files\Weka-3-7\data).

Some more useful URLs:

  1. https://developer.ibm.com/technologies/analytics/articles/os-weka1/
  2. http://ortho.clmed.ncku.edu.tw/~emba/2006EMBA_MIS/3_16_2006/WekaIntro.pdf

Hope that helps.

Studhorse answered 9/1, 2013 at 8:56 Comment(0)
D
0

I think the best step by step method for getting predictions from an existing trained model can be found here - https://machinelearningmastery.com/save-machine-learning-model-make-predictions-weka/

Defoliant answered 3/2, 2022 at 2:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.