jsat.text
Class ClassificationHashedTextDataLoader
- java.lang.Object
-
- jsat.text.HashedTextDataLoader
-
- jsat.text.ClassificationHashedTextDataLoader
-
- All Implemented Interfaces:
- java.io.Serializable, TextVectorCreator
public abstract class ClassificationHashedTextDataLoader extends HashedTextDataLoader
This class provides a framework for loading classification datasets made of text documents as hashed feature vectors. This extension usesaddOriginalDocument(java.lang.String, int)instead so that the original documents have a class label associated with them.getDataSet()then returns a classification data set, where the class label for each data point is the label provided whenaddOriginalDocumentwas called.
New vectors created withHashedTextDataLoader.newText(java.lang.String)are inherently not part of the original data set, so do not need or receive a class label.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ClassificationHashedTextDataLoader(int dimensionSize, Tokenizer tokenizer, WordWeighting weighting)Creates an new hashed text data loader for classification problems.ClassificationHashedTextDataLoader(Tokenizer tokenizer, WordWeighting weighting)Creates an new hashed text data loader for classification problems, it uses a relatively large default size of 222 for the dimension of the space.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ClassificationDataSetgetDataSet()Returns a new data set containing the original data points that were loaded with this loader.-
Methods inherited from class jsat.text.HashedTextDataLoader
getTextVectorCreator, newText, newText
-
-
-
-
Constructor Detail
-
ClassificationHashedTextDataLoader
public ClassificationHashedTextDataLoader(Tokenizer tokenizer, WordWeighting weighting)
Creates an new hashed text data loader for classification problems, it uses a relatively large default size of 222 for the dimension of the space.- Parameters:
tokenizer- the tokenization method to break up strings withweighting- the scheme to set the weights for feature vectors.
-
ClassificationHashedTextDataLoader
public ClassificationHashedTextDataLoader(int dimensionSize, Tokenizer tokenizer, WordWeighting weighting)Creates an new hashed text data loader for classification problems.- Parameters:
dimensionSize- the size of the hashed space to use.tokenizer- the tokenization method to break up strings withweighting- the scheme to set the weights for feature vectors.
-
-
Method Detail
-
getDataSet
public ClassificationDataSet getDataSet()
Description copied from class:HashedTextDataLoaderReturns a new data set containing the original data points that were loaded with this loader.- Overrides:
getDataSetin classHashedTextDataLoader- Returns:
- an appropriate data set for this loader
-
-
DataMelt 3.0 © DataMelt by jWork.ORG