Let's say, I've build a model (e.g. J4.8 tree) and evaluated it with cross-validation. How can I use this model to classify new dataset? I know, I can set a file with the data to classify with "Supplied test set" option, mark "Output predictions" in "More options" window and run classification again. It will produce nearly what I need, but it seems to be a very strange workflow. Also, it re-creates all the model, which can take unnecessary time. Is there more straightforward way to do classification with already built model?
相关问题
- How to conditionally scale values in Keras Lambda
- Trying to understand Pytorch's implementation
- Bulding a classification model in R studio with ke
- ParameterError: Audio buffer is not finite everywh
- Create class intervals in r and sum values
相关文章
- How to use cross_val_score with random_state
- How to measure overfitting when train and validati
- McNemar's test in Python and comparison of cla
- How to disable keras warnings?
- Invert MinMaxScaler from scikit_learn
- How should I vectorize the following list of lists
- ValueError: Unknown metric function when using cus
- keras image preprocessing unbalanced data
There couple of ways to this.
First one
You may use command line to save and load your model, -l and -d command line switches allows you to do this.
From weka docs
Second one
Also after you generate your model use second click to save and load your model. See
Third one
Also you may generate java code for your classifier. This way you save your classifier and re-use it again.Follow this steps.
These steps will output java classes for your j48 classifier. Below class WekaJ48ForIris is created by weka for use with Iris dataset.You may need to refactor it some to make it more useful.
There are special class SerializedClassifier in misc package, it takes model file as parameter and has mock training phase.