Documentation ¶
Overview ¶
Package mat provides matrix structures and loaders for `leaves` tests. `leaves` API doesn't depend on `mat.*`
Index ¶
- type CSRMat
- type DenseMat
- func DenseMatFromArray(values []float64, rows int, cols int) (DenseMat, error)
- func DenseMatFromCsv(reader *bufio.Reader, limit int, skipFirstColumn bool, delimiter string, ...) (*DenseMat, error)
- func DenseMatFromCsvFile(filename string, limit int, skipFirstColumn bool, delimiter string, ...) (*DenseMat, error)
- func DenseMatFromLibsvm(reader *bufio.Reader, limit int, skipFirstColumn bool) (*DenseMat, error)
- func DenseMatFromLibsvmFile(filename string, limit int, skipFirstColumn bool) (*DenseMat, error)
- func DenseMatZero(rows int, cols int) DenseMat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSRMat ¶
CSRMat is Compressed Sparse Row matrix data structure
func CSRMatFromArray ¶
CSRMatFromArray converts arrays of `values` to CSRMat using shape information `rows` and `cols`. See also DenseMatFromArray to store dense data in matrix
func CSRMatFromLibsvm ¶
CSRMatFromLibsvm reads CSR (Compressed Sparse Row) matrix from libsvm format from `reader` stream. If `limit` > 0, reads only first limit `rows`. First colums is label, and usually you should set `skipFirstColumn` = true
func CSRMatFromLibsvmFile ¶
CSRMatFromLibsvmFile reads CSR (Compressed Sparse Row) matrix from libsvm file `filename`. If `limit` > 0, reads only first limit `rows`. First colums is label, and usually you should set `skipFirstColumn` = true
type DenseMat ¶
DenseMat is dense matrix data structure
func DenseMatFromArray ¶
DenseMatFromArray converts arrays of `values` to DenseMat using shape information `rows` and `cols`
func DenseMatFromCsv ¶
func DenseMatFromCsv(reader *bufio.Reader, limit int, skipFirstColumn bool, delimiter string, defValue float64, ) (*DenseMat, error)
DenseMatFromCsv reads dense matrix from csv format with `delimiter` from `reader` stream. If `limit` > 0, reads only first limit `rows`. First colums is label, and usually you should set `skipFirstColumn` = true. If value is absent `defValue` will be used instead
func DenseMatFromCsvFile ¶
func DenseMatFromCsvFile(filename string, limit int, skipFirstColumn bool, delimiter string, defValue float64, ) (*DenseMat, error)
DenseMatFromCsvFile reads dense matrix from csv file `filename` with `delimiter`. If `limit` > 0, reads only first limit `rows`. First colums is label, and usually you should set `skipFirstColumn` = true. If value is absent `defValue` will be used instead
func DenseMatFromLibsvm ¶
DenseMatFromLibsvm reads dense matrix from libsvm format from `reader` stream. If `limit` > 0, reads only first limit `rows`. First colums is label, and usually you should set `skipFirstColumn` = true
func DenseMatFromLibsvmFile ¶
DenseMatFromLibsvmFile reads dense matrix from libsvm file `filename`. If `limit` > 0, reads only first limit `rows`. First colums is label, and usually you should set `skipFirstColumn` = true
func DenseMatZero ¶
DenseMatZero return DenseMat with shape `rows` by `cols` with all zero elements