📄 readme.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Class coforest.CoForest</title>
<meta name="generator" content="Namo WebEditor v3.0">
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<h2> <br>
Class CoForest</h2>
<table border="0" width="100%" id="table1">
<tr>
<td width="139" align="left" valign="top"><p><font size="3"><b>Description:</b></font><font
size="3"> </font><span style="FONT-WEIGHT: 400"><font size="3"> </font></span></td>
<td width="1076"><p>CoForest is a semi-supervised algorithm, which exploits
the power of ensemble learning and large amount of unlabeled data
available to produce hypothesis with better performance.</td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p> </td>
<td width="1076"><p> </td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p><font size="3"><b>Reference:</b></font></td>
<td width="1076"><p>M. Li and Z.-H. Zhou. <u>Improve computer-aided
diagnosis with machine learning techniques using undiagnosed samples</u>.
<i>IEEE Transactions on Systems, Man and Cybernetics - Part A: Systems
and Humans</i>, 2007, 37(6).</td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p> </td>
<td width="1076"><p> </td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p><font size="3"><b>ATTN:</b></font><span
style="FONT-WEIGHT: 400"><font size="3"> </font></span></td>
<td width="1076"><p><span style="font-weight: 400"><font size="3">This
package is free for academic usage. You can run it at your own risk.
For other purposes, please contact Prof. Zhi-Hua Zhou </font></span><span
style="font-weight: 400"><a href="mailto:(zhouzh@nju.edu.cn"><font
size="3">(zhouzh@nju.edu.cn</font></a></span><span style="font-weight: 400"><font
size="3">).</font></span></td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p> </td>
<td width="1076"><p> </td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p><font size="3"><b>Requirement:</b></font></td>
<td width="1076"><p><span style="FONT-WEIGHT: 400"><font size="3">To
use this package, the whole </font></span><a href="http://www.cs.waikato.ac.nz/ml/weka/"><font
face="Times New Roman">WEKA</font></a><font face="Times New Roman">
</font><span style="FONT-WEIGHT: 400"><font size="3"> environment
(ver 3.4) must be available. Refer: I.H. Witten and E. Frank. </font></span><span
style="FONT-WEIGHT: 400"><font size="3"><i>Data Mining: Practical
Machine Learning Tools and Techniques with Java Implementations</i></font></span><span
style="FONT-WEIGHT: 400"><font size="3">. Morgan Kaufmann, San
Francisco, CA, 2000.</font></span></td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p> </td>
<td width="1076"><p> </td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p><font size="3"><b>Data
format:</b></font></td>
<td width="1076"><p><span style="font-weight: 400"><font size="3">Both
the input and output formats are the same as those used by WEKA.</font></span></td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p> </td>
<td width="1076"><p> </td>
</tr>
<tr>
<td width="139" align="left" valign="top"><p><font size="3"><b>ATTN2:
</b></font></td>
<td width="1076"><p><span style="font-weight: 400"><font size="3">This
package was developed by Mr. Ming Li </font></span><span style="font-weight: 400"><a href="mailto:(lim@lamda.nju.edu.cn"><font
size="3">(lim@lamda.nju.edu.cn</font></a></span><span style="font-weight: 400"><font
size="3">). This ReadMe file roughly explains the codes. For any
problem concerning the code, please feel free to contact Mr. Li.</font></span></p>
<p> </td>
</tr>
</table>
<dl>
<dt><font size="4">public class </font><font size="4"><b>CoForest</b></font><font
size="4"> </font>
</dl>
<table border cellpadding="3" cellspacing="0" width="100%">
<tr>
<td bgcolor="#CCCCFF"><p><font size="5"><b>Field Detail</b></font><font
size="5"> </font></td>
</tr>
</table>
<h3><a name="m_classifiers">m_classifiers</a></h3>
<pre>protected weka.classifiers.Classifier[] <b>m_classifiers</b></pre>
<dl>
<dd>Random Forest
</dl>
<dl>
<dd><hr>
</dl>
<h3>m_numClassifiers</h3>
<pre>protected int <b>m_numClassifiers</b></pre>
<dl>
<dd>The number component
</dl>
<dl>
<dd><hr>
</dl>
<h3>m_seed</h3>
<pre>protected int <b>m_seed</b></pre>
<dl>
<dd>The random seed
</dl>
<dl>
<dd><hr>
</dl>
<h3>m_numFeatures</h3>
<pre>protected int <b>m_numFeatures</b></pre>
<dl>
<dd>Number of features to consider in random feature selection. If less
than 1 will use int(logM+1) )
</dl>
<dl>
<dd><hr>
</dl>
<h3>m_KValue</h3>
<pre>protected int <b>m_KValue</b></pre>
<dl>
<dd>Final number of features that were considered in last build.
</dl>
<dl>
<dd><hr>
</dl>
<h3>m_threshold</h3>
<pre>protected double <b>m_threshold</b></pre>
<dl>
<dd>confidence threshold
</dl>
<dl>
<dd><hr>
</dl>
<table border cellpadding="3" cellspacing="0" width="100%">
<tr>
<td bgcolor="#CCCCFF"><p><font size="5"><b>Constructor Detail</b></font><font
size="5"> </font></td>
</tr>
</table>
<h3><a name="CoForest()">CoForest</a></h3>
<pre>public <b>CoForest</b>()</pre>
<dl>
<dd>The constructor
</dl>
<dl>
<dd><hr>
</dl>
<table border cellpadding="3" cellspacing="0" width="100%">
<tr>
<td bgcolor="#CCCCFF"><p><font size="5"><b>Method Detail</b></font><font
size="5"> </font></td>
</tr>
</table>
<h3><a name="setSeed(int)">setSeed</a></h3>
<pre>public void <b>setSeed</b>(int s)</pre>
<dl>
<dd>Set the seed for initiating the random object used inside this class
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>s</code> - int -- The seed
</dl>
<p><hr> </p>
<h3>setNumClassifiers</h3>
<pre>public void <b>setNumClassifiers</b>(int n)</pre>
<dl>
<dd>Set the number of trees used in Random Forest.
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>s</code> - int -- Value to assign to numTrees.
</dl>
<p><hr> </p>
<h3>getNumClassifiers</h3>
<pre>public int <b>getNumClassifiers</b>()</pre>
<dl>
<dd>Get the number of trees used in Random Forest
</dl>
<dl>
<dt><b>Returns:</b>
<dd>int -- The number of trees.
</dl>
<p><hr> </p>
<h3>setNumFeatures</h3>
<pre>public void <b>setNumFeatures</b>(int n)</pre>
<dl>
<dd>Set the number of features to use in random selection.
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>n</code> - int -- Value to assign to m_numFeatures.
</dl>
<p><hr> </p>
<h3>getNumFeatures</h3>
<pre>public int <b>getNumFeatures</b>()</pre>
<dl>
<dd>Get the number of featrues to use in random selection.
</dl>
<dl>
<dt><b>Returns:</b>
<dd>int -- The number of features
</dl>
<p><hr> </p>
<h3>resampleWithWeights</h3>
<pre>public final weka.core.Instances <b>resampleWithWeights</b>(weka.core.Instances data,
java.util.Random random,
boolean[] sampled)</pre>
<dl>
<dd>Resample instances w.r.t the weight
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>data</code> - Instances -- the original data set
<dd><code>random</code> - Random -- the random object
<dd><code>sampled</code> - boolean[] -- the output parameter, indicating
whether the instance is sampled
<dt><b>Returns:</b>
<dd>Instances
</dl>
<p><hr> </p>
<h3>distributionForInstance</h3>
<pre>public double[] <b>distributionForInstance</b>(weka.core.Instance inst)</pre>
<dl>
<dd>Returns the probability label of a given instance
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>inst</code> - Instance -- The instance
<dt><b>Returns:</b>
<dd>double[] -- The probability label
<dt><b>Throws:</b>
<dd><code>Exception</code> - -- Some exception
</dl>
<p><hr> </p>
<h3>classifyInstance</h3>
<pre>public double <b>classifyInstance</b>(weka.core.Instance inst)</pre>
<dl>
<dd>Classifies a given instance
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>inst</code> - Instance -- The instance
<dt><b>Returns:</b>
<dd>double -- The class value
<dt><b>Throws:</b>
<dd><code>Exception</code> - -- Some Exception
</dl>
<p><hr> </p>
<h3>buildClassifier</h3>
<pre>public void <b>buildClassifier</b>(weka.core.Instances labeled,
weka.core.Instances unlabeled)</pre>
<dl>
<dd>Build the classifiers using Co-Forest algorithm
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>labeled</code> - Instances -- Labeled training set
<dd><code>unlabeled</code> - Instances -- unlabeled training set
<dt><b>Throws:</b>
<dd><code>Exception</code> - -- certain exception
</dl>
<p><hr> </p>
<h3>isHighConfidence</h3>
<pre>protected boolean <b>isHighConfidence</b>(weka.core.Instance inst,
int idExcluded)</pre>
<dl>
<dd>To judege whether the confidence for a given instance of H* is high
enough, which is affected by the onfidence threshold. Meanwhile, if the
example is the confident one, assign label to it and weigh the example with
the confidence
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>inst</code> - Instance -- The instance
<dd><code>idExcluded</code> - int -- the index of the individual should
be excluded from H*
<dt><b>Returns:</b>
<dd>boolean -- true for high
<dt><b>Throws:</b>
<dd><code>Exception</code> - - some exception
</dl>
<p><hr> </p>
<h3>main</h3>
<pre>public static void <b>main</b>(java.lang.String[] args)</pre>
<dl>
<dd>The main method only for demonstrating the simple use of this package
</dl>
<dl>
<dt><b>Parameters:</b>
<dd><code>args</code> - String[]
</dl>
<p><hr> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -