confusionmatrix.html
来自「由java开发的软件包」· HTML 代码 · 共 582 行 · 第 1/2 页
HTML
582 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_05) on Mon Mar 07 15:27:21 NZDT 2005 --><TITLE>ConfusionMatrix</TITLE><META NAME="keywords" CONTENT="weka.classifiers.evaluation.ConfusionMatrix class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="ConfusionMatrix";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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="../../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</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" title="class in weka.classifiers.evaluation"><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> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | 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><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.classifiers.evaluation</FONT><BR>Class ConfusionMatrix</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../weka/core/Matrix.html" title="class in weka.core">weka.core.Matrix</A> <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><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" title="class in weka.core">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><P><DL><DT><B>Version:</B></DT> <DD>$Revision: 1.5 $</DD><DT><B>Author:</B></DT> <DD>Len Trigg (len@reeltwo.com)</DD><DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#weka.classifiers.evaluation.ConfusionMatrix">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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" title="class in weka.classifiers.evaluation">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" title="class in weka.core">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" title="class in weka.classifiers.evaluation">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" title="class in weka.classifiers.evaluation">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" title="class in weka.classifiers">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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class weka.core.<A HREF="../../../weka/core/Matrix.html" title="class in weka.core">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#eigenvalueDecomposition(double[][], double[])">eigenvalueDecomposition</A>, <A HREF="../../../weka/core/Matrix.html#getColumn(int)">getColumn</A>, <A HREF="../../../weka/core/Matrix.html#getElement(int, int)">getElement</A>, <A HREF="../../../weka/core/Matrix.html#getL()">getL</A>, <A HREF="../../../weka/core/Matrix.html#getRow(int)">getRow</A>, <A HREF="../../../weka/core/Matrix.html#getU()">getU</A>, <A HREF="../../../weka/core/Matrix.html#isSymmetric()">isSymmetric</A>, <A HREF="../../../weka/core/Matrix.html#LUDecomposition()">LUDecomposition</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, double)">regression</A>, <A HREF="../../../weka/core/Matrix.html#regression(weka.core.Matrix, double[], 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#solve(double[])">solve</A>, <A HREF="../../../weka/core/Matrix.html#testEigen(weka.core.Matrix, double[], boolean)">testEigen</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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ConfusionMatrix(java.lang.String[])"><!-- --></A><H3>ConfusionMatrix</H3>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?