Class DatasetSplitter
Utility class for creating training / test / cross validation indexes from the original index.
Inheritance
Inherited Members
Namespace: Lucene.Net.Classification.Utils
Assembly: Lucene.Net.Classification.dll
Syntax
public class DatasetSplitter
Constructors
| Improve this Doc View SourceDatasetSplitter(Double, Double)
Create a Dataset
Declaration
public DatasetSplitter(double testRatio, double crossValidationRatio)
Parameters
Type | Name | Description |
---|---|---|
System. |
testRatio | the ratio of the original index to be used for the test IDX as a System. |
System. |
crossValidationRatio | the ratio of the original index to be used for the c.v. IDX as a System. |
Methods
| Improve this Doc View SourceSplit(AtomicReader, Directory, Directory, Directory, Analyzer, String[])
Split a given index into 3 indexes for training, test and cross validation tasks respectively
Declaration
public virtual void Split(AtomicReader originalIndex, Directory trainingIndex, Directory testIndex, Directory crossValidationIndex, Analyzer analyzer, params string[] fieldNames)
Parameters
Type | Name | Description |
---|---|---|
Atomic |
originalIndex | an Atomic |
Directory | trainingIndex | a Directory used to write the training index |
Directory | testIndex | a Directory used to write the test index |
Directory | crossValidationIndex | a Directory used to write the cross validation index |
Analyzer | analyzer | Analyzer used to create the new docs |
System. |
fieldNames | names of fields that need to be put in the new indexes or |
Exceptions
Type | Condition |
---|---|
System. |
if any writing operation fails on any of the indexes |