public class PlainTextNaiveBayesModelWriter extends NaiveBayesModelWriter
Constructor and Description |
---|
PlainTextNaiveBayesModelWriter(AbstractModel model,
BufferedWriter bw)
Constructor which takes a NaiveBayesModel and a BufferedWriter and prepares
itself to write the model to that writer.
|
PlainTextNaiveBayesModelWriter(AbstractModel model,
File f)
Constructor which takes a NaiveBayesModel and a File and prepares itself to
write the model to that file.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
writeDouble(double d) |
void |
writeInt(int i) |
void |
writeUTF(String s) |
persist
public PlainTextNaiveBayesModelWriter(AbstractModel model, File f) throws IOException
model
- The NaiveBayesModel which is to be persisted.f
- The File in which the model is to be persisted.IOException
public PlainTextNaiveBayesModelWriter(AbstractModel model, BufferedWriter bw)
model
- The NaiveBayesModel which is to be persisted.bw
- The BufferedWriter which will be used to persist the model.public void writeUTF(String s) throws IOException
writeUTF
in class AbstractModelWriter
IOException
public void writeInt(int i) throws IOException
writeInt
in class AbstractModelWriter
IOException
public void writeDouble(double d) throws IOException
writeDouble
in class AbstractModelWriter
IOException
public void close() throws IOException
close
in class AbstractModelWriter
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.