📄 geneticsearch.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Wed Sep 04 10:31:48 CDT 2002 --><TITLE>: Class GeneticSearch</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/GainRatioAttributeEval.html"><B>PREV CLASS</B></A> <A HREF="../../weka/attributeSelection/GeneticSearch.GABitSet.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="GeneticSearch.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | 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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.attributeSelection</FONT><BR>Class GeneticSearch</H2><PRE>java.lang.Object | +--<A HREF="../../weka/attributeSelection/ASSearch.html">weka.attributeSelection.ASSearch</A> | +--<B>weka.attributeSelection.GeneticSearch</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../weka/core/OptionHandler.html">OptionHandler</A>, java.io.Serializable, <A HREF="../../weka/attributeSelection/StartSetHandler.html">StartSetHandler</A></DD></DL><HR><DL><DT>public class <B>GeneticSearch</B><DT>extends <A HREF="../../weka/attributeSelection/ASSearch.html">ASSearch</A><DT>implements <A HREF="../../weka/attributeSelection/StartSetHandler.html">StartSetHandler</A>, <A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></DL><P>Class for performing a genetic based search. <p> For more information see: <p> David E. Goldberg (1989). Genetic algorithms in search, optimization and machine learning. Addison-Wesley. <p> Valid options are: <p> -Z <size of the population> <br> Sets the size of the population. (default = 20). <p> -G <number of generations> <br> Sets the number of generations to perform. (default = 5). <p> -C <probability of crossover> <br> Sets the probability that crossover will occur. (default = .6). <p> -M <probability of mutation> <br> Sets the probability that a feature will be toggled on/off. <p> -R <report frequency> <br> Sets how frequently reports will be generated. Eg, setting the value to 5 will generate a report every 5th generation. <p> (default = number of generations). <p> -S <seed> <br> Sets the seed for random number generation. <p><P><DL><DT><B>See Also: </B><DD><A HREF="../../serialized-form.html#weka.attributeSelection.GeneticSearch">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><A NAME="inner_class_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Inner Class Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected class</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/attributeSelection/GeneticSearch.GABitSet.html">GeneticSearch.GABitSet</A></B></CODE><BR> </TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/attributeSelection/GeneticSearch.html#GeneticSearch()">GeneticSearch</A></B>()</CODE><BR> Constructor.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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/attributeSelection/GeneticSearch.html#crossoverProbTipText()">crossoverProbTipText</A></B>()</CODE><BR> Returns the tip text for this property</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/attributeSelection/GeneticSearch.html#getCrossoverProb()">getCrossoverProb</A></B>()</CODE><BR> get the probability of crossover</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/attributeSelection/GeneticSearch.html#getMaxGenerations()">getMaxGenerations</A></B>()</CODE><BR> get the number of generations</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/attributeSelection/GeneticSearch.html#getMutationProb()">getMutationProb</A></B>()</CODE><BR> get the probability of mutation</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/attributeSelection/GeneticSearch.html#getOptions()">getOptions</A></B>()</CODE><BR> Gets the current settings of ReliefFAttributeEval.</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/attributeSelection/GeneticSearch.html#getPopulationSize()">getPopulationSize</A></B>()</CODE><BR> get the size of the population</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/attributeSelection/GeneticSearch.html#getReportFrequency()">getReportFrequency</A></B>()</CODE><BR> get how often repports are generated</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/attributeSelection/GeneticSearch.html#getSeed()">getSeed</A></B>()</CODE><BR> get the value of the random number generator's seed</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/attributeSelection/GeneticSearch.html#getStartSet()">getStartSet</A></B>()</CODE><BR> Returns a list of attributes (and or attribute ranges) as a String</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/attributeSelection/GeneticSearch.html#globalInfo()">globalInfo</A></B>()</CODE><BR> Returns a string describing this search method</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/attributeSelection/GeneticSearch.html#listOptions()">listOptions</A></B>()</CODE><BR> Returns an enumeration describing the available options</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/attributeSelection/GeneticSearch.html#maxGenerationsTipText()">maxGenerationsTipText</A></B>()</CODE><BR> Returns the tip text for this property</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/attributeSelection/GeneticSearch.html#mutationProbTipText()">mutationProbTipText</A></B>()</CODE><BR> Returns the tip text for this property</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/attributeSelection/GeneticSearch.html#populationSizeTipText()">populationSizeTipText</A></B>()</CODE><BR> Returns the tip text for this property</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/attributeSelection/GeneticSearch.html#reportFrequencyTipText()">reportFrequencyTipText</A></B>()</CODE><BR> Returns the tip text for this property</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/attributeSelection/GeneticSearch.html#search(weka.attributeSelection.ASEvaluation, weka.core.Instances)">search</A></B>(<A HREF="../../weka/attributeSelection/ASEvaluation.html">ASEvaluation</A> ASEval, <A HREF="../../weka/core/Instances.html">Instances</A> data)</CODE><BR> Searches the attribute subset space using a genetic algorithm.</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/attributeSelection/GeneticSearch.html#seedTipText()">seedTipText</A></B>()</CODE><BR> Returns the tip text for this property</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/attributeSelection/GeneticSearch.html#setCrossoverProb(double)">setCrossoverProb</A></B>(double c)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -