📄 instances.html
字号:
Deletes an attribute at the given position (0 to numAttributes() - 1).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#deleteStringAttributes()">deleteStringAttributes</A></B>()</CODE><BR> Deletes all string attributes in the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#deleteWithMissing(weka.core.Attribute)">deleteWithMissing</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att)</CODE><BR> Removes all instances with missing values for a particular attribute from the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#deleteWithMissing(int)">deleteWithMissing</A></B>(int attIndex)</CODE><BR> Removes all instances with missing values for a particular attribute from the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#deleteWithMissingClass()">deleteWithMissingClass</A></B>()</CODE><BR> Removes all instances with a missing class value from the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#enumerateAttributes()">enumerateAttributes</A></B>()</CODE><BR> Returns an enumeration of all the attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#enumerateInstances()">enumerateInstances</A></B>()</CODE><BR> Returns an enumeration of all instances in the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#equalHeaders(weka.core.Instances)">equalHeaders</A></B>(<A HREF="../../weka/core/Instances.html">Instances</A> dataset)</CODE><BR> Checks if two headers are equivalent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instance.html">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#firstInstance()">firstInstance</A></B>()</CODE><BR> Returns the first instance in the set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#getInstance(java.io.StreamTokenizer, boolean)">getInstance</A></B>(java.io.StreamTokenizer tokenizer, boolean flag)</CODE><BR> Reads a single instance using the tokenizer and appends it to the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#getInstanceFull(java.io.StreamTokenizer, boolean)">getInstanceFull</A></B>(java.io.StreamTokenizer tokenizer, boolean flag)</CODE><BR> Reads a single instance using the tokenizer and appends it to the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#getInstanceSparse(java.io.StreamTokenizer, boolean)">getInstanceSparse</A></B>(java.io.StreamTokenizer tokenizer, boolean flag)</CODE><BR> Reads a single instance using the tokenizer and appends it to the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#insertAttributeAt(weka.core.Attribute, int)">insertAttributeAt</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att, int position)</CODE><BR> Inserts an attribute at the given position (0 to numAttributes()) and sets all values to be missing.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instance.html">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#instance(int)">instance</A></B>(int index)</CODE><BR> Returns the instance at the given position.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instance.html">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#lastInstance()">lastInstance</A></B>()</CODE><BR> Returns the last instance in the set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE><BR> Main method for this class -- just prints a summary of a set of instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#meanOrMode(weka.core.Attribute)">meanOrMode</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att)</CODE><BR> Returns the mean (mode) for a numeric (nominal) attribute as a floating-point value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#meanOrMode(int)">meanOrMode</A></B>(int attIndex)</CODE><BR> Returns the mean (mode) for a numeric (nominal) attribute as a floating-point value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#mergeInstances(weka.core.Instances, weka.core.Instances)">mergeInstances</A></B>(<A HREF="../../weka/core/Instances.html">Instances</A> first, <A HREF="../../weka/core/Instances.html">Instances</A> second)</CODE><BR> Merges two sets of Instances together.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#numAttributes()">numAttributes</A></B>()</CODE><BR> Returns the number of attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#numClasses()">numClasses</A></B>()</CODE><BR> Returns the number of class labels.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#numDistinctValues(weka.core.Attribute)">numDistinctValues</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att)</CODE><BR> Returns the number of distinct values of a given attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#numDistinctValues(int)">numDistinctValues</A></B>(int attIndex)</CODE><BR> Returns the number of distinct values of a given attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#numInstances()">numInstances</A></B>()</CODE><BR> Returns the number of instances in the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#randomize(java.util.Random)">randomize</A></B>(java.util.Random random)</CODE><BR> Shuffles the instances in the set so that they are ordered randomly.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#readHeader(java.io.StreamTokenizer)">readHeader</A></B>(java.io.StreamTokenizer tokenizer)</CODE><BR> Reads and stores header of an ARFF file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#readInstance(java.io.Reader)">readInstance</A></B>(java.io.Reader reader)</CODE><BR> Reads a single instance from the reader and appends it to the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#relationName()">relationName</A></B>()</CODE><BR> Returns the relation's name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#renameAttribute(weka.core.Attribute, java.lang.String)">renameAttribute</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att, java.lang.String name)</CODE><BR> Renames an attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#renameAttribute(int, java.lang.String)">renameAttribute</A></B>(int att, java.lang.String name)</CODE><BR> Renames an attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#renameAttributeValue(weka.core.Attribute, java.lang.String, java.lang.String)">renameAttributeValue</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att, java.lang.String val, java.lang.String name)</CODE><BR> Renames the value of a nominal (or string) attribute value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#renameAttributeValue(int, int, java.lang.String)">renameAttributeValue</A></B>(int att, int val, java.lang.String name)</CODE><BR> Renames the value of a nominal (or string) attribute value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#resample(java.util.Random)">resample</A></B>(java.util.Random random)</CODE><BR> Creates a new dataset of the same size using random sampling with replacement.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#resampleWithWeights(java.util.Random)">resampleWithWeights</A></B>(java.util.Random random)</CODE><BR> Creates a new dataset of the same size using random sampling with replacement according to the current instance weights.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#resampleWithWeights(java.util.Random, double[])">resampleWithWeights</A></B>(java.util.Random random, double[] weights)</CODE><BR> Creates a new dataset of the same size using random sampling with replacement according to the given weight vector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#setClass(weka.core.Attribute)">setClass</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att)</CODE><BR> Sets the class attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#setClassIndex(int)">setClassIndex</A></B>(int classIndex)</CODE><BR> Sets the class index of the set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#setRelationName(java.lang.String)">setRelationName</A></B>(java.lang.String newName)</CODE><BR> Sets the relation's name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#sort(weka.core.Attribute)">sort</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A> att)</CODE><BR> Sorts the instances based on an attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#sort(int)">sort</A></B>(int attIndex)</CODE><BR> Sorts the instances based on an attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -