costmatrix.html

来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 923 行 · 第 1/3 页

HTML
923
字号
<DD>Gets the maximum cost for a particular class value.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>classVal</CODE> - the class value.<DT><B>Returns:</B><DD>the maximum cost.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if cost matrix contains non-fixed costs</DL></DD></DL><HR><A NAME="normalize()"><!-- --></A><H3>normalize</H3><PRE>public void <B>normalize</B>()</PRE><DL><DD>Normalizes the matrix so that the diagonal contains zeros.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="readOldFormat(java.io.Reader)"><!-- --></A><H3>readOldFormat</H3><PRE>public void <B>readOldFormat</B>(java.io.Reader&nbsp;reader)                   throws java.lang.Exception</PRE><DL><DD>Loads a cost matrix in the old format from a reader. Adapted from code once sitting  in Instances.java<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the reader to get the values from.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the matrix cannot be read correctly.</DL></DD></DL><HR><A NAME="write(java.io.Writer)"><!-- --></A><H3>write</H3><PRE>public void <B>write</B>(java.io.Writer&nbsp;w)           throws java.lang.Exception</PRE><DL><DD>Writes out a matrix. The format can be read via the  CostMatrix(Reader) constructor. (FracPete: taken from old weka.core.Matrix class)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>w</CODE> - the output Writer<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="toMatlab()"><!-- --></A><H3>toMatlab</H3><PRE>public java.lang.String <B>toMatlab</B>()</PRE><DL><DD>converts the Matrix into a single line Matlab string: matrix is enclosed  by parentheses, rows are separated by semicolon and single cells by blanks, e.g., [1 2; 3 4].<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the matrix in Matlab single line format</DL></DD></DL><HR><A NAME="setCell(int, int, java.lang.Object)"><!-- --></A><H3>setCell</H3><PRE>public final void <B>setCell</B>(int&nbsp;rowIndex,                          int&nbsp;columnIndex,                          java.lang.Object&nbsp;value)</PRE><DL><DD>Set the value of a particular cell in the matrix<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row<DD><CODE>columnIndex</CODE> - the column<DD><CODE>value</CODE> - the value to set</DL></DD></DL><HR><A NAME="getCell(int, int)"><!-- --></A><H3>getCell</H3><PRE>public final java.lang.Object <B>getCell</B>(int&nbsp;rowIndex,                                      int&nbsp;columnIndex)</PRE><DL><DD>Return the contents of a particular cell. Note: this method returns the Object stored at a particular cell.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row<DD><CODE>columnIndex</CODE> - the column<DT><B>Returns:</B><DD>the value at the cell</DL></DD></DL><HR><A NAME="getElement(int, int)"><!-- --></A><H3>getElement</H3><PRE>public final double <B>getElement</B>(int&nbsp;rowIndex,                               int&nbsp;columnIndex)                        throws java.lang.Exception</PRE><DL><DD>Return the value of a cell as a double (for legacy code)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row<DD><CODE>columnIndex</CODE> - the column<DT><B>Returns:</B><DD>the value at a particular cell as a double<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the value is not a double</DL></DD></DL><HR><A NAME="getElement(int, int, weka.core.Instance)"><!-- --></A><H3>getElement</H3><PRE>public final double <B>getElement</B>(int&nbsp;rowIndex,                               int&nbsp;columnIndex,                               <A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;inst)                        throws java.lang.Exception</PRE><DL><DD>Return the value of a cell as a double. Computes the value for non-fixed costs using the supplied Instance<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row<DD><CODE>columnIndex</CODE> - the column<DT><B>Returns:</B><DD>the value from a particular cell<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="setElement(int, int, double)"><!-- --></A><H3>setElement</H3><PRE>public final void <B>setElement</B>(int&nbsp;rowIndex,                             int&nbsp;columnIndex,                             double&nbsp;value)</PRE><DL><DD>Set the value of a cell as a double<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row<DD><CODE>columnIndex</CODE> - the column<DD><CODE>value</CODE> - the value (double) to set</DL></DD></DL><HR><A NAME="parseMatlab(java.lang.String)"><!-- --></A><H3>parseMatlab</H3><PRE>public static <A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> <B>parseMatlab</B>(java.lang.String&nbsp;matlab)                          throws java.lang.Exception</PRE><DL><DD>creates a matrix from the given Matlab string.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>matlab</CODE> - the matrix in matlab format<DT><B>Returns:</B><DD>the matrix represented by the given string<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Converts a matrix to a string. (FracPete: taken from old weka.core.Matrix class)<P><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>the converted string</DL></DD></DL><HR><A NAME="getRevision()"><!-- --></A><H3>getRevision</H3><PRE>public java.lang.String <B>getRevision</B>()</PRE><DL><DD>Returns the revision string.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../weka/core/RevisionHandler.html#getRevision()">getRevision</A></CODE> in interface <CODE><A HREF="../../weka/core/RevisionHandler.html" title="interface in weka.core">RevisionHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the revision</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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>&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> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/" target="_blank"><FONT CLASS="NavBarFont1"><B>Weka's home</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;<A HREF="../../weka/classifiers/Classifier.html" title="class in weka.classifiers"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../weka/classifiers/EnsembleLibrary.html" title="class in weka.classifiers"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?weka/classifiers/CostMatrix.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="CostMatrix.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?