Class DefaultObservation
- All Implemented Interfaces:
- Serializable,- Cloneable,- Iterable<Double>,- Collection<Double>,- List<Double>,- RandomAccess,- SequencedCollection<Double>,- Observation
A default observation is a vector of double values, representing
 an observation for machine learning tasks.
- Author:
- Matthias Thimm
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor for the `DefaultObservation` class.
- 
Method SummaryModifier and TypeMethodDescriptionlibsvm.svm_node[]Converts this observation into an array of `svm_node` objects.Methods inherited from class java.util.Vectoradd, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSizeMethods inherited from interface java.util.CollectionparallelStream, stream, toArrayMethods inherited from interface java.util.ListaddFirst, addLast, getFirst, getLast, removeFirst, removeLast, reversedMethods inherited from interface org.tweetyproject.machinelearning.Observationequals, hashCode
- 
Constructor Details- 
DefaultObservationpublic 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- 
toSvmNodepublic 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:
- toSvmNodein interface- Observation
- Returns:
- an array of `svm_node` objects representing this observation.
 
 
-