Package ai.libs.jaicore.ml.weka.dataset
Class WekaInstance
- java.lang.Object
-
- ai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance>
-
- ai.libs.jaicore.ml.weka.dataset.WekaInstance
-
- All Implemented Interfaces:
IWekaInstance,org.apache.commons.math3.ml.clustering.Clusterable,org.api4.java.ai.ml.core.dataset.IInstance,org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance,org.api4.java.common.attributedobjects.IElementDecorator<weka.core.Instance>
public class WekaInstance extends ai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance> implements IWekaInstance
-
-
Constructor Summary
Constructors Constructor Description WekaInstance(org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema schema, org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance instance)WekaInstance(weka.core.Instance instance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.Object[]getAttributes()java.lang.DoublegetAttributeValue(int pos)java.lang.NumbergetLabel()double[]getPoint()doublegetPointValue(int pos)inthashCode()voidremoveColumn(int columnPos)voidsetAttributeValue(int pos, java.lang.Object value)voidsetLabel(java.lang.Object obj)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.api4.java.ai.ml.core.dataset.IInstance
getNumAttributes, isAttributeValuePresent
-
Methods inherited from interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
isLabelPresent
-
Methods inherited from interface ai.libs.jaicore.ml.weka.dataset.IWekaInstance
getElement
-
-
-
-
Constructor Detail
-
WekaInstance
public WekaInstance(weka.core.Instance instance)
-
WekaInstance
public WekaInstance(org.api4.java.ai.ml.core.dataset.schema.ILabeledInstanceSchema schema, org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance instance) throws org.api4.java.ai.ml.core.dataset.serialization.UnsupportedAttributeTypeException- Throws:
org.api4.java.ai.ml.core.dataset.serialization.UnsupportedAttributeTypeException
-
-
Method Detail
-
getLabel
public java.lang.Number getLabel()
- Specified by:
getLabelin interfaceorg.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
-
getAttributeValue
public java.lang.Double getAttributeValue(int pos)
- Specified by:
getAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
getAttributes
public java.lang.Object[] getAttributes()
- Specified by:
getAttributesin interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
getPoint
public double[] getPoint()
- Specified by:
getPointin interfaceorg.apache.commons.math3.ml.clustering.Clusterable- Specified by:
getPointin interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
getPointValue
public double getPointValue(int pos)
- Specified by:
getPointValuein interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
removeColumn
public void removeColumn(int columnPos)
- Specified by:
removeColumnin interfaceorg.api4.java.ai.ml.core.dataset.IInstance
-
setLabel
public void setLabel(java.lang.Object obj)
- Specified by:
setLabelin interfaceorg.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
-
setAttributeValue
public void setAttributeValue(int pos, java.lang.Object value)- Specified by:
setAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.IInstance- Specified by:
setAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
-
hashCode
public int hashCode()
- Overrides:
hashCodein classai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classai.libs.jaicore.basic.sets.ElementDecorator<weka.core.Instance>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-