📄 nominalprediction.html
字号:
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="NominalPrediction(double, double[])"><!-- --></A><H3>NominalPrediction</H3><PRE>public <B>NominalPrediction</B>(double actual, double[] distribution)</PRE><DL><DD>Creates the NominalPrediction object with a default weight of 1.0.<DD><DL><DT><B>Parameters:</B><DD><CODE>actual</CODE> - the actual value, or MISSING_VALUE.<DD><CODE>distribution</CODE> - the predicted probability distribution. Use NominalPrediction.makeDistribution() if you only know the predicted value.</DL></DD></DL><HR><A NAME="NominalPrediction(double, double[], double)"><!-- --></A><H3>NominalPrediction</H3><PRE>public <B>NominalPrediction</B>(double actual, double[] distribution, double weight)</PRE><DL><DD>Creates the NominalPrediction object.<DD><DL><DT><B>Parameters:</B><DD><CODE>actual</CODE> - the actual value, or MISSING_VALUE.<DD><CODE>distribution</CODE> - the predicted probability distribution. Use NominalPrediction.makeDistribution() if you only know the predicted value.<DD><CODE>weight</CODE> - the weight assigned to the prediction.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="distribution()"><!-- --></A><H3>distribution</H3><PRE>public double[] <B>distribution</B>()</PRE><DL><DD>Gets the predicted probabilities<DD><DL></DL></DD></DL><HR><A NAME="actual()"><!-- --></A><H3>actual</H3><PRE>public double <B>actual</B>()</PRE><DL><DD>Gets the actual class value.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../weka/classifiers/evaluation/Prediction.html#actual()">actual</A></CODE> in interface <CODE><A HREF="../../../weka/classifiers/evaluation/Prediction.html">Prediction</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the actual class value, or MISSING_VALUE if no prediction was made.</DL></DD></DL><HR><A NAME="predicted()"><!-- --></A><H3>predicted</H3><PRE>public double <B>predicted</B>()</PRE><DL><DD>Gets the predicted class value.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../weka/classifiers/evaluation/Prediction.html#predicted()">predicted</A></CODE> in interface <CODE><A HREF="../../../weka/classifiers/evaluation/Prediction.html">Prediction</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the predicted class value, or MISSING_VALUE if no prediction was made.</DL></DD></DL><HR><A NAME="weight()"><!-- --></A><H3>weight</H3><PRE>public double <B>weight</B>()</PRE><DL><DD>Gets the weight assigned to this prediction. This is typically the weight of the test instance the prediction was made for.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../weka/classifiers/evaluation/Prediction.html#weight()">weight</A></CODE> in interface <CODE><A HREF="../../../weka/classifiers/evaluation/Prediction.html">Prediction</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the weight assigned to this prediction.</DL></DD></DL><HR><A NAME="margin()"><!-- --></A><H3>margin</H3><PRE>public double <B>margin</B>()</PRE><DL><DD>Calculates the prediction margin. This is defined as the difference between the probability predicted for the actual class and the highest predicted probability of the other classes.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the margin for this prediction, or MISSING_VALUE if either the actual or predicted value is missing.</DL></DD></DL><HR><A NAME="makeDistribution(double, int)"><!-- --></A><H3>makeDistribution</H3><PRE>public static double[] <B>makeDistribution</B>(double predictedClass, int numClasses)</PRE><DL><DD>Convert a single prediction into a probability distribution with all zero probabilities except the predicted value which has probability 1.0. If no prediction was made, all probabilities are zero.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>predictedClass</CODE> - the index of the predicted class, or MISSING_VALUE if no prediction was made.<DD><CODE>numClasses</CODE> - the number of possible classes for this nominal prediction.<DT><B>Returns:</B><DD>the probability distribution.</DL></DD></DL><HR><A NAME="makeUniformDistribution(int)"><!-- --></A><H3>makeUniformDistribution</H3><PRE>public static double[] <B>makeUniformDistribution</B>(int numClasses)</PRE><DL><DD>Creates a uniform probability distribution -- where each of the possible classes is assigned equal probability.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>numClasses</CODE> - the number of possible classes for this nominal prediction.<DT><B>Returns:</B><DD>the probability distribution.</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Gets a human readable representation of this prediction.<DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a human readable representation of this prediction.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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/evaluation/MarginCurve.html"><B>PREV CLASS</B></A> <A HREF="../../../weka/classifiers/evaluation/NumericPrediction.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="NominalPrediction.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | 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><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -