Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes.

To save a model:

  • In the explorer, choose the process you want to save, do a right click on it. And Choose the option "Save Model".
  • When using the command line, there is a Weka option -dSaves classifier built from the training data into the given file. You just need to give this as argument to your classifier.

    For example:</>

    java weka.classifiers.j48.J48 -t trainingset.arff 
       -d treeclassifier.model

    Source: Weka FAQ