smile.data
Class BinarySparseDataset
- java.lang.Object
-
- smile.data.Dataset<int[]>
-
- smile.data.BinarySparseDataset
-
-
Constructor Summary
Constructors Constructor and Description BinarySparseDataset()Constructor.BinarySparseDataset(int ncols)Constructor.BinarySparseDataset(java.lang.String name)Constructor.BinarySparseDataset(java.lang.String name, Attribute response)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Datum<int[]>add(Datum<int[]> datum)Add a datum item into the dataset.intget(int i, int j)Returns the value at entry (i, j) by binary search.intncols()Returns the number of columns.SparseMatrixtoSparseMatrix()Convert into Harwell-Boeing column-compressed sparse matrix format.-
Methods inherited from class smile.data.Dataset
add, add, add, add, add, data, get, getDescription, getName, iterator, labels, remove, response, responseAttribute, setDescription, setName, size, toArray, toArray, toArray, toArray, toArray, y
-
-
-
-
Constructor Detail
-
BinarySparseDataset
public BinarySparseDataset()
Constructor.
-
BinarySparseDataset
public BinarySparseDataset(java.lang.String name)
Constructor.- Parameters:
name- the name of dataset.
-
BinarySparseDataset
public BinarySparseDataset(java.lang.String name, Attribute response)Constructor.- Parameters:
name- the name of dataset.response- the attribute type of response variable.
-
BinarySparseDataset
public BinarySparseDataset(int ncols)
Constructor.- Parameters:
ncols- the number of columns in the matrix.
-
-
Method Detail
-
ncols
public int ncols()
Returns the number of columns.
-
get
public int get(int i, int j)Returns the value at entry (i, j) by binary search.- Parameters:
i- the row index.j- the column index.
-
toSparseMatrix
public SparseMatrix toSparseMatrix()
Convert into Harwell-Boeing column-compressed sparse matrix format.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG