capabilities.html
来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 1,598 行 · 第 1/5 页
HTML
1,598 行
<PRE>public boolean <B>test</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, int fromIndex, int toIndex)</PRE><DL><DD>Tests a certain range of attributes of the given data, whether it can be processed by the handler, given its capabilities. Classifiers implementing the <code>MultiInstanceCapabilitiesHandler</code> interface are checked automatically for their multi-instance Capabilities (if no bags, then only the bag-structure, otherwise only the first bag).<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to test<DD><CODE>fromIndex</CODE> - the range of attributes - start (incl.)<DD><CODE>toIndex</CODE> - the range of attributes - end (incl.)<DT><B>Returns:</B><DD>true if all the tests succeeded<DT><B>See Also:</B><DD><A HREF="../../weka/core/MultiInstanceCapabilitiesHandler.html" title="interface in weka.core"><CODE>MultiInstanceCapabilitiesHandler</CODE></A>, <A HREF="../../weka/core/Capabilities.html#m_InstancesTest"><CODE>m_InstancesTest</CODE></A>, <A HREF="../../weka/core/Capabilities.html#m_MissingValuesTest"><CODE>m_MissingValuesTest</CODE></A>, <A HREF="../../weka/core/Capabilities.html#m_MissingClassValuesTest"><CODE>m_MissingClassValuesTest</CODE></A>, <A HREF="../../weka/core/Capabilities.html#m_MinimumNumberInstancesTest"><CODE>m_MinimumNumberInstancesTest</CODE></A></DL></DD></DL><HR><A NAME="testWithFail(weka.core.Attribute)"><!-- --></A><H3>testWithFail</H3><PRE>public void <B>testWithFail</B>(<A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> att) throws java.lang.Exception</PRE><DL><DD>tests the given attribute by calling the test(Attribute,boolean) method and throws an exception if the test fails. The method assumes that the specified attribute is not the class attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>att</CODE> - the attribute to test<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case the attribute doesn't pass the tests<DT><B>See Also:</B><DD><A HREF="../../weka/core/Capabilities.html#test(weka.core.Attribute, boolean)"><CODE>test(Attribute,boolean)</CODE></A></DL></DD></DL><HR><A NAME="testWithFail(weka.core.Attribute, boolean)"><!-- --></A><H3>testWithFail</H3><PRE>public void <B>testWithFail</B>(<A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> att, boolean isClass) throws java.lang.Exception</PRE><DL><DD>tests the given attribute by calling the test(Attribute,boolean) method and throws an exception if the test fails.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>att</CODE> - the attribute to test<DD><CODE>isClass</CODE> - whether this attribute is the class attribute<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case the attribute doesn't pass the tests<DT><B>See Also:</B><DD><A HREF="../../weka/core/Capabilities.html#test(weka.core.Attribute, boolean)"><CODE>test(Attribute,boolean)</CODE></A></DL></DD></DL><HR><A NAME="testWithFail(weka.core.Instances, int, int)"><!-- --></A><H3>testWithFail</H3><PRE>public void <B>testWithFail</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, int fromIndex, int toIndex) throws java.lang.Exception</PRE><DL><DD>tests the given data by calling the test(Instances,int,int) method and throws an exception if the test fails.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to test<DD><CODE>fromIndex</CODE> - the range of attributes - start (incl.)<DD><CODE>toIndex</CODE> - the range of attributes - end (incl.)<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case the data doesn't pass the tests<DT><B>See Also:</B><DD><A HREF="../../weka/core/Capabilities.html#test(weka.core.Instances, int, int)"><CODE>test(Instances,int,int)</CODE></A></DL></DD></DL><HR><A NAME="testWithFail(weka.core.Instances)"><!-- --></A><H3>testWithFail</H3><PRE>public void <B>testWithFail</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data) throws java.lang.Exception</PRE><DL><DD>tests the given data by calling the test(Instances) method and throws an exception if the test fails.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to test<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case the data doesn't pass the tests<DT><B>See Also:</B><DD><A HREF="../../weka/core/Capabilities.html#test(weka.core.Instances)"><CODE>test(Instances)</CODE></A></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>returns a string representation of the capabilities<P><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a string representation of this object</DL></DD></DL><HR><A NAME="toSource(java.lang.String)"><!-- --></A><H3>toSource</H3><PRE>public java.lang.String <B>toSource</B>(java.lang.String objectname)</PRE><DL><DD>turns the capabilities object into source code. The returned source code is a block that creates a Capabilities object named 'objectname' and enables all the capabilities of this Capabilities object.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>objectname</CODE> - the name of the Capabilities object being instantiated<DT><B>Returns:</B><DD>the generated source code</DL></DD></DL><HR><A NAME="toSource(java.lang.String, int)"><!-- --></A><H3>toSource</H3><PRE>public java.lang.String <B>toSource</B>(java.lang.String objectname, int indent)</PRE><DL><DD>turns the capabilities object into source code. The returned source code is a block that creates a Capabilities object named 'objectname' and enables all the capabilities of this Capabilities object.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>objectname</CODE> - the name of the Capabilities object being instantiated<DD><CODE>indent</CODE> - the number of blanks to indent<DT><B>Returns:</B><DD>the generated source code</DL></DD></DL><HR><A NAME="forInstances(weka.core.Instances)"><!-- --></A><H3>forInstances</H3><PRE>public static <A HREF="../../weka/core/Capabilities.html" title="class in weka.core">Capabilities</A> <B>forInstances</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data) throws java.lang.Exception</PRE><DL><DD>returns a Capabilities object specific for this data. The multi-instance capability is not checked as well as the minimum number of instances is not set.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to base the capabilities on<DT><B>Returns:</B><DD>a data-specific capabilities object<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case an error occurrs, e.g., an unknown attribute type</DL></DD></DL><HR><A NAME="forInstances(weka.core.Instances, boolean)"><!-- --></A><H3>forInstances</H3><PRE>public static <A HREF="../../weka/core/Capabilities.html" title="class in weka.core">Capabilities</A> <B>forInstances</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, boolean multi) throws java.lang.Exception</PRE><DL><DD>returns a Capabilities object specific for this data. The minimum number of instances is not set, the check for multi-instance data is optional.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to base the capabilities on<DD><CODE>multi</CODE> - if true then the structure is checked, too<DT><B>Returns:</B><DD>a data-specific capabilities object<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case an error occurrs, e.g., an unknown attribute type</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] args) throws java.lang.Exception</PRE><DL><DD>loads the given dataset and prints the Capabilities necessary to process it. <p/> Valid parameters: <p/> -file filename <br/> the file to load -c index the explicit index of the class attribute (default: none)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>args</CODE> - the commandline arguments<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="getRevision()"><!-- --></A><H3>getRevision</H3><PRE>public java.lang.String <B>getRevision</B>()</PRE><DL><DD>Returns the revision string.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../weka/core/RevisionHandler.html#getRevision()">getRevision</A></CODE> in interface <CODE><A HREF="../../weka/core/RevisionHandler.html" title="interface in weka.core">RevisionHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the revision</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/" target="_blank"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/core/BinarySparseInstance.html" title="class in weka.core"><B>PREV CLASS</B></A> <A HREF="../../weka/core/Capabilities.Capability.html" title="enum in weka.core"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?weka/core/Capabilities.html" target="_top"><B>FRAMES</B></A> <A HREF="Capabilities.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?