Package smile.data
Class AttributeDataset.Row
- java.lang.Object
-
- smile.data.Datum<double[]>
-
- smile.data.AttributeDataset.Row
-
- Enclosing class:
- AttributeDataset
public class AttributeDataset.Row extends Datum<double[]>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Date
date(int i)
Returns a date element.java.lang.String
label()
Returns the class label in string format.java.lang.String
string(int i)
Returns an element value in string format.java.lang.String
toString()
-
-
-
Constructor Detail
-
Row
public Row(double[] x)
Constructor.- Parameters:
x
- the datum.
-
Row
public Row(double[] x, double y)
Constructor.- Parameters:
x
- the datum.y
- the class label or real-valued response.
-
Row
public Row(double[] x, double y, double weight)
Constructor.- Parameters:
x
- the datum.y
- the class label or real-valued response.weight
- the weight of datum. The particular meaning of weight depends on applications and machine learning algorithms. Although there are on explicit requirements on the weights, in general, they should be positive.
-
-
Method Detail
-
label
public java.lang.String label()
Returns the class label in string format.
-
string
public java.lang.String string(int i)
Returns an element value in string format.- Parameters:
i
- the element index.
-
date
public java.util.Date date(int i)
Returns a date element.- Parameters:
i
- the element index.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-