wekakt / com.github.stevenlang.wekakt.extensions / weka.core.Instance / get
operator fun Instance.get(attributeIndex: Int): Double
Get the attribute value at attributeIndex.
val iris: Instances = getIris()
val row: Instance = iris[4]
val value: Double = row[2]
attributeIndex - Attribute index
Return Value at attributeIndex
operator fun Instance.get(attribute: Attribute): Double
Get the attribute value for attribute.
val iris: Instances = getIris()
val sepalLengthAtt: Attribute = iris.attributes[0]
val row: Instance = iris[4]
val value: Double = row[sepalLengthAtt]
attribute - Attribute
Return Value for attribute