Package smile.data

Interface Instance<T>

Type Parameters:
T - the type of instance.

public interface Instance<T>
An immutable instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Returns the class label of instance.
    default String
    Return the (optional) name associated with instance.
    default double
    Return the (optional) weight associated with instance.
    x()
    Returns the instance.
    default double
    y()
    Returns the response variable of instance.
  • Method Details

    • x

      T x()
      Returns the instance.
      Returns:
      the instance.
    • y

      default double y()
      Returns the response variable of instance.
      Returns:
      the response variable.
    • label

      default int label()
      Returns the class label of instance.
      Returns:
      the class label.
    • name

      default String name()
      Return the (optional) name associated with instance. Note that this is not the class label.
      Returns:
      the name of instance.
    • weight

      default double weight()
      Return the (optional) weight associated with instance.
      Returns:
      the weight of instance.