Class PlainTextNaiveBayesModelWriter


  • public class PlainTextNaiveBayesModelWriter
    extends NaiveBayesModelWriter
    Model writer that saves models in plain text format.
    • Constructor Detail

      • PlainTextNaiveBayesModelWriter

        public PlainTextNaiveBayesModelWriter​(AbstractModel model,
                                              File f)
                                       throws IOException
        Constructor which takes a NaiveBayesModel and a File and prepares itself to write the model to that file. Detects whether the file is gzipped or not based on whether the suffix contains ".gz".
        Parameters:
        model - The NaiveBayesModel which is to be persisted.
        f - The File in which the model is to be persisted.
        Throws:
        IOException
      • PlainTextNaiveBayesModelWriter

        public PlainTextNaiveBayesModelWriter​(AbstractModel model,
                                              BufferedWriter bw)
        Constructor which takes a NaiveBayesModel and a BufferedWriter and prepares itself to write the model to that writer.
        Parameters:
        model - The NaiveBayesModel which is to be persisted.
        bw - The BufferedWriter which will be used to persist the model.