ARFF_COMMENT, ARFF_SPARSE, ARFF_SPARSE_END, ATTRIBUTE, DATA, RELATION| Constructor and Description |
|---|
MapBackedARFFModel() |
MapBackedARFFModel(Map<String,Long> words,
long wordCount,
Map<String,Map<String,Integer>> nominalMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDateFormat(Integer idx,
DateFormat format) |
void |
addLabel(String label,
Integer idx) |
void |
addNominal(String label,
String nominal,
int idx) |
void |
addType(Integer idx,
ARFFType type) |
ARFFType |
getARFFType(Integer idx) |
DateFormat |
getDateFormat(Integer idx) |
Map<Integer,DateFormat> |
getDateMap()
Map of Date formatters used
|
Map<String,Integer> |
getLabelBindings()
The vector attributes (labels in Mahout speak), unmodifiable
|
Integer |
getLabelIndex(String label) |
int |
getLabelSize() |
Map<String,Map<String,Integer>> |
getNominalMap()
Map nominals to ids.
|
Integer |
getNominalValue(String label,
String nominal) |
String |
getRelation() |
Map<Integer,ARFFType> |
getTypeMap()
The map of types encountered
|
double |
getValue(String data,
int idx)
Convert a piece of String data at a specific spot into a value
|
long |
getWordCount()
The count of the number of words seen
|
Map<String,Long> |
getWords()
Immutable map of words to the long id used for those words
|
protected double |
processDate(String data,
int idx) |
protected double |
processNominal(String label,
String data) |
protected static double |
processNumeric(String data) |
protected double |
processString(String data) |
void |
setRelation(String relation) |
public String getRelation()
getRelation in interface ARFFModelpublic void setRelation(String relation)
setRelation in interface ARFFModelpublic double getValue(String data, int idx)
protected double processString(String data)
protected static double processNumeric(String data)
protected double processDate(String data, int idx)
public Map<String,Integer> getLabelBindings()
getLabelBindings in interface ARFFModelpublic Map<Integer,DateFormat> getDateMap()
public Map<String,Map<String,Integer>> getNominalMap()
ARFFModel.addNominal(String, String, int)getNominalMap in interface ARFFModelpublic Map<String,Long> getWords()
public Integer getNominalValue(String label, String nominal)
getNominalValue in interface ARFFModelpublic void addNominal(String label, String nominal, int idx)
addNominal in interface ARFFModelpublic DateFormat getDateFormat(Integer idx)
getDateFormat in interface ARFFModelpublic void addDateFormat(Integer idx, DateFormat format)
addDateFormat in interface ARFFModelpublic Integer getLabelIndex(String label)
getLabelIndex in interface ARFFModelpublic ARFFType getARFFType(Integer idx)
getARFFType in interface ARFFModelpublic long getWordCount()
getWordCount in interface ARFFModelpublic int getLabelSize()
getLabelSize in interface ARFFModelCopyright © 2008–2013 The Apache Software Foundation. All rights reserved.