📄 attributeselection.html
字号:
</TABLE><A NAME="numberAttributesSelected()"><!-- --></A><H3>numberAttributesSelected</H3><PRE>public int <B>numberAttributesSelected</B>() throws java.lang.Exception</PRE><DL><DD>Return the number of attributes selected from the most recent run of attribute selection<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of attributes selected</DL></DD></DL><HR><A NAME="selectedAttributes()"><!-- --></A><H3>selectedAttributes</H3><PRE>public int[] <B>selectedAttributes</B>() throws java.lang.Exception</PRE><DL><DD>get the final selected set of attributes.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of attribute indexes<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if attribute selection has not been performed yet</DL></DD></DL><HR><A NAME="rankedAttributes()"><!-- --></A><H3>rankedAttributes</H3><PRE>public double[][] <B>rankedAttributes</B>() throws java.lang.Exception</PRE><DL><DD>get the final ranking of the attributes.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a two dimensional array of ranked attribute indexes and their associated merit scores as doubles.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if a ranking has not been produced</DL></DD></DL><HR><A NAME="setEvaluator(weka.attributeSelection.ASEvaluation)"><!-- --></A><H3>setEvaluator</H3><PRE>public void <B>setEvaluator</B>(<A HREF="../../weka/attributeSelection/ASEvaluation.html">ASEvaluation</A> evaluator)</PRE><DL><DD>set the attribute/subset evaluator<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>evaluator</CODE> - the evaluator to use</DL></DD></DL><HR><A NAME="setSearch(weka.attributeSelection.ASSearch)"><!-- --></A><H3>setSearch</H3><PRE>public void <B>setSearch</B>(<A HREF="../../weka/attributeSelection/ASSearch.html">ASSearch</A> search)</PRE><DL><DD>set the search method<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>search</CODE> - the search method to use</DL></DD></DL><HR><A NAME="setFolds(int)"><!-- --></A><H3>setFolds</H3><PRE>public void <B>setFolds</B>(int folds)</PRE><DL><DD>set the number of folds for cross validation<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>folds</CODE> - the number of folds</DL></DD></DL><HR><A NAME="setRanking(boolean)"><!-- --></A><H3>setRanking</H3><PRE>public void <B>setRanking</B>(boolean r)</PRE><DL><DD>produce a ranking (if possible with the set search and evaluator)<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - true if a ranking is to be produced</DL></DD></DL><HR><A NAME="setXval(boolean)"><!-- --></A><H3>setXval</H3><PRE>public void <B>setXval</B>(boolean x)</PRE><DL><DD>do a cross validation<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - true if a cross validation is to be performed</DL></DD></DL><HR><A NAME="setSeed(int)"><!-- --></A><H3>setSeed</H3><PRE>public void <B>setSeed</B>(int s)</PRE><DL><DD>set the seed for use in cross validation<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the seed</DL></DD></DL><HR><A NAME="setThreshold(double)"><!-- --></A><H3>setThreshold</H3><PRE>public void <B>setThreshold</B>(double t)</PRE><DL><DD>set the threshold by which to select features from a ranked list<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the threshold</DL></DD></DL><HR><A NAME="toResultsString()"><!-- --></A><H3>toResultsString</H3><PRE>public java.lang.String <B>toResultsString</B>()</PRE><DL><DD>get a description of the attribute selection<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a String describing the results of attribute selection</DL></DD></DL><HR><A NAME="reduceDimensionality(weka.core.Instances)"><!-- --></A><H3>reduceDimensionality</H3><PRE>public <A HREF="../../weka/core/Instances.html">Instances</A> <B>reduceDimensionality</B>(<A HREF="../../weka/core/Instances.html">Instances</A> in) throws java.lang.Exception</PRE><DL><DD>reduce the dimensionality of a set of instances to include only those attributes chosen by the last run of attribute selection.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the instances to be reduced<DT><B>Returns:</B><DD>a dimensionality reduced set of instances<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the instances can't be reduced</DL></DD></DL><HR><A NAME="reduceDimensionality(weka.core.Instance)"><!-- --></A><H3>reduceDimensionality</H3><PRE>public <A HREF="../../weka/core/Instance.html">Instance</A> <B>reduceDimensionality</B>(<A HREF="../../weka/core/Instance.html">Instance</A> in) throws java.lang.Exception</PRE><DL><DD>reduce the dimensionality of a single instance to include only those attributes chosen by the last run of attribute selection.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>in</CODE> - the instance to be reduced<DT><B>Returns:</B><DD>a dimensionality reduced instance<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the instance can't be reduced</DL></DD></DL><HR><A NAME="SelectAttributes(weka.attributeSelection.ASEvaluation, java.lang.String[])"><!-- --></A><H3>SelectAttributes</H3><PRE>public static java.lang.String <B>SelectAttributes</B>(<A HREF="../../weka/attributeSelection/ASEvaluation.html">ASEvaluation</A> ASEvaluator, java.lang.String[] options) throws java.lang.Exception</PRE><DL><DD>Perform attribute selection with a particular evaluator and a set of options specifying search method and input file etc.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ASEvaluator</CODE> - an evaluator object<DD><CODE>options</CODE> - an array of options, not only for the evaluator but also the search method (if any) and an input data file<DT><B>Returns:</B><DD>the results of attribute selection as a String<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if no training file is set</DL></DD></DL><HR><A NAME="CVResultsString()"><!-- --></A><H3>CVResultsString</H3><PRE>public java.lang.String <B>CVResultsString</B>() throws java.lang.Exception</PRE><DL><DD>returns a string summarizing the results of repeated attribute selection runs on splits of a dataset.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a summary of attribute selection results<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if no attribute selection has been performed.</DL></DD></DL><HR><A NAME="selectAttributesCVSplit(weka.core.Instances)"><!-- --></A><H3>selectAttributesCVSplit</H3><PRE>public void <B>selectAttributesCVSplit</B>(<A HREF="../../weka/core/Instances.html">Instances</A> split) throws java.lang.Exception</PRE><DL><DD>Select attributes for a split of the data. Calling this function updates the statistics on attribute selection. CVResultsString() returns a string summarizing the results of repeated calls to this function. Assumes that splits are from the same dataset--- ie. have the same number and types of attributes as previous splits.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>split</CODE> - the instances to select attributes from<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="CrossValidateAttributes()"><!-- --></A><H3>CrossValidateAttributes</H3><PRE>public java.lang.String <B>CrossValidateAttributes</B>() throws java.lang.Exception</PRE><DL><DD>Perform a cross validation for attribute selection. With subset evaluators the number of times each attribute is selected over the cross validation is reported. For attribute evaluators, the average merit and average ranking + std deviation is reported for each attribute.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the results of cross validation as a String<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs during cross validation</DL></DD></DL><HR><A NAME="SelectAttributes(weka.core.Instances)"><!-- --></A><H3>SelectAttributes</H3><PRE>public void <B>SelectAttributes</B>(<A HREF="../../weka/core/Instances.html">Instances</A> data) throws java.lang.Exception</PRE><DL><DD>Perform attribute selection on the supplied training instances.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the instances to select attributes from<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if there is a problem during selection</DL></DD></DL><HR><A NAME="SelectAttributes(weka.attributeSelection.ASEvaluation, java.lang.String[], weka.core.Instances)"><!-- --></A><H3>SelectAttributes</H3><PRE>public static java.lang.String <B>SelectAttributes</B>(<A HREF="../../weka/attributeSelection/ASEvaluation.html">ASEvaluation</A> ASEvaluator, java.lang.String[] options, <A HREF="../../weka/core/Instances.html">Instances</A> train) throws java.lang.Exception</PRE><DL><DD>Perform attribute selection with a particular evaluator and a set of options specifying search method and options for the search method and evaluator.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ASEvaluator</CODE> - an evaluator object<DD><CODE>options</CODE> - an array of options, not only for the evaluator but also the search method (if any) and an input data file<DD><CODE>outAttributes</CODE> - index 0 will contain the array of selected attribute indices<DD><CODE>train</CODE> - the input instances<DT><B>Returns:</B><DD>the results of attribute selection as a String<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if incorrect options are supplied</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)</PRE><DL><DD>Main method for testing this class.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>args</CODE> - the options</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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> </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/attributeSelection/AttributeEvaluator.html"><B>PREV CLASS</B></A> <A HREF="../../weka/attributeSelection/BestFirst.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="AttributeSelection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -