Example usage for org.apache.mahout.classifier.sgd OnlineLogisticRegression write

List of usage examples for org.apache.mahout.classifier.sgd OnlineLogisticRegression write

Introduction

In this page you can find the example usage for org.apache.mahout.classifier.sgd OnlineLogisticRegression write.

Prototype

@Override
    public void write(DataOutput out) throws IOException 

Source Link

Usage

From source file:de.isabeldrostfromm.sof.Trainer.java

License:Open Source License

@Override
public void store(OnlineLogisticRegression model) throws IOException {
    File outFile = new File("/tmp/softrainer.model");
    DataOutputStream stream = new DataOutputStream(new FileOutputStream(outFile));
    DataOutput output = stream;//  www .j a  va  2 s .  c o  m
    model.write(output);
    stream.flush();
    stream.close();
}