List of usage examples for org.apache.mahout.classifier.sgd CsvRecordFactory CsvRecordFactory
public CsvRecordFactory(String targetName, Map<String, String> typeMap)
From source file:com.ml.ira.algos.LogisticModelParameters.java
License:Apache License
/** * Returns a CsvRecordFactory compatible with this logistic model. The reason that this is tied * in here is so that we have access to the list of target categories when it comes time to save * the model. If the input isn't CSV, then calling setTargetCategories before calling saveTo will * suffice.// w ww . j av a2s. c om * * @return The CsvRecordFactory. */ public CsvRecordFactory getCsvRecordFactory() { if (csv == null) { csv = new CsvRecordFactory(getTargetVariable(), getTypeMap()).maxTargetValue(getMaxTargetCategories()) .includeBiasTerm(useBias()); if (targetCategories != null) { csv.defineTargetCategories(targetCategories); } } return csv; }