📄 rdg1.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_05) on Mon Mar 07 15:27:54 NZDT 2005 --><TITLE>RDG1</TITLE><META NAME="keywords" CONTENT="weka.datagenerators.RDG1 class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="RDG1";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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="../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><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/datagenerators/Generator.html" title="class in weka.datagenerators"><B>PREV CLASS</B></A> <A HREF="../../weka/datagenerators/Test.html" title="class in weka.datagenerators"><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="RDG1.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: NESTED | 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><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.datagenerators</FONT><BR>Class RDG1</H2><PRE>java.lang.Object <IMG SRC="../../resources/inherit.gif" ALT="extended by"><A HREF="../../weka/datagenerators/Generator.html" title="class in weka.datagenerators">weka.datagenerators.Generator</A> <IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>weka.datagenerators.RDG1</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A>, java.io.Serializable</DD></DL><HR><DL><DT>public class <B>RDG1</B><DT>extends <A HREF="../../weka/datagenerators/Generator.html" title="class in weka.datagenerators">Generator</A><DT>implements <A HREF="../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A>, java.io.Serializable</DL><P>Class to generate data randomly by producing a decision list. The decision list consists of rules. Instances are generated randomly one by one. If decision list fails to classify the current instance, a new rule according to this current instance is generated and added to the decision list.<p> The option -V switches on voting, which means that at the end of the generation all instances are reclassified to the class value that is supported by the most rules.<p> This data generator can generate 'boolean' attributes (= nominal with the values {true, false}) and numeric attributes. The rules can be 'A' or 'NOT A' for boolean values and 'B < random_value' or 'B >= random_value' for numeric values.<p> Valid options are:<p> -R num <br> The maximum number of attributes chosen to form a rule (default 10).<p> -M num <br> The minimum number of attributes chosen to form a rule (default 1).<p> -I num <br> The number of irrelevant attributes (default 0).<p> -N num <br> The number of numeric attributes (default 0).<p> -S seed <br> Random number seed for random function used (default 1). <p> -V <br> Flag to use voting. <p> Following an example of a generated dataset: <br> %<br> % weka.datagenerators.RDG1 -r expl -a 2 -c 3 -n 4 -N 1 -I 0 -M 2 -R 10 -S 2<br> %<br> relation expl<br><br> attribute a0 {false,true}<br> attribute a1 numeric<br> attribute class {c0,c1,c2}<br><br> data<br><br> true,0.496823,c0<br> false,0.743158,c1<br> false,0.408285,c1<br> false,0.993687,c2<br> %<br> % Number of attributes chosen as irrelevant = 0<br> %<br> % DECISIONLIST (number of rules = 3):<br> % RULE 0: c0 := a1 < 0.986, a0<br> % RULE 1: c1 := a1 < 0.95, not(a0)<br> % RULE 2: c2 := not(a0), a1 >= 0.562<br><p><P><P><DL><DT><B>Version:</B></DT> <DD>$Revision: 1.2.2.1 $</DD><DT><B>Author:</B></DT> <DD>Gabi Schmidberger (gabi@cs.waikato.ac.nz)</DD><DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#weka.datagenerators.RDG1">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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/datagenerators/RDG1.html#RDG1()">RDG1</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#defineDataFormat()">defineDataFormat</A></B>()</CODE><BR> Initializes the format for the dataset produced.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#generateExample()">generateExample</A></B>()</CODE><BR> Generate an example of the dataset dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#generateExamples()">generateExamples</A></B>()</CODE><BR> Generate all examples of the dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#generateExamples(int, java.util.Random, weka.core.Instances)">generateExamples</A></B>(int num, java.util.Random random, <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> format)</CODE><BR> Generate all examples of the dataset.</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/datagenerators/RDG1.html#generateFinished()">generateFinished</A></B>()</CODE><BR> Compiles documentation about the data generation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#getAttList_Irr()">getAttList_Irr</A></B>()</CODE><BR> Gets the array that defines which of the attributes are seen to be irrelevant.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#getDatasetFormat()">getDatasetFormat</A></B>()</CODE><BR> Gets the dataset format.</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/datagenerators/RDG1.html#getMaxRuleSize()">getMaxRuleSize</A></B>()</CODE><BR> Gets the maximum number of tests in rules.</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/datagenerators/RDG1.html#getMinRuleSize()">getMinRuleSize</A></B>()</CODE><BR> Gets the minimum number of tests in rules.</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/datagenerators/RDG1.html#getNumIrrelevant()">getNumIrrelevant</A></B>()</CODE><BR> Gets the number of irrelevant attributes.</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/datagenerators/RDG1.html#getNumNumeric()">getNumNumeric</A></B>()</CODE><BR> Gets the number of numerical attributes.</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/datagenerators/RDG1.html#getOptions()">getOptions</A></B>()</CODE><BR> Gets the current settings of the datagenerator RDG1.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Random</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#getRandom()">getRandom</A></B>()</CODE><BR> Gets the random generator.</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/datagenerators/RDG1.html#getSeed()">getSeed</A></B>()</CODE><BR> Gets the random number seed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#getSingleModeFlag()">getSingleModeFlag</A></B>()</CODE><BR> Gets the single mode flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#getVoteFlag()">getVoteFlag</A></B>()</CODE><BR> Gets the vote flag.</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/datagenerators/RDG1.html#globalInfo()">globalInfo</A></B>()</CODE><BR> Returns a string describing this data generator.</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/datagenerators/RDG1.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>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/datagenerators/RDG1.html#main(java.lang.String[])">main</A></B>(java.lang.String[] argv)</CODE><BR> Main method for testing this class.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -