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

📄 matrix.html

📁 这是一个由java实现的数据挖掘
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<HR><A NAME="Matrix(java.io.Reader)"><!-- --></A><H3>Matrix</H3><PRE>public <B>Matrix</B>(java.io.Reader&nbsp;r)       throws java.lang.Exception</PRE><DL><DD>Reads a matrix from a reader. The first line in the file should contain the number of rows and columns. Subsequent lines contain elements of the matrix.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the reader containing the matrix<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</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="clone()"><!-- --></A><H3>clone</H3><PRE>public java.lang.Object <B>clone</B>()                       throws java.lang.CloneNotSupportedException</PRE><DL><DD>Creates and returns a clone of this object.<DD><DL><DT><B>Overrides:</B><DD><CODE>clone</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a clone of this instance.<DT><B>Throws:</B><DD><CODE>java.lang.CloneNotSupportedException</CODE> - if an error occurs</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<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="initialize()"><!-- --></A><H3>initialize</H3><PRE>protected void <B>initialize</B>()</PRE><DL><DD>Resets the elements to default values (i.e. 0).<DD><DL></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)</PRE><DL><DD>Returns the value of a cell in the matrix.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row's index<DD><CODE>columnIndex</CODE> - the column's index<DT><B>Returns:</B><DD>the value</DL></DD></DL><HR><A NAME="addElement(int, int, double)"><!-- --></A><H3>addElement</H3><PRE>public final void <B>addElement</B>(int&nbsp;rowIndex,                             int&nbsp;columnIndex,                             double&nbsp;value)</PRE><DL><DD>Add a value to an element.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row's index.<DD><CODE>columnIndex</CODE> - the column's index.<DD><CODE>value</CODE> - the value to add.</DL></DD></DL><HR><A NAME="numRows()"><!-- --></A><H3>numRows</H3><PRE>public final int <B>numRows</B>()</PRE><DL><DD>Returns the number of rows in the matrix.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of rows</DL></DD></DL><HR><A NAME="numColumns()"><!-- --></A><H3>numColumns</H3><PRE>public final int <B>numColumns</B>()</PRE><DL><DD>Returns the number of columns in the matrix.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of columns</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>Sets an element of the matrix to the given value.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rowIndex</CODE> - the row's index<DD><CODE>columnIndex</CODE> - the column's index<DD><CODE>value</CODE> - the value</DL></DD></DL><HR><A NAME="setRow(int, double[])"><!-- --></A><H3>setRow</H3><PRE>public final void <B>setRow</B>(int&nbsp;index,                         double[]&nbsp;newRow)</PRE><DL><DD>Sets a row of the matrix to the given row. Performs a deep copy.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the row's index<DD><CODE>newRow</CODE> - an array of doubles</DL></DD></DL><HR><A NAME="setColumn(int, double[])"><!-- --></A><H3>setColumn</H3><PRE>public final void <B>setColumn</B>(int&nbsp;index,                            double[]&nbsp;newColumn)</PRE><DL><DD>Sets a column of the matrix to the given column. Performs a deep copy.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the column's index<DD><CODE>newColumn</CODE> - an array of doubles</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<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="add(weka.core.Matrix)"><!-- --></A><H3>add</H3><PRE>public final <A HREF="../../weka/core/Matrix.html">Matrix</A> <B>add</B>(<A HREF="../../weka/core/Matrix.html">Matrix</A>&nbsp;other)</PRE><DL><DD>Returns the sum of this matrix with another.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the sum.</DL></DD></DL><HR><A NAME="transpose()"><!-- --></A><H3>transpose</H3><PRE>public final <A HREF="../../weka/core/Matrix.html">Matrix</A> <B>transpose</B>()</PRE><DL><DD>Returns the transpose of a matrix.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the transposition of this instance).</DL></DD></DL><HR><A NAME="multiply(weka.core.Matrix)"><!-- --></A><H3>multiply</H3><PRE>public final <A HREF="../../weka/core/Matrix.html">Matrix</A> <B>multiply</B>(<A HREF="../../weka/core/Matrix.html">Matrix</A>&nbsp;b)</PRE><DL><DD>Reurns the multiplication of two matrices<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>b</CODE> - the multiplication matrix<DT><B>Returns:</B><DD>the product matrix</DL></DD></DL><HR><A NAME="regression(weka.core.Matrix)"><!-- --></A><H3>regression</H3><PRE>public final double[] <B>regression</B>(<A HREF="../../weka/core/Matrix.html">Matrix</A>&nbsp;y)</PRE><DL><DD>Performs a (ridged) linear regression.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>y</CODE> - the dependent variable vector<DT><B>Returns:</B><DD>the coefficients<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if not successful</DL></DD></DL><HR><A NAME="regression(weka.core.Matrix, double[])"><!-- --></A><H3>regression</H3><PRE>public final double[] <B>regression</B>(<A HREF="../../weka/core/Matrix.html">Matrix</A>&nbsp;y,                                 double[]&nbsp;w)</PRE><DL><DD>Performs a weighted (ridged) linear regression.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>y</CODE> - the dependent variable vector<DD><CODE>w</CODE> - the array of data point weights<DT><B>Returns:</B><DD>the coefficients<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the wrong number of weights were provided.</DL></DD></DL><HR><A NAME="lubksb(int[], double[])"><!-- --></A><H3>lubksb</H3><PRE>public final void <B>lubksb</B>(int[]&nbsp;indx,                         double[]&nbsp;b)</PRE><DL><DD>Performs LU backward substitution.  Adapted from Numerical Recipes in C.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>indx</CODE> - the indices of the permutation<DD><CODE>b</CODE> - the double vector, storing constant terms in the equation set;  it later stores the computed coefficients' values</DL></DD></DL><HR><A NAME="ludcmp()"><!-- --></A><H3>ludcmp</H3><PRE>public final int[] <B>ludcmp</B>()                   throws java.lang.Exception</PRE><DL><DD>Performs LU decomposition. Adapted from Numerical Recipes in C.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the indices of the permutation<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the matrix is singular</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[]&nbsp;ops)</PRE><DL><DD>Main method for testing this class.<DD><DL></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>&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;<A HREF="../../weka/core/Instances.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../weka/core/Option.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="Matrix.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></BODY></HTML>

⌨️ 快捷键说明

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