📄 thresholdselector.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:49 CDT 2002 --><TITLE>: Class ThresholdSelector</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/classifiers/Stacking.html"><B>PREV CLASS</B></A> <A HREF="../../weka/classifiers/UserClassifier.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="ThresholdSelector.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <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.classifiers</FONT><BR>Class ThresholdSelector</H2><PRE>java.lang.Object | +--<A HREF="../../weka/classifiers/Classifier.html">weka.classifiers.Classifier</A> | +--<A HREF="../../weka/classifiers/DistributionClassifier.html">weka.classifiers.DistributionClassifier</A> | +--<B>weka.classifiers.ThresholdSelector</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, <A HREF="../../weka/core/OptionHandler.html">OptionHandler</A>, java.io.Serializable</DD></DL><HR><DL><DT>public class <B>ThresholdSelector</B><DT>extends <A HREF="../../weka/classifiers/DistributionClassifier.html">DistributionClassifier</A><DT>implements <A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></DL><P>Class for selecting a threshold on a probability output by a distribution classifier. The threshold is set so that a given performance measure is optimized. Currently this is the F-measure. Performance is measured either on the training data, a hold-out set or using cross-validation. In addition, the probabilities returned by the base learner can have their range expanded so that the output probabilities will reside between 0 and 1 (this is useful if the scheme normally produces probabilities in a very narrow range).<p> Valid options are:<p> -C num <br> The class for which threshold is determined. Valid values are: 1, 2 (for first and second classes, respectively), 3 (for whichever class is least frequent), 4 (for whichever class value is most frequent), and 5 (for the first class named any of "yes","pos(itive)", "1", or method 3 if no matches). (default 5). <p> -W classname <br> Specify the full class name of the base classifier. <p> -X num <br> Number of folds used for cross validation. If just a hold-out set is used, this determines the size of the hold-out set (default 3).<p> -R integer <br> Sets whether confidence range correction is applied. This can be used to ensure the confidences range from 0 to 1. Use 0 for no range correction, 1 for correction based on the min/max values seen during threshold selection (default 0).<p> -S seed <br> Random number seed (default 1).<p> -E integer <br> Sets the evaluation mode. Use 0 for evaluation using cross-validation, 1 for evaluation using hold-out set, and 2 for evaluation on the training data (default 1).<p> Options after -- are passed to the designated sub-classifier. <p><P><DL><DT><B>See Also: </B><DD><A HREF="../../serialized-form.html#weka.classifiers.ThresholdSelector">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#EVAL_CROSS_VALIDATION">EVAL_CROSS_VALIDATION</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#EVAL_TRAINING_SET">EVAL_TRAINING_SET</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#EVAL_TUNED_SPLIT">EVAL_TUNED_SPLIT</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_BestThreshold">m_BestThreshold</A></B></CODE><BR> The threshold that lead to the best performance</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_BestValue">m_BestValue</A></B></CODE><BR> The best value that has been observed</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../weka/classifiers/DistributionClassifier.html">DistributionClassifier</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_Classifier">m_Classifier</A></B></CODE><BR> The generated base classifier</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_ClassMode">m_ClassMode</A></B></CODE><BR> Method to determine which class to optimize for</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_DesignatedClass">m_DesignatedClass</A></B></CODE><BR> Designated class value, determined during building</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_EvalMode">m_EvalMode</A></B></CODE><BR> The evaluation mode</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_HighThreshold">m_HighThreshold</A></B></CODE><BR> The upper threshold used as the basis of correction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_LowThreshold">m_LowThreshold</A></B></CODE><BR> The lower threshold used as the basis of correction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_NumXValFolds">m_NumXValFolds</A></B></CODE><BR> The number of folds used in cross-validation</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_RangeMode">m_RangeMode</A></B></CODE><BR> The range correction mode</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#m_Seed">m_Seed</A></B></CODE><BR> Random number seed</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#MIN_VALUE">MIN_VALUE</A></B></CODE><BR> The minimum value for the criterion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#OPTIMIZE_0">OPTIMIZE_0</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#OPTIMIZE_1">OPTIMIZE_1</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#OPTIMIZE_LFREQ">OPTIMIZE_LFREQ</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#OPTIMIZE_MFREQ">OPTIMIZE_MFREQ</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#OPTIMIZE_POS_NAME">OPTIMIZE_POS_NAME</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#RANGE_BOUNDS">RANGE_BOUNDS</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#RANGE_NONE">RANGE_NONE</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../weka/core/Tag.html">Tag</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#TAGS_EVAL">TAGS_EVAL</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../weka/core/Tag.html">Tag</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#TAGS_OPTIMIZE">TAGS_OPTIMIZE</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../weka/core/Tag.html">Tag</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/ThresholdSelector.html#TAGS_RANGE">TAGS_RANGE</A></B></CODE><BR> </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -