C# Class Accord.IO.SparseReader

Reader for data files containing samples in libsvm's sparse format.
Inheritance: IDisposable
Afficher le fichier Open project: accord-net/framework Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ReadDense ( ) : double>.Tuple

Reads a sample from the file and returns it as a dense vector, together with its associated output value.

ReadDense ( int count ) : double[]>.Tuple

Reads count samples from the file and returns them as a Sparse{T} sparse vector, together with their associated output values.

ReadDenseToEnd ( ) : double[]>.Tuple

Reads all samples from the file and returns them as a dense vector, together with their associated output values.

ReadLine ( ) : string>.Tuple

Reads one line from the feature file, returning the array of values for the sparse vector and its corresponding label.

ReadSparse ( ) : double>.Tuple

Reads a sample from the file and returns it as a Sparse{T} sparse vector, together with its associated output value.

ReadSparse ( int count ) : double[]>.Tuple[]

Reads count samples from the file and returns them as a Sparse{T} sparse vector, together with their associated output values.

ReadSparseToEnd ( ) : double[]>.Tuple[]

Reads all samples from the file and returns them as a Sparse{T} sparse vector, together with their associated output values.

SparseReader ( Stream stream ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( Stream stream, Encoding encoding ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( Stream stream, Encoding encoding, int sampleSize ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( Stream stream, int sampleSize ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( StreamReader reader ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( StreamReader reader, int sampleSize ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( String path, Encoding encoding ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( String path, Encoding encoding, int sampleSize ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( string path ) : Accord.Math

Initializes a new instance of the SparseReader class.

SparseReader ( string path, int sampleSize ) : Accord.Math

Initializes a new instance of the SparseReader class.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

Private Methods

Méthode Description
guessSampleSize ( ) : int

Method Details

Dispose() public méthode

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged /// resources; false to release only unmanaged resources.
Résultat void

ReadDense() public méthode

Reads a sample from the file and returns it as a dense vector, together with its associated output value.
public ReadDense ( ) : double>.Tuple
Résultat double>.Tuple

ReadDense() public méthode

Reads count samples from the file and returns them as a Sparse{T} sparse vector, together with their associated output values.
public ReadDense ( int count ) : double[]>.Tuple
count int The number of samples to read.
Résultat double[]>.Tuple

ReadDenseToEnd() public méthode

Reads all samples from the file and returns them as a dense vector, together with their associated output values.
public ReadDenseToEnd ( ) : double[]>.Tuple
Résultat double[]>.Tuple

ReadLine() public méthode

Reads one line from the feature file, returning the array of values for the sparse vector and its corresponding label.
public ReadLine ( ) : string>.Tuple
Résultat string>.Tuple

ReadSparse() public méthode

Reads a sample from the file and returns it as a Sparse{T} sparse vector, together with its associated output value.
public ReadSparse ( ) : double>.Tuple
Résultat double>.Tuple

ReadSparse() public méthode

Reads count samples from the file and returns them as a Sparse{T} sparse vector, together with their associated output values.
public ReadSparse ( int count ) : double[]>.Tuple[]
count int The number of samples to read.
Résultat double[]>.Tuple[]

ReadSparseToEnd() public méthode

Reads all samples from the file and returns them as a Sparse{T} sparse vector, together with their associated output values.
public ReadSparseToEnd ( ) : double[]>.Tuple[]
Résultat double[]>.Tuple[]

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( Stream stream ) : Accord.Math
stream Stream The file stream to be read.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( Stream stream, Encoding encoding ) : Accord.Math
stream Stream The file stream to be read.
encoding System.Text.Encoding The character encoding to use.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( Stream stream, Encoding encoding, int sampleSize ) : Accord.Math
stream Stream The file stream to be read.
encoding System.Text.Encoding The character encoding to use.
sampleSize int The size of the feature vectors stored in the file.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( Stream stream, int sampleSize ) : Accord.Math
stream Stream The file stream to be read.
sampleSize int The size of the feature vectors stored in the file.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( StreamReader reader ) : Accord.Math
reader System.IO.StreamReader A StreamReader containing the file to be read.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( StreamReader reader, int sampleSize ) : Accord.Math
reader System.IO.StreamReader A StreamReader containing the file to be read.
sampleSize int The size of the feature vectors stored in the file.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( String path, Encoding encoding ) : Accord.Math
path String The complete file path to be read.
encoding System.Text.Encoding The character encoding to use.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( String path, Encoding encoding, int sampleSize ) : Accord.Math
path String The complete file path to be read.
encoding System.Text.Encoding The character encoding to use.
sampleSize int The size of the feature vectors stored in the file.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( string path ) : Accord.Math
path string The complete file path to be read.
Résultat Accord.Math

SparseReader() public méthode

Initializes a new instance of the SparseReader class.
public SparseReader ( string path, int sampleSize ) : Accord.Math
path string The complete file path to be read.
sampleSize int The size of the feature vectors stored in the file.
Résultat Accord.Math