Class SimpleDataset<L>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<E>
-
- java.util.LinkedList<SimpleInstance<L>>
-
- ai.libs.jaicore.ml.core.dataset.standard.SimpleDataset<L>
-
- All Implemented Interfaces:
AILabeledAttributeArrayDataset<SimpleInstance<L>,L>,IDataset<SimpleInstance<L>>,IOrderedDataset<SimpleInstance<L>>,IOrderedLabeledAttributeArrayDataset<SimpleInstance<L>,L>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<SimpleInstance<L>>,java.util.Collection<SimpleInstance<L>>,java.util.Deque<SimpleInstance<L>>,java.util.List<SimpleInstance<L>>,java.util.Queue<SimpleInstance<L>>
public class SimpleDataset<L> extends java.util.LinkedList<SimpleInstance<L>> implements IOrderedLabeledAttributeArrayDataset<SimpleInstance<L>,L>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleDataset(InstanceSchema<L> instanceSchema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleDataset<L>createEmpty()Creates an empty copy of the same structure (and same type).booleanequals(java.lang.Object obj)java.util.List<IAttributeType<?>>getAttributeTypes()Returns the list of attribute types.intgetFrequency(SimpleInstance<L> instance)intgetNumberOfAttributes()Getter for the number of attributes (excluding target attribute).IAttributeType<L>getTargetType()Returns the attribute type of the target attribute.inthashCode()java.lang.StringprintDoubleRepresentation()java.lang.StringtoString()-
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArray
-
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll
-
-
-
-
Constructor Detail
-
SimpleDataset
public SimpleDataset(InstanceSchema<L> instanceSchema)
-
-
Method Detail
-
getTargetType
public IAttributeType<L> getTargetType()
Description copied from interface:AILabeledAttributeArrayDatasetReturns the attribute type of the target attribute.- Specified by:
getTargetTypein interfaceAILabeledAttributeArrayDataset<SimpleInstance<L>,L>- Returns:
- The attribute type of the target attribute.
-
getAttributeTypes
public java.util.List<IAttributeType<?>> getAttributeTypes()
Description copied from interface:AILabeledAttributeArrayDatasetReturns the list of attribute types.- Specified by:
getAttributeTypesin interfaceAILabeledAttributeArrayDataset<SimpleInstance<L>,L>- Returns:
- The list of attribute types.
-
getNumberOfAttributes
public int getNumberOfAttributes()
Description copied from interface:AILabeledAttributeArrayDatasetGetter for the number of attributes (excluding target attribute).- Specified by:
getNumberOfAttributesin interfaceAILabeledAttributeArrayDataset<SimpleInstance<L>,L>- Returns:
- The number of attributes.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.AbstractCollection<SimpleInstance<L>>
-
printDoubleRepresentation
public java.lang.String printDoubleRepresentation() throws ContainsNonNumericAttributesException
-
createEmpty
public SimpleDataset<L> createEmpty()
Description copied from interface:IDatasetCreates an empty copy of the same structure (and same type).- Specified by:
createEmptyin interfaceIDataset<L>- Returns:
- The newly created dataset.
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<L>- Specified by:
hashCodein interfacejava.util.List<L>- Overrides:
hashCodein classjava.util.AbstractList<SimpleInstance<L>>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Collection<L>- Specified by:
equalsin interfacejava.util.List<L>- Overrides:
equalsin classjava.util.AbstractList<SimpleInstance<L>>
-
getFrequency
public int getFrequency(SimpleInstance<L> instance)
- Specified by:
getFrequencyin interfaceIDataset<L>
-
-