instancesutil.html
来自「weka是机器学习和数据挖掘领域最有影响力的开源项目之一」· HTML 代码 · 共 1,072 行 · 第 1/4 页
HTML
1,072 行
<BR> Computes the minimal extension for a given instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#minimalExtension(weka.core.Instances, weka.core.Instance, double)">minimalExtension</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance, double minValue)</CODE><BR> Computes the minimal extension of a given instance, but the minimal value returned is <code> minValue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#nextOccurenceIgnoreClass(weka.core.Instances, weka.core.Instance, int)">nextOccurenceIgnoreClass</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance, int index)</CODE><BR> Find the next occurence of an instance, ignoring the class, for which the index in the dataset is at least <code> index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#nrOfRedundant(weka.core.Instances)">nrOfRedundant</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances)</CODE><BR> Counts the number of redundant pairs in the sense of OLM.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#nrOfReversedPreferences(weka.core.Instances)">nrOfReversedPreferences</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances)</CODE><BR> Gather some statistics regarding reversed preferences.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#nrStochasticReversedPreference(weka.core.Instances)">nrStochasticReversedPreference</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances)</CODE><BR> Find the number of stochastic reversed preferences in the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#numberInInterval(weka.core.Instance, weka.core.Instance)">numberInInterval</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> low, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> up)</CODE><BR> Calculatus the number of elements in the closed interval <code> [low,up].</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#numberOfGreaterVectors(weka.core.Instance)">numberOfGreaterVectors</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</CODE><BR> Calculatutes the number of vectors in the data space that are greater or equal than the given instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#numberOfSmallerVectors(weka.core.Instance)">numberOfSmallerVectors</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</CODE><BR> Calculatutes the number of vectors in the data space that are smaller or equal than the given instance.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#reversedPreference(weka.core.Instance, weka.core.Instance)">reversedPreference</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i1, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i2)</CODE><BR> Checks if two instances give rise to reversed preference.</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/classifiers/misc/monotone/InstancesUtil.html#sampleWithoutReplacement(weka.core.Instances, int, java.util.Random)">sampleWithoutReplacement</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, int size, java.util.Random random)</CODE><BR> Create, without replacement, a random subsample of the given size from the given instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#smallerOrEqual(weka.core.Instance, weka.core.Instance)">smallerOrEqual</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i1, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i2)</CODE><BR> Compares two instances in the data space, this is, ignoring the class attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#strictlySmaller(weka.core.Instance, weka.core.Instance)">strictlySmaller</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i1, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i2)</CODE><BR> Compares two instances in the data space, this is ignoring the class attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#toDataDouble(weka.core.Instance)">toDataDouble</A></B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</CODE><BR> Returns an array containing the attribute values (in internal floating point format) of the given instance in data space, this is, the class attribute (if any) is removed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/misc/monotone/InstancesUtil.html#totalLoss(weka.classifiers.Classifier, weka.core.Instances, weka.classifiers.misc.monotone.NominalLossFunction)">totalLoss</A></B>(<A HREF="../../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A> classifier, <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, <A HREF="../../../../weka/classifiers/misc/monotone/NominalLossFunction.html" title="interface in weka.classifiers.misc.monotone">NominalLossFunction</A> lossFunction)</CODE><BR> Calulates the total loss over the <code> instances </code>, using the trained <code> classifier </code> and the specified <code> lossFunction.</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/classifiers/misc/monotone/InstancesUtil.html#write(weka.core.Instances, java.io.BufferedWriter)">write</A></B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, java.io.BufferedWriter file)</CODE><BR> Write the instances in ARFF-format to the indicated <code> BufferedWriter </code>.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="InstancesUtil()"><!-- --></A><H3>InstancesUtil</H3><PRE>public <B>InstancesUtil</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="equalIgnoreClass(weka.core.Instance, weka.core.Instance)"><!-- --></A><H3>equalIgnoreClass</H3><PRE>public static boolean <B>equalIgnoreClass</B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i1, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i2)</PRE><DL><DD>Compares two instances, ignoring the class attribute (if any)<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i1</CODE> - the first instance<DD><CODE>i2</CODE> - the second instance<DT><B>Returns:</B><DD>true if both instances are equal (ignoring the class attribute), false otherwise</DL></DD></DL><HR><A NAME="containsIgnoreClass(weka.core.Instances, weka.core.Instance)"><!-- --></A><H3>containsIgnoreClass</H3><PRE>public static int <B>containsIgnoreClass</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</PRE><DL><DD>Get the index of an instance in a set of instances, where instances are compared ignoring the class attribute.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - the set of instances<DD><CODE>instance</CODE> - to instance to be found in the given set of instances<DT><B>Returns:</B><DD>the index of the first instance that equals the given instance (ignoring the class attribute), -1 if the instance was not found</DL></DD></DL><HR><A NAME="nextOccurenceIgnoreClass(weka.core.Instances, weka.core.Instance, int)"><!-- --></A><H3>nextOccurenceIgnoreClass</H3><PRE>public static int <B>nextOccurenceIgnoreClass</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance, int index)</PRE><DL><DD>Find the next occurence of an instance, ignoring the class, for which the index in the dataset is at least <code> index. </code><P><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - the set of instances to be searched<DD><CODE>instance</CODE> - the instance to be found<DD><CODE>index</CODE> - the minimum index that might be returned<DT><B>Returns:</B><DD>the index of the first instance with index at least <code> index </code> that equals the given instance (ignoring the class attribute), -1 if the instance was not found</DL></DD></DL><HR><A NAME="isHomogeneous(weka.core.Instances)"><!-- --></A><H3>isHomogeneous</H3><PRE>public static boolean <B>isHomogeneous</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances)</PRE><DL><DD>Check if all instances have the same class value.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - the instances to be checked for homogeneity<DT><B>Returns:</B><DD>true if the instances have the same class value, false otherwise</DL></DD></DL><HR><A NAME="strictlySmaller(weka.core.Instance, weka.core.Instance)"><!-- --></A><H3>strictlySmaller</H3><PRE>public static boolean <B>strictlySmaller</B>(<A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i1, <A HREF="../../../../weka/core/Instance.html" title="class in weka.core">Instance</A> i2)</PRE><DL><DD>Compares two instances in the data space, this is ignoring the class attribute. An instance is strictly smaller than another instance if the same holds for the <code> Coordinates </code> based on these instances.<P><DD><DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?