📄 lmtnode.html
字号:
Returns the class probabilities for an instance according to the logistic model at the node.</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/classifiers/trees/lmt/LMTNode.html#modelErrors()">modelErrors</A></B>()</CODE><BR> Updates the numIncorrectModel field for all nodes.</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/classifiers/trees/lmt/LMTNode.html#modelsToString()">modelsToString</A></B>()</CODE><BR> Returns a string describing the logistic regression function at the node.</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/classifiers/trees/lmt/LMTNode.html#numLeaves()">numLeaves</A></B>()</CODE><BR> Returns the number of leaves (normal count).</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/classifiers/trees/lmt/LMTNode.html#numNodes()">numNodes</A></B>()</CODE><BR> Returns the number of nodes.</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/classifiers/trees/lmt/LMTNode.html#prune(double)">prune</A></B>(double alpha)</CODE><BR> Prunes a logistic model tree using the CART pruning scheme, given a cost-complexity parameter alpha.</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/classifiers/trees/lmt/LMTNode.html#prune(double[], double[], weka.core.Instances)">prune</A></B>(double[] alphas, double[] errors, <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> test)</CODE><BR> Method for performing one fold in the cross-validation of the cost-complexity parameter.</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/classifiers/trees/lmt/LMTNode.html#toString()">toString</A></B>()</CODE><BR> Returns a description of the logistic model tree (tree structure and logistic models)</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/classifiers/trees/lmt/LMTNode.html#treeErrors()">treeErrors</A></B>()</CODE><BR> Updates the numIncorrectTree field for all nodes.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_weka.classifiers.trees.lmt.LogisticBase"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class weka.classifiers.trees.lmt.<A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html" title="class in weka.classifiers.trees.lmt">LogisticBase</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#getMaxIterations()">getMaxIterations</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#getNumRegressions()">getNumRegressions</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#getUseAIC()">getUseAIC</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#getUsedAttributes()">getUsedAttributes</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#getWeightTrimBeta()">getWeightTrimBeta</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#percentAttributesUsed()">percentAttributesUsed</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#setHeuristicStop(int)">setHeuristicStop</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#setMaxIterations(int)">setMaxIterations</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#setUseAIC(boolean)">setUseAIC</A>, <A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#setWeightTrimBeta(double)">setWeightTrimBeta</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_weka.classifiers.Classifier"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class weka.classifiers.<A HREF="../../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../weka/classifiers/Classifier.html#classifyInstance(weka.core.Instance)">classifyInstance</A>, <A HREF="../../../../weka/classifiers/Classifier.html#debugTipText()">debugTipText</A>, <A HREF="../../../../weka/classifiers/Classifier.html#forName(java.lang.String, java.lang.String[])">forName</A>, <A HREF="../../../../weka/classifiers/Classifier.html#getCapabilities()">getCapabilities</A>, <A HREF="../../../../weka/classifiers/Classifier.html#getDebug()">getDebug</A>, <A HREF="../../../../weka/classifiers/Classifier.html#getOptions()">getOptions</A>, <A HREF="../../../../weka/classifiers/Classifier.html#listOptions()">listOptions</A>, <A HREF="../../../../weka/classifiers/Classifier.html#makeCopies(weka.classifiers.Classifier, int)">makeCopies</A>, <A HREF="../../../../weka/classifiers/Classifier.html#makeCopy(weka.classifiers.Classifier)">makeCopy</A>, <A HREF="../../../../weka/classifiers/Classifier.html#setDebug(boolean)">setDebug</A>, <A HREF="../../../../weka/classifiers/Classifier.html#setOptions(java.lang.String[])">setOptions</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="m_alpha"><!-- --></A><H3>m_alpha</H3><PRE>public double <B>m_alpha</B></PRE><DL><DD>Alpha-value (for pruning) at the node<P><DL></DL></DL><HR><A NAME="m_numIncorrectModel"><!-- --></A><H3>m_numIncorrectModel</H3><PRE>public double <B>m_numIncorrectModel</B></PRE><DL><DD>Weighted number of training examples currently misclassified by the logistic model at the node<P><DL></DL></DL><HR><A NAME="m_numIncorrectTree"><!-- --></A><H3>m_numIncorrectTree</H3><PRE>public double <B>m_numIncorrectTree</B></PRE><DL><DD>Weighted number of training examples currently misclassified by the subtree rooted at the node<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="LMTNode(weka.classifiers.trees.j48.ModelSelection, int, boolean, boolean, int, double, boolean)"><!-- --></A><H3>LMTNode</H3><PRE>public <B>LMTNode</B>(<A HREF="../../../../weka/classifiers/trees/j48/ModelSelection.html" title="class in weka.classifiers.trees.j48">ModelSelection</A> modelSelection, int numBoostingIterations, boolean fastRegression, boolean errorOnProbabilities, int minNumInstances, double weightTrimBeta, boolean useAIC)</PRE><DL><DD>Constructor for logistic model tree node.<P><DL><DT><B>Parameters:</B><DD><CODE>modelSelection</CODE> - selection method for local splitting model<DD><CODE>numBoostingIterations</CODE> - sets the numBoostingIterations parameter<DD><CODE>fastRegression</CODE> - sets the fastRegression parameter<DD><CODE>errorOnProbabilities</CODE> - Use error on probabilities for stopping criterion of LogitBoost?<DD><CODE>minNumInstances</CODE> - minimum number of instances at which a node is considered for splitting</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="buildClassifier(weka.core.Instances)"><!-- --></A><H3>buildClassifier</H3><PRE>public void <B>buildClassifier</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data) throws java.lang.Exception</PRE><DL><DD>Method for building a logistic model tree (only called for the root node). Grows an initial logistic model tree and prunes it back using the CART pruning scheme.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html#buildClassifier(weka.core.Instances)">buildClassifier</A></CODE> in class <CODE><A HREF="../../../../weka/classifiers/trees/lmt/LogisticBase.html" title="class in weka.classifiers.trees.lmt">LogisticBase</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to train with<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="buildTree(weka.core.Instances, weka.classifiers.functions.SimpleLinearRegression[][], double, double)"><!-- --></A><H3>buildTree</H3><PRE>public void <B>buildTree</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, <A HREF="../../../../weka/classifiers/functions/SimpleLinearRegression.html" title="class in weka.classifiers.functions">SimpleLinearRegression</A>[][] higherRegressions, double totalInstanceWeight, double higherNumParameters) throws java.lang.Exception</PRE><DL><DD>Method for building the tree structure. Builds a logistic model, splits the node and recursively builds tree for child nodes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the training data passed on to this node<DD><CODE>higherRegressions</CODE> - An array of regression functions produced by LogitBoost at higher levels in the tree. They represent a logistic regression model that is refined locally at this node.<DD><CODE>totalInstanceWeight</CODE> - the total number of training examples<DD><CODE>higherNumParameters</CODE> - effective number of parameters in the logistic regression model built in parent nodes<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="prune(double)"><!-- --></A><H3>prune</H3><PRE>public void <B>prune</B>(double alpha) throws java.lang.Exception</PRE><DL><DD>Prunes a logistic model tree using the CART pruning scheme, given a cost-complexity parameter alpha.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>alpha</CODE> - the cost-complexity measure<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="prune(double[], double[], weka.core.Instances)"><!-- --></A><H3>prune</H3><PRE>public int <B>prune</B>(double[] alphas, double[] errors, <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A> test) throws java.lang.Exception</PRE><DL><DD>Method for performing one fold in the cross-validation of the cost-complexity parameter. Generates a sequence of alpha-values with error estimates for the corresponding (partially pruned) trees, given the test set of that fold.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>alphas</CODE> - array to hold the generated alpha-values<DD><CODE>errors</CODE> - array to hold the corresponding error estimates<DD><CODE>test</CODE> - test set of that fold (to obtain error estimates)<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="getNumInnerNodes()"><!-- --></A><H3>getNumInnerNodes</H3><PRE>public int <B>getNumInnerNodes</B>()</PRE><DL><DD>Method to count the number of inner nodes in the tree<P><DD><DL><DT><B>Returns:</B><DD>the number of inner nodes</DL></DD></DL><HR><A NAME="getNumLeaves()"><!-- --></A><H3>getNumLeaves</H3><PRE>public int <B>getNumLeaves</B>()</PRE><DL><DD>Returns the number of leaves in the tree. Leaves are only counted if their logistic model has changed compared to the one of the parent node.<P><DD><DL><DT><B>Returns:</B><DD>the number of leaves</DL></DD></DL><HR><A NAME="modelErrors()"><!-- --></A><H3>modelErrors</H3><PRE>public void <B>modelErrors</B>() throws java.lang.Exception</PRE><DL><DD>Updates the numIncorrectModel field for all nodes. This is needed for calculating the alpha-values.<P><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE></DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -