C# Класс Accord.IO.SparseReader

Reader for data files containing samples in libsvm's sparse format.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

Приватные методы

Метод Описание
guessSampleSize ( ) : int

Описание методов

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

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.
Результат void

ReadDense() публичный Метод

Reads a sample from the file and returns it as a dense vector, together with its associated output value.
public ReadDense ( ) : double>.Tuple
Результат double>.Tuple

ReadDense() публичный Метод

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.
Результат double[]>.Tuple

ReadDenseToEnd() публичный Метод

Reads all samples from the file and returns them as a dense vector, together with their associated output values.
public ReadDenseToEnd ( ) : double[]>.Tuple
Результат double[]>.Tuple

ReadLine() публичный Метод

Reads one line from the feature file, returning the array of values for the sparse vector and its corresponding label.
public ReadLine ( ) : string>.Tuple
Результат string>.Tuple

ReadSparse() публичный Метод

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
Результат double>.Tuple

ReadSparse() публичный Метод

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.
Результат double[]>.Tuple[]

ReadSparseToEnd() публичный Метод

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[]
Результат double[]>.Tuple[]

SparseReader() публичный Метод

Initializes a new instance of the SparseReader class.
public SparseReader ( Stream stream ) : Accord.Math
stream Stream The file stream to be read.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math

SparseReader() публичный Метод

Initializes a new instance of the SparseReader class.
public SparseReader ( string path ) : Accord.Math
path string The complete file path to be read.
Результат Accord.Math

SparseReader() публичный Метод

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.
Результат Accord.Math