Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DatasetSplitter

    Utility class for creating training / test / cross validation indexes from the original index.

    Inheritance
    System.Object
    DatasetSplitter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Classification.Utils
    Assembly: Lucene.Net.Classification.dll
    Syntax
    public class DatasetSplitter

    Constructors

    | Improve this Doc View Source

    DatasetSplitter(Double, Double)

    Create a DatasetSplitter by giving test and cross validation IDXs sizes

    Declaration
    public DatasetSplitter(double testRatio, double crossValidationRatio)
    Parameters
    Type Name Description
    System.Double testRatio

    the ratio of the original index to be used for the test IDX as a System.Double between 0.0 and 1.0

    System.Double crossValidationRatio

    the ratio of the original index to be used for the c.v. IDX as a System.Double between 0.0 and 1.0

    Methods

    | Improve this Doc View Source

    Split(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
    Lucene.Net.Index.AtomicReader originalIndex

    an Lucene.Net.Index.AtomicReader on the source index

    Lucene.Net.Store.Directory trainingIndex

    a Lucene.Net.Store.Directory used to write the training index

    Lucene.Net.Store.Directory testIndex

    a Lucene.Net.Store.Directory used to write the test index

    Lucene.Net.Store.Directory crossValidationIndex

    a Lucene.Net.Store.Directory used to write the cross validation index

    Lucene.Net.Analysis.Analyzer analyzer

    Lucene.Net.Analysis.Analyzer used to create the new docs

    System.String[] fieldNames

    names of fields that need to be put in the new indexes or null if all should be used

    Exceptions
    Type Condition
    System.IO.IOException

    if any writing operation fails on any of the indexes

    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.