Class DefaultObservation

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Double>, Collection<Double>, List<Double>, RandomAccess, SequencedCollection<Double>, Observation

public class DefaultObservation extends Vector<Double> implements Observation
A default observation is a vector of double values, representing an observation for machine learning tasks.
Author:
Matthias Thimm
See Also:
  • Constructor Details

    • DefaultObservation

      public DefaultObservation()
      Default constructor for the `DefaultObservation` class.

      This constructor initializes an empty `DefaultObservation` object that can be populated with double values representing an observation.

  • Method Details

    • toSvmNode

      public libsvm.svm_node[] toSvmNode()
      Converts this observation into an array of `svm_node` objects.

      The conversion is intended for use in SVM-based machine learning algorithms. Each value in the observation is transformed into an `svm_node` where the index corresponds to the position of the value in the vector, and the value is the actual double value.

      Specified by:
      toSvmNode in interface Observation
      Returns:
      an array of `svm_node` objects representing this observation.