⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 confusionmatrix.html

📁 < 数据挖掘--实用机器学习技术及java实现> 一书结合数据挖掘和机器学习的知识,作者陈述了自动挖掘模式的基础理论,并且以java语言实现了具有代表性的各类数据挖掘方法.例如:class
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<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>  &nbsp;&nbsp;<A HREF="ConfusionMatrix.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 &nbsp;java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#m_ClassNames">m_ClassNames</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stores the names of the classes</TD></TR></TABLE>&nbsp;<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>&nbsp;<!-- ======== 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[]&nbsp;classNames)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates the confusion matrix with the given class names.</TD></TR></TABLE>&nbsp;<!-- ========== 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>&nbsp;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>&nbsp;pred)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;predictions)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#className(int)">className</A></B>(int&nbsp;index)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#clone()">clone</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#correct()">correct</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#errorRate()">errorRate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the estimated error rate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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&nbsp;classIndex)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#incorrect()">incorrect</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>&nbsp;costs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#size()">size</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the number of classes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calls toString() with a default title.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;title)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/classifiers/evaluation/ConfusionMatrix.html#total()">total</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>&nbsp;<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 + -