instance.html
来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 1,790 行 · 第 1/5 页
HTML
1,790 行
<HR><A NAME="attributeSparse(int)"><!-- --></A><H3>attributeSparse</H3><PRE>public <A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> <B>attributeSparse</B>(int indexOfIndex)</PRE><DL><DD>Returns the attribute with the given index. Does the same thing as attribute().<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>indexOfIndex</CODE> - the index of the attribute's index<DT><B>Returns:</B><DD>the attribute at the given position<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedDatasetException.html" title="class in weka.core">UnassignedDatasetException</A></CODE> - if instance doesn't have access to a dataset</DL></DD></DL><HR><A NAME="classAttribute()"><!-- --></A><H3>classAttribute</H3><PRE>public <A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> <B>classAttribute</B>()</PRE><DL><DD>Returns class attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the class attribute<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedDatasetException.html" title="class in weka.core">UnassignedDatasetException</A></CODE> - if the class is not set or the instance doesn't have access to a dataset</DL></DD></DL><HR><A NAME="classIndex()"><!-- --></A><H3>classIndex</H3><PRE>public int <B>classIndex</B>()</PRE><DL><DD>Returns the class attribute's index.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the class index as an integer<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedDatasetException.html" title="class in weka.core">UnassignedDatasetException</A></CODE> - if instance doesn't have access to a dataset</DL></DD></DL><HR><A NAME="classIsMissing()"><!-- --></A><H3>classIsMissing</H3><PRE>public boolean <B>classIsMissing</B>()</PRE><DL><DD>Tests if an instance's class is missing.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the instance's class is missing<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedClassException.html" title="class in weka.core">UnassignedClassException</A></CODE> - if the class is not set or the instance doesn't have access to a dataset</DL></DD></DL><HR><A NAME="classValue()"><!-- --></A><H3>classValue</H3><PRE>public double <B>classValue</B>()</PRE><DL><DD>Returns an instance's class value in internal format. (ie. as a floating-point number)<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the corresponding value as a double (If the corresponding attribute is nominal (or a string) then it returns the value's index as a double).<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedClassException.html" title="class in weka.core">UnassignedClassException</A></CODE> - if the class is not set or the instance doesn't have access to a dataset</DL></DD></DL><HR><A NAME="copy()"><!-- --></A><H3>copy</H3><PRE>public java.lang.Object <B>copy</B>()</PRE><DL><DD>Produces a shallow copy of this instance. The copy has access to the same dataset. (if you want to make a copy that doesn't have access to the dataset, use <code>new Instance(instance)</code><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../weka/core/Copyable.html#copy()">copy</A></CODE> in interface <CODE><A HREF="../../weka/core/Copyable.html" title="interface in weka.core">Copyable</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the shallow copy</DL></DD></DL><HR><A NAME="dataset()"><!-- --></A><H3>dataset</H3><PRE>public <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>dataset</B>()</PRE><DL><DD>Returns the dataset this instance has access to. (ie. obtains information about attribute types from) Null if the instance doesn't have access to a dataset.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the dataset the instance has accesss to</DL></DD></DL><HR><A NAME="deleteAttributeAt(int)"><!-- --></A><H3>deleteAttributeAt</H3><PRE>public void <B>deleteAttributeAt</B>(int position)</PRE><DL><DD>Deletes an attribute at the given position (0 to numAttributes() - 1). Only succeeds if the instance does not have access to any dataset because otherwise inconsistencies could be introduced.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - the attribute's position<DT><B>Throws:</B><DD><CODE>java.lang.RuntimeException</CODE> - if the instance has access to a dataset</DL></DD></DL><HR><A NAME="enumerateAttributes()"><!-- --></A><H3>enumerateAttributes</H3><PRE>public java.util.Enumeration <B>enumerateAttributes</B>()</PRE><DL><DD>Returns an enumeration of all the attributes.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>enumeration of all the attributes<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedDatasetException.html" title="class in weka.core">UnassignedDatasetException</A></CODE> - if the instance doesn't have access to a dataset</DL></DD></DL><HR><A NAME="equalHeaders(weka.core.Instance)"><!-- --></A><H3>equalHeaders</H3><PRE>public boolean <B>equalHeaders</B>(<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> inst)</PRE><DL><DD>Tests if the headers of two instances are equivalent.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - another instance<DT><B>Returns:</B><DD>true if the header of the given instance is equivalent to this instance's header<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedDatasetException.html" title="class in weka.core">UnassignedDatasetException</A></CODE> - if instance doesn't have access to any dataset</DL></DD></DL><HR><A NAME="hasMissingValue()"><!-- --></A><H3>hasMissingValue</H3><PRE>public boolean <B>hasMissingValue</B>()</PRE><DL><DD>Tests whether an instance has a missing value. Skips the class attribute if set.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if instance has a missing value.<DT><B>Throws:</B><DD><CODE><A HREF="../../weka/core/UnassignedDatasetException.html" title="class in weka.core">UnassignedDatasetException</A></CODE> - if instance doesn't have access to any dataset</DL></DD></DL><HR><A NAME="index(int)"><!-- --></A><H3>index</H3><PRE>public int <B>index</B>(int position)</PRE><DL><DD>Returns the index of the attribute stored at the given position. Just returns the given value.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - the position<DT><B>Returns:</B><DD>the index of the attribute stored at the given position</DL></DD></DL><HR><A NAME="insertAttributeAt(int)"><!-- --></A><H3>insertAttributeAt</H3><PRE>public void <B>insertAttributeAt</B>(int position)</PRE><DL><DD>Inserts an attribute at the given position (0 to numAttributes()). Only succeeds if the instance does not have access to any dataset because otherwise inconsistencies could be introduced.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>position</CODE> - the attribute's position<DT><B>Throws:</B><DD><CODE>java.lang.RuntimeException</CODE> - if the instance has accesss to a dataset<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the position is out of range</DL></DD></DL><HR><A NAME="isMissing(int)"><!-- --></A><H3>isMissing</H3><PRE>public boolean <B>isMissing</B>(int attIndex)</PRE><DL><DD>Tests if a specific value is "missing".<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attIndex</CODE> - the attribute's index<DT><B>Returns:</B><DD>true if the value is "missing"</DL></DD></DL><HR><A NAME="isMissingSparse(int)"><!-- --></A><H3>isMissingSparse</H3><PRE>public boolean <B>isMissingSparse</B>(int indexOfIndex)</PRE><DL><DD>Tests if a specific value is "missing". Does the same thing as isMissing() if applied to an Instance.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>indexOfIndex</CODE> - the index of the attribute's index<DT><B>Returns:</B><DD>true if the value is "missing"</DL></DD></DL><HR><A NAME="isMissing(weka.core.Attribute)"><!-- --></A><H3>isMissing</H3><PRE>public boolean <B>isMissing</B>(<A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> att)</PRE><DL><DD>Tests if a specific value is "missing". The given attribute has to belong to a dataset.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>att</CODE> - the attribute<DT><B>Returns:</B><DD>true if the value is "missing"</DL></DD></DL><HR><A NAME="isMissingValue(double)"><!-- --></A><H3>isMissingValue</H3><PRE>public static boolean <B>isMissingValue</B>(double val)</PRE><DL><DD>Tests if the given value codes "missing".<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - the value to be tested<DT><B>Returns:</B><DD>true if val codes "missing"</DL></DD></DL><HR><A NAME="mergeInstance(weka.core.Instance)"><!-- --></A><H3>mergeInstance</H3><PRE>public <A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> <B>mergeInstance</B>(<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> inst)</PRE><DL><DD>Merges this instance with the given instance and returns the result. Dataset is set to null.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - the instance to be merged with this one<DT><B>Returns:</B><DD>the merged instances</DL></DD></DL><HR><A NAME="missingValue()"><!-- --></A><H3>missingValue</H3>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?