Example usage for org.apache.mahout.classifier.sgd AdaptiveLogisticRegression AdaptiveLogisticRegression

List of usage examples for org.apache.mahout.classifier.sgd AdaptiveLogisticRegression AdaptiveLogisticRegression

Introduction

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

Prototype

public AdaptiveLogisticRegression() 

Source Link

Usage

From source file:com.ml.ira.algos.AdaptiveLogisticModelParameters.java

License:Apache License

@Override
public void readFields(DataInput in) throws IOException {
    setTargetVariable(in.readUTF());// w  ww  . j a v  a  2  s.  c  o  m
    int typeMapSize = in.readInt();
    Map<String, String> typeMap = new HashMap<String, String>(typeMapSize);
    for (int i = 0; i < typeMapSize; i++) {
        String key = in.readUTF();
        String value = in.readUTF();
        typeMap.put(key, value);
    }
    setTypeMap(typeMap);

    setNumFeatures(in.readInt());
    setMaxTargetCategories(in.readInt());
    int targetCategoriesSize = in.readInt();
    List<String> targetCategories = Lists.newArrayListWithCapacity(targetCategoriesSize);
    for (int i = 0; i < targetCategoriesSize; i++) {
        targetCategories.add(in.readUTF());
    }
    setTargetCategories(targetCategories);

    interval = in.readInt();
    averageWindow = in.readInt();
    threads = in.readInt();
    prior = in.readUTF();
    priorOption = in.readDouble();
    auc = in.readUTF();

    alr = new AdaptiveLogisticRegression();
    alr.readFields(in);
}