📄 readme.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ReadMe file for the C45_RulePANE Package</title>
<meta name="author" content="Ming Li">
<meta name="keywords" content="Machine Learning, Ensemble Learning, Classification Rule">
<meta name="generator" content="Microsoft FrontPage 5.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<h2><font face="Times New Roman"><br>
ReadMe File for C4.5Rule-PANE Package</font></h2>
<dl>
<dt><font face="Times New Roman">public class </font><font face="Times New Roman"><b>C45Rule_PANE</b></font><font
face="Times New Roman"> </font>
</dl>
<p><font face="Times New Roman"><b>Description:</b></font><font face="Times New Roman">
Use C4.5Rule-PANE to generate classification rules.<br>
<br> </font><font face="Times New Roman"><b>Reference:</b></font><font face="Times New Roman">
Z.-H. Zhou and Y. Jiang. Medical diagnosis with C4.5 rule preceded
by artificial neural network ensemble. IEEE Transactions on Information Technology
in Biomedicine, 2003, 7(1): 37-42.</font></p>
<p><font face="Times New Roman"><b>ATTN:</b></font><font face="Times New Roman">
This package is free for academic
usage. You can run it at your own risk. For other purposes, please contact Prof.
Zhi-Hua Zhou (zhouzh@nju.edu.cn).</font></p>
<p><font face="Times New Roman"><b>Requirement:</b></font><font face="Times New Roman">
To use this package, the whole WEKA environment must be available. Refer: I.H.
Witten and E. Frank. Data Mining: Practical Machine Learning Tools and Techniques
with Java Implementations. Morgan Kaufmann, San Francisco, CA, 2000.</font></p>
<p><font face="Times New Roman"><b>Data format:</b></font><font face="Times New Roman">
Both the input and output formats are the same as those used by WEKA.</font></p>
<p><font face="Times New Roman"><b>ATTN2: </b></font><font face="Times New Roman"> This
package was developed by Mr. Ming Li (liming@ai.nju.edu.cn). There is a ReadMe
file provided for roughly explaining the codes. But for any problem concerning
the code, please feel free to contact with Mr. Li. Please note that since the
C4.5Rule routine used by this package is its reimplementation in WEKA, the performance
of the package would be slightly different from that reported in the paper.</font></p>
<p>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B>
</FONT></TD></TR></TABLE>
<H3>m_bPrintBuildingProcess</H3>
<PRE>private boolean <B>m_bPrintBuildingProcess</B></PRE>
<DL><DD>The flag whether to print the classifier-building process<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<H3>m_baggingNN</H3>
<PRE>private c45rule_pane.BaggingNN <B>m_baggingNN</B></PRE>
<DL><DD>The object of neural network ensemble via bagging</DD>
</DL>
<HR>
<H3>m_originalDataSet</H3>
<PRE>private Instances <B>m_originalDataSet</B></PRE>
<DL><DD>The original training set<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<H3>m_trainingSet</H3>
<PRE>private Instances <B>m_trainingSet</B></PRE>
<DL><DD>The dataset generated by N*,the neural network ensemble, to generating a
PART decision list</DD>
</DL>
<HR>
<H3>m_iMiu</H3>
<PRE>private int <B>m_iMiu</B></PRE>
<DL><DD>The ratio for extra data<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<H3>m_dwAttMinValArr</H3>
<PRE>private double[] <B>m_dwAttMinValArr</B></PRE>
<DL><DD><font size="3"><span style="font-weight: 400">The minimal value of each
attribute</span></font><DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<H3>m_dwAttValRangeArr</H3>
<PRE>private double[] <B>m_dwAttValRangeArr</B></PRE>
<DL><DD>The value range of each attribute<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<H3>m_rand</H3>
<PRE>Random <B>m_rand</B></PRE>
<DL><DD>The random object<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<H3>m_DTRule</H3>
<PRE>PART <B>m_DTRule</B></PRE>
<DL><DD>The Rule Generator on Partial C4.5</DD>
</DL>
<HR>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B>
</FONT></TD></TR></TABLE>
<H3>C45Rule_PANE</H3>
<PRE>public <B>C45Rule_PANE</B>()</PRE>
<DL><DD>The Constructor<DL><DD></DD></DL></DD>
</DL>
<DL></DL>
<HR>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF"><TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B>
</FONT></TD></TR></TABLE>
<H3>setArgs</H3>
<PRE>public void <B>setArgs</B>(int miu,
int NNs,
int hidUnit,
double learningrate,
double momentum,
int epoch,
int threshold)</PRE>
<DL><DD>The function to Change the Arguments of C4.5 Rule-PANE<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>miu:</CODE> - the extra data ratio</DD>
<DD><CODE>NNs:</CODE> - the number of neural networks in ensemble via baggging</DD>
<DD><CODE>hidUnit:</CODE> - the number of hidden units</DD>
<DD><CODE>learningrate:</CODE> - the learning rate</DD>
<DD><CODE>momentum:</CODE> - the momentum</DD>
<DD><CODE>threshold:</CODE> - the threshold on validation set for training a
neural network, avoiding overfitting</DD>
</DL>
<HR>
<H3>getExtraDataRate</H3>
<PRE>public int <B>getExtraDataRate</B>()</PRE>
<DL><DD>Call this function to get the extra data ratio<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the extra data ratio, miu</DD>
</DL>
<HR>
<H3>numHiddenUnits</H3>
<PRE>public int <B>numHiddenUnits</B>()</PRE>
<DL><DD>Call this function to get the number of hidden units<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the number of hidden units</DD>
</DL>
<HR>
<H3>getMomentum</H3>
<PRE>public double <B>getMomentum</B>()</PRE>
<DL><DD>Call this function to get the momentum for training a neural network<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the momentum</DD>
</DL>
<HR>
<H3>getLearingRate</H3>
<PRE>public double <B>getLearingRate</B>()</PRE>
<DL><DD>Call this function to get the learning rate for training a neural
network<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the learning rate</DD>
</DL>
<HR>
<H3>getValidationThreshold</H3>
<PRE>public int <B>getValidationThreshold</B>()</PRE>
<DL><DD>Call this function to get the validation threshold specified to avoid overfitting<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the validation threshold</DD>
</DL>
<HR>
<H3>getEpochs</H3>
<PRE>public int <B>getEpochs</B>()</PRE>
<DL><DD>Call this function to get the training epochs for a neural network<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the training epochs</DD>
</DL>
<HR>
<H3>isPrintBuildingProcess</H3>
<PRE>public boolean <B>isPrintBuildingProcess</B>()</PRE>
<DL><DD>Call the function to get the flag whether to print the neural network building process in training<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the flag. True for printing, otherwise false.</DD>
</DL>
<HR>
<H3>buildClassifier</H3>
<PRE>public void <B>buildClassifier</B>(Instances i)</PRE>
<DL><DD>Call this function to build a C4.5 Rule-PANE Classifier<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>i:</CODE> - the original training set</DD>
<DT><B>Throws:</B><DD><CODE>Exception:</CODE> - some exception</DD>
</DL>
<HR>
<H3>classifyInstance</H3>
<PRE>public double <B>classifyInstance</B>(Instance ins)</PRE>
<DL><DD>Call this function to classify an instance with the built C4.5 Rule-PANE model<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>ins:</CODE> - the instance to be classified</DD>
<DT><B>Returns:</B><DD>the class value of the instance</DD>
<DT><B>Throws:</B><DD><CODE>Exception:</CODE> - if the C4.5 Rule-PANE model has not been trained before using this method</DD>
</DL>
<HR>
<H3>toString</H3>
<PRE>public String <B>toString</B>()</PRE>
<DL><DD>Returns a string describing the model<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>a string describing the model</DD>
</DL>
<HR>
<H3>measureSize</H3>
<PRE>public double <B>measureSize</B>()</PRE>
<DL><DD>Call this function to get the number of rules<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>the number of rules</DD>
</DL>
<HR>
<H3>randomGenerateInstance</H3>
<PRE>private Instance <B>randomGenerateInstance</B>()</PRE>
<DL><DD>Call this function the generate the feature vector randomly
<p><i>Note:</i> each attribute value is within the range of original dataset<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Returns:</B><DD>randomly generated feature vector.</DD>
</DL>
<HR>
<H3>setRandomSeed</H3>
<PRE>private void <B>setRandomSeed</B>(long seed)</PRE>
<DL><DD>Call this function to set the random seed to build the Random Object<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>seed:</CODE> - the seed</DD>
</DL>
<HR>
<H3>setPrintBaggingProcess</H3>
<PRE>public void <B>setPrintBaggingProcess</B>(boolean b)</PRE>
<DL><DD>Call this function to set the flag for printing the classifier-building process<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>b:</CODE> - true for printing the process, false otherwise</DD>
</DL>
<HR>
<H3>setBaseAndRange</H3>
<PRE>private void <B>setBaseAndRange</B>(Instances dataset)</PRE>
<DL><DD>Call the function to set the MinVal and Range arrays. So each value of Attbute
<i>i</i> is within the range of Min[i]~(Min[i]+Range[i])<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>dataset:</CODE> - the dataset to be processed</DD>
</DL>
<HR>
<H3>main</H3>
<PRE>public static void <B>main</B>(String[] args)</PRE>
<DL><DD>The main function for testing and comparing Partial C4.5-Rule and C4.5 Rule-PANE<DL><DD></DD></DL></DD>
</DL>
<DL><DT><B>Parameters:</B><DD><CODE>args:</CODE> - specify the dataset file path following the pattern " -t <dataset full path>
</dataset>
<Dataset File Name>"</DD>
<dt>
e.g. " -t D:\iris.arff"</dt>
</DL>
<font face="Times New Roman"><hr> </font></p>
<p> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -