|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.labs.minion.indexer.partition.Partition
com.sun.labs.minion.indexer.partition.MemoryPartition
com.sun.labs.minion.classification.ClassifierMemoryPartition
public class ClassifierMemoryPartition
A memory partition that will hold classifier data.
| Field Summary | |
|---|---|
protected FeatureClusterer |
clustererInstance
The feature clusterer used by all classifiers in this partition |
protected static java.lang.String |
logTag
The tag for this module. |
protected ClassifierModel |
modelInstance
The model used to classify docs in this partition |
protected java.util.List |
models
A list of the models trained into this partition, so that we can dump their model specific data. |
protected int |
partClasses
The number of classes we've indexed into this partition |
static java.lang.String |
PROP_CLUSTER_MEMORY_PARTITION
|
static java.lang.String |
PROP_PART_MANAGER
|
static java.lang.String |
PROP_STOPWORDS
|
protected FeatureSelector |
selectorInstance
The feature selector used by all classifiers in this partition |
| Fields inherited from class com.sun.labs.minion.indexer.partition.MemoryPartition |
|---|
ddo, del, deleted, docDict, dockey, mainDict, name, nWords, postBytes |
| Fields inherited from class com.sun.labs.minion.indexer.partition.Partition |
|---|
DICT_OFFSETS_SIZE, docDictFactory, entryClass, entryName, indexConfig, mainDictFactory, mainDictFile, mainPostFiles, manager, maxID, nEntries, partNumber, PROP_DOC_DICT_FACTORY, PROP_INDEX_CONFIG, PROP_MAIN_DICT_FACTORY, PROP_PARTITION_MANAGER, stats |
| Constructor Summary | |
|---|---|
ClassifierMemoryPartition()
Constructs a ClassifierMemoryPartition for general use. |
|
| Method Summary | |
|---|---|
protected void |
dumpCustom(Entry[] sorted)
Dumps the data that is specific to the classifier partition. |
protected void |
endTrainingClass(int featureSize)
|
int |
getNDocs()
Gets the number of documents in this partition. |
void |
newProperties(com.sun.labs.util.props.PropertySheet ps)
|
protected void |
nextStep(Progress p,
java.lang.String str)
|
protected ClassifierModel |
selectBestModel(java.lang.String name,
java.lang.String fieldName,
java.lang.String fromField,
ResultSetImpl results,
ResultSplitter splitter,
Progress progress)
|
void |
train(java.lang.String name,
java.lang.String fieldName,
java.lang.String fromField,
ResultSetImpl results,
Progress progress)
Train a classifier. |
| Methods inherited from class com.sun.labs.minion.indexer.partition.MemoryPartition |
|---|
dump, dump, getDocumentTerm, shutdown |
| Methods inherited from class com.sun.labs.minion.indexer.partition.Partition |
|---|
compareTo, getAllFiles, getAllFiles, getDocFiles, getDocFiles, getIndexConfig, getMainFiles, getMainFiles, getManager, getName, getNumPostingsChannels, getPartitionNumber, getQueryConfig, getStats |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FeatureSelector selectorInstance
protected FeatureClusterer clustererInstance
protected ClassifierModel modelInstance
protected java.util.List models
protected static java.lang.String logTag
protected int partClasses
@ConfigComponent(type=PartitionManager.class) public static final java.lang.String PROP_PART_MANAGER
@ConfigComponent(type=ClusterMemoryPartition.class) public static final java.lang.String PROP_CLUSTER_MEMORY_PARTITION
@ConfigComponent(type=StopWords.class,
mandatory=false)
public static final java.lang.String PROP_STOPWORDS
| Constructor Detail |
|---|
public ClassifierMemoryPartition()
| Method Detail |
|---|
public int getNDocs()
Partition
getNDocs in class Partition
public void train(java.lang.String name,
java.lang.String fieldName,
java.lang.String fromField,
ResultSetImpl results,
Progress progress)
throws SearchEngineException
name - the name of the new class, or an existing classfieldName - the name of the field where classification results for this
classifier will be storedfromField - the vectored field from which features will be selected.results - the set of results to use to train the classifierprogress - where to send progress events
SearchEngineException - if there are any errors
during training
protected ClassifierModel selectBestModel(java.lang.String name,
java.lang.String fieldName,
java.lang.String fromField,
ResultSetImpl results,
ResultSplitter splitter,
Progress progress)
throws SearchEngineException
SearchEngineExceptionprotected void endTrainingClass(int featureSize)
protected void dumpCustom(Entry[] sorted)
throws java.io.IOException
dumpCustom in class MemoryPartitionsorted - a sorted listed of all main dictionary entries
java.io.IOException - if there is any error writing data.
protected void nextStep(Progress p,
java.lang.String str)
public void newProperties(com.sun.labs.util.props.PropertySheet ps)
throws com.sun.labs.util.props.PropertyException
newProperties in interface com.sun.labs.util.props.ConfigurablenewProperties in class MemoryPartitioncom.sun.labs.util.props.PropertyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||