⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instances.html

📁 < 数据挖掘--实用机器学习技术及java实现> 一书结合数据挖掘和机器学习的知识,作者陈述了自动挖掘模式的基础理论,并且以java语言实现了具有代表性的各类数据挖掘方法.例如:class
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#stratify(int)">stratify</A></B>(int&nbsp;numFolds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#stringFreeStructure()">stringFreeStructure</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#sumOfWeights()">sumOfWeights</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#test(java.lang.String[])">test</A></B>(java.lang.String[]&nbsp;argv)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method for testing this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#testCV(int, int)">testCV</A></B>(int&nbsp;numFolds,       int&nbsp;numFold)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#toSummaryString()">toSummaryString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../weka/core/Instances.html">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#trainCV(int, int)">trainCV</A></B>(int&nbsp;numFolds,        int&nbsp;numFold)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#variance(weka.core.Attribute)">variance</A></B>(<A HREF="../../weka/core/Attribute.html">Attribute</A>&nbsp;att)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the variance for a numeric attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Instances.html#variance(int)">variance</A></B>(int&nbsp;attIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes the variance for a numeric attribute.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="FILE_EXTENSION"><!-- --></A><H3>FILE_EXTENSION</H3><PRE>public static java.lang.String <B>FILE_EXTENSION</B></PRE><DL><DD>The filename extension that should be used for arff files</DL><HR><A NAME="m_RelationName"><!-- --></A><H3>m_RelationName</H3><PRE>protected java.lang.String <B>m_RelationName</B></PRE><DL><DD>The dataset's name.</DL><HR><A NAME="m_Attributes"><!-- --></A><H3>m_Attributes</H3><PRE>protected <A HREF="../../weka/core/FastVector.html">FastVector</A> <B>m_Attributes</B></PRE><DL><DD>The attribute information.</DL><HR><A NAME="m_Instances"><!-- --></A><H3>m_Instances</H3><PRE>protected <A HREF="../../weka/core/FastVector.html">FastVector</A> <B>m_Instances</B></PRE><DL><DD>The instances.</DL><HR><A NAME="m_ClassIndex"><!-- --></A><H3>m_ClassIndex</H3><PRE>protected int <B>m_ClassIndex</B></PRE><DL><DD>The class attribute's index</DL><HR><A NAME="m_ValueBuffer"><!-- --></A><H3>m_ValueBuffer</H3><PRE>protected double[] <B>m_ValueBuffer</B></PRE><DL><DD>Buffer of values for sparse instance</DL><HR><A NAME="m_IndicesBuffer"><!-- --></A><H3>m_IndicesBuffer</H3><PRE>protected int[] <B>m_IndicesBuffer</B></PRE><DL><DD>Buffer of indices for sparse instance</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Instances(java.io.Reader)"><!-- --></A><H3>Instances</H3><PRE>public <B>Instances</B>(java.io.Reader&nbsp;reader)          throws java.io.IOException</PRE><DL><DD>Reads an ARFF file from a reader, and assigns a weight of one to each instance. Lets the index of the class  attribute be undefined (negative).<DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if the ARFF file is not read  successfully</DL></DD></DL><HR><A NAME="Instances(java.io.Reader, int)"><!-- --></A><H3>Instances</H3><PRE>public <B>Instances</B>(java.io.Reader&nbsp;reader,                 int&nbsp;capacity)          throws java.io.IOException</PRE><DL><DD>Reads the header of an ARFF file from a reader and  reserves space for the given number of instances. Lets the class index be undefined (negative).<DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader<DD><CODE>capacity</CODE> - the capacity<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the header is not read successfully or the capacity is negative.<DD><CODE>java.io.IOException</CODE> - if there is a problem with the reader.</DL></DD></DL><HR><A NAME="Instances(weka.core.Instances)"><!-- --></A><H3>Instances</H3><PRE>public <B>Instances</B>(<A HREF="../../weka/core/Instances.html">Instances</A>&nbsp;dataset)</PRE><DL><DD>Constructor copying all instances and references to the header information from the given set of instances.<DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - the set to be copied</DL></DD></DL><HR><A NAME="Instances(weka.core.Instances, int)"><!-- --></A><H3>Instances</H3><PRE>public <B>Instances</B>(<A HREF="../../weka/core/Instances.html">Instances</A>&nbsp;dataset,                 int&nbsp;capacity)</PRE><DL><DD>Constructor creating an empty set of instances. Copies references to the header information from the given set of instances. Sets the capacity of the set of instances to 0 if its negative.<DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - the instances from which the header  information is to be taken<DD><CODE>capacity</CODE> - the capacity of the new dataset</DL></DD></DL><HR><A NAME="Instances(weka.core.Instances, int, int)"><!-- --></A><H3>Instances</H3><PRE>public <B>Instances</B>(<A HREF="../../weka/core/Instances.html">Instances</A>&nbsp;source,                 int&nbsp;first,                 int&nbsp;toCopy)</PRE><DL><DD>Creates a new set of instances by copying a  subset of another set.<DD><DL><DT><B>Parameters:</B><DD><CODE>source</CODE> - the set of instances from which a subset  is to be created<DD><CODE>first</CODE> - the index of the first instance to be copied<DD><CODE>toCopy</CODE> - the number of instances to be copied<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if first and toCopy are out of range</DL></DD></DL><HR><A NAME="Instances(java.lang.String, weka.core.FastVector, int)"><!-- --></A><H3>Instances</H3><PRE>public <B>Instances</B>(java.lang.String&nbsp;name,                 <A HREF="../../weka/core/FastVector.html">FastVector</A>&nbsp;attInfo,                 int&nbsp;capacity)</PRE><DL><DD>Creates an empty set of instances. Uses the given attribute information. Sets the capacity of the set of  instances to 0 if its negative. Given attribute information must not be changed after this constructor has been used.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the relation<DD><CODE>attInfo</CODE> - the attribute information<DD><CODE>capacity</CODE> - the capacity of the set</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="stringFreeStructure()"><!-- --></A><H3>stringFreeStructure</H3><PRE>public <A HREF="../../weka/core/Instances.html">Instances</A> <B>stringFreeStructure</B>()</PRE><DL><DD>Create a copy of the structure, but "cleanse" string types (i.e. doesn't contain references to the strings seen in the past).<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a copy of the instance structure.</DL></DD></DL><HR><A NAME="add(weka.core.Instance)"><!-- --></A><H3>add</H3><PRE>public final void <B>add</B>(<A HREF="../../weka/core/Instance.html">Instance</A>&nbsp;instance)</PRE><DL><DD>Adds one instance to the end of the set.  Shallow copies instance before it is added. Increases the size of the dataset if it is not large enough. Does not check if the instance is compatible with the dataset.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance to be added</DL></DD></DL><HR><A NAME="attribute(int)"><!-- --></A><H3>attribute</H3><PRE>public final <A HREF="../../weka/core/Attribute.html">Attribute</A> <B>attribute</B>(int&nbsp;index)</PRE><DL><DD>Returns an attribute.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the attribute's index<DT><B>Returns:</B><DD>the attribute at the given position</DL></DD></DL><HR><A NAME="attribute(java.lang.String)"><!-- --></A><H3>attribute</H3><PRE>public final <A HREF="../../weka/core/Attribute.html">Attribute</A> <B>attribute</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns an attribute given its name. If there is more than one attribute with the same name, it returns the first one. Returns null if the attribute can't be found.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the attribute's name<DT><B>Returns:</B><DD>the attribute with the given name, null if the attribute can't be found</DL></DD></DL><HR><A NAME="checkForStringAttributes()"><!-- --></A><H3>checkForStringAttributes</H3><PRE>public boolean <B>checkForStringAttributes</B>()</PRE><DL><DD>Checks for string attributes in the dataset<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if string attributes are present, false otherwise</DL></DD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -