abstract class Sample[T] extends Serializable
Class that represents the features and labels of a data sample.
- T
numeric type
- Alphabetic
- By Inheritance
- Sample
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Sample()(implicit arg0: ClassTag[T])
Abstract Value Members
-
abstract
def
feature(index: Int)(implicit ev: TensorNumeric[T]): Tensor[T]
Get feature tensor for given index
Get feature tensor for given index
- index
index of specific sample
-
abstract
def
feature()(implicit ev: TensorNumeric[T]): Tensor[T]
Get feature tensor, for one feature Sample only.
Get feature tensor, for one feature Sample only. You don't need to override this, because we have add a default implement to throw exception.
- returns
feature tensor
-
abstract
def
featureLength(index: Int): Int
First dimension length of index-th feature.
First dimension length of index-th feature. This function could be used to sort samples in DataSet.
-
abstract
def
getData(): Array[T]
Get data
Get data
- returns
data
-
abstract
def
getFeatureSize(): Array[Array[Int]]
Get feature sizes
Get feature sizes
- returns
feature sizes
-
abstract
def
getLabelSize(): Array[Array[Int]]
Get label sizes
Get label sizes
- returns
label sizes
-
abstract
def
label(index: Int)(implicit ev: TensorNumeric[T]): Tensor[T]
Get label tensor for given index
Get label tensor for given index
- index
index of specific sample
-
abstract
def
label()(implicit ev: TensorNumeric[T]): Tensor[T]
Get label tensor, for one label Sample only.
Get label tensor, for one label Sample only. You don't need to override this, because we have add a default implement to throw exception.
- returns
label tensor
-
abstract
def
labelLength(index: Int): Int
First dimension length of index-th label.
First dimension length of index-th label. This function could be used to find the longest label.
-
abstract
def
numFeature(): Int
Number of tensors in feature
Number of tensors in feature
- returns
number of tensors in feature
-
abstract
def
numLabel(): Int
Number of tensors in label
Number of tensors in label
- returns
number of tensors in label
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): Sample.this.type
- returns
A deep clone
- Definition Classes
- Sample → AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
Deprecated Value Members
-
def
set(featureData: Array[T], labelData: Array[T], featureSize: Array[Int], labelSize: Array[Int])(implicit ev: TensorNumeric[T]): Sample[T]
Set data of feature and label.
Set data of feature and label.
- Annotations
- @deprecated
- Deprecated
(Since version 0.2.0) Old interface