## org.apache.mahout.classifier.sgd
Class ModelSerializer

    java.lang.Object
      org.apache.mahout.classifier.sgd.ModelSerializer

    public final class ModelSerializer

extends Object

Provides the ability to store SGD model-related objects as binary files.

Method Summary

`static

`<T extends org.apache.hadoop.io.Writable> T`

`

`readBinary(InputStream in, Class<T> clazz)`

`static void` `writeBinary(String path, AdaptiveLogisticRegression model)`
`static void` `writeBinary(String path, CrossFoldLearner model)`
`static void` `writeBinary(String path, OnlineLogisticRegression model)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### writeBinary

    public static void writeBinary(String path,
                                   CrossFoldLearner model)
                            throws IOException

  Throws:
    `IOException`

### writeBinary

    public static void writeBinary(String path,
                                   OnlineLogisticRegression model)
                            throws IOException

  Throws:
    `IOException`

### writeBinary

    public static void writeBinary(String path,
                                   AdaptiveLogisticRegression model)
                            throws IOException

  Throws:
    `IOException`

### readBinary

    public static <T extends org.apache.hadoop.io.Writable> T readBinary(InputStream in,
                                                                         Class<T> clazz)
                                                              throws IOException

  Throws:
    `IOException`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.