📄 instances.html
字号:
<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" title="class in weka.core">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" title="class in weka.core">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> java.util.Random</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#getRandomNumberGenerator(long)">getRandomNumberGenerator</A></B>(long seed)</CODE><BR> Returns a random number generator.</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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">Instances</A> first, <A HREF="../../weka/core/Instances.html" title="class in weka.core">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" title="class in weka.core">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> 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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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" title="class in weka.core">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"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#stratify(int)">stratify</A></B>(int numFolds)</CODE><BR> Stratifies a set of instances according to its class values if the class attribute is nominal (so that afterwards a stratified cross-validation can be performed).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#stringFreeStructure()">stringFreeStructure</A></B>()</CODE><BR> Create a copy of the structure, but "cleanse" string types (i.e.</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#sumOfWeights()">sumOfWeights</A></B>()</CODE><BR> Computes the sum of all the instances' weights.</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#swap(int, int)">swap</A></B>(int i, int j)</CODE><BR> Swaps two instances 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#test(java.lang.String[])">test</A></B>(java.lang.String[] argv)</CODE><BR> Method for testing this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#testCV(int, int)">testCV</A></B>(int numFolds, int numFold)</CODE><BR> Creates the test set for one fold of a cross-validation on 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#toString()">toString</A></B>()</CODE><BR> Returns the dataset as a string in ARFF format.</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#toSummaryString()">toSummaryString</A></B>()</CODE><BR> Generates a string summarizing the set of instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#trainCV(int, int)">trainCV</A></B>(int numFolds, int numFold)</CODE><BR> Creates the training set for one fold of a cross-validation on the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#trainCV(int, int, java.util.Random)">trainCV</A></B>(int numFolds, int numFold, java.util.Random random)</CODE><BR> Creates the training set for one fold of a cross-validation on the dataset.</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -