📄 confusionmatrix.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 ConfusionMatrix</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"> PREV CLASS <A HREF="../../../weka/classifiers/evaluation/CostCurve.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="ConfusionMatrix.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.evaluation</FONT><BR>Class ConfusionMatrix</H2><PRE>java.lang.Object | +--<A HREF="../../../weka/core/Matrix.html">weka.core.Matrix</A> | +--<B>weka.classifiers.evaluation.ConfusionMatrix</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, java.io.Serializable</DD></DL><HR><DL><DT>public class <B>ConfusionMatrix</B><DT>extends <A HREF="../../../weka/core/Matrix.html">Matrix</A></DL><P>Cells of this matrix correspond to counts of the number (or weight) of predictions for each actual value / predicted value combination.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#weka.classifiers.evaluation.ConfusionMatrix">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>protected java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#m_ClassNames">m_ClassNames</A></B></CODE><BR> Stores the names of the classes</TD></TR></TABLE> <A NAME="fields_inherited_from_class_weka.core.Matrix"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class weka.core.<A HREF="../../../weka/core/Matrix.html">Matrix</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../weka/core/Matrix.html#m_Elements">m_Elements</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#ConfusionMatrix(java.lang.String[])">ConfusionMatrix</A></B>(java.lang.String[] classNames)</CODE><BR> Creates the confusion matrix with the given class names.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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/evaluation/ConfusionMatrix.html#addPrediction(weka.classifiers.evaluation.NominalPrediction)">addPrediction</A></B>(<A HREF="../../../weka/classifiers/evaluation/NominalPrediction.html">NominalPrediction</A> pred)</CODE><BR> Includes a prediction in the confusion matrix.</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/evaluation/ConfusionMatrix.html#addPredictions(weka.core.FastVector)">addPredictions</A></B>(<A HREF="../../../weka/core/FastVector.html">FastVector</A> predictions)</CODE><BR> Includes a whole bunch of predictions in the confusion matrix.</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/evaluation/ConfusionMatrix.html#className(int)">className</A></B>(int index)</CODE><BR> Gets the name of one of the classes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#clone()">clone</A></B>()</CODE><BR> Creates and returns a clone of this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#correct()">correct</A></B>()</CODE><BR> Gets the number of correct classifications (that is, for which a correct prediction was made).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#errorRate()">errorRate</A></B>()</CODE><BR> Returns the estimated error rate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../weka/classifiers/evaluation/TwoClassStats.html">TwoClassStats</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#getTwoClassStats(int)">getTwoClassStats</A></B>(int classIndex)</CODE><BR> Gets the performance with respect to one of the classes as a TwoClassStats object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#incorrect()">incorrect</A></B>()</CODE><BR> Gets the number of incorrect classifications (that is, for which an incorrect prediction was made).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html">ConfusionMatrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#makeWeighted(weka.classifiers.CostMatrix)">makeWeighted</A></B>(<A HREF="../../../weka/classifiers/CostMatrix.html">CostMatrix</A> costs)</CODE><BR> Makes a copy of this ConfusionMatrix after applying the supplied CostMatrix to the cells.</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/evaluation/ConfusionMatrix.html#size()">size</A></B>()</CODE><BR> Gets the number of classes.</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/evaluation/ConfusionMatrix.html#toString()">toString</A></B>()</CODE><BR> Calls toString() with a default title.</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/evaluation/ConfusionMatrix.html#toString(java.lang.String)">toString</A></B>(java.lang.String title)</CODE><BR> Outputs the performance statistics as a classification confusion matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#total()">total</A></B>()</CODE><BR> Gets the number of predictions that were made (actually the sum of the weights of predictions where the class value was known).</TD></TR></TABLE> <A NAME="methods_inherited_from_class_weka.core.Matrix"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class weka.core.<A HREF="../../../weka/core/Matrix.html">Matrix</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../weka/core/Matrix.html#add(weka.core.Matrix)">add</A>, <A HREF="../../../weka/core/Matrix.html#addElement(int, int, double)">addElement</A>, <A HREF="../../../weka/core/Matrix.html#getElement(int, int)">getElement</A>, <A HREF="../../../weka/core/Matrix.html#initialize()">initialize</A>, <A HREF="../../../weka/core/Matrix.html#lubksb(int[], double[])">lubksb</A>, <A HREF="../../../weka/core/Matrix.html#ludcmp()">ludcmp</A>, <A HREF="../../../weka/core/Matrix.html#main(java.lang.String[])">main</A>, <A HREF="../../../weka/core/Matrix.html#multiply(weka.core.Matrix)">multiply</A>, <A HREF="../../../weka/core/Matrix.html#numColumns()">numColumns</A>, <A HREF="../../../weka/core/Matrix.html#numRows()">numRows</A>, <A HREF="../../../weka/core/Matrix.html#regression(weka.core.Matrix)">regression</A>, <A HREF="../../../weka/core/Matrix.html#regression(weka.core.Matrix, double[])">regression</A>, <A HREF="../../../weka/core/Matrix.html#setColumn(int, double[])">setColumn</A>, <A HREF="../../../weka/core/Matrix.html#setElement(int, int, double)">setElement</A>, <A HREF="../../../weka/core/Matrix.html#setRow(int, double[])">setRow</A>, <A HREF="../../../weka/core/Matrix.html#transpose()">transpose</A>, <A HREF="../../../weka/core/Matrix.html#write(java.io.Writer)">write</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -