📄 matrix.html
字号:
<!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.5.0_10) on Fri Jan 26 16:34:49 NZDT 2007 --><TITLE>Matrix</TITLE><META NAME="keywords" CONTENT="weka.core.Matrix class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Matrix";}</SCRIPT><NOSCRIPT></NOSCRIPT></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=2 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="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/core/MathematicalExpression.TreeNode.html" title="class in weka.core"><B>PREV CLASS</B></A> <A HREF="../../weka/core/Memory.html" title="class in weka.core"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?weka/core/Matrix.html" target="_top"><B>FRAMES</B></A> <A HREF="Matrix.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.core</FONT><BR>Class Matrix</H2><PRE>java.lang.Object <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>weka.core.Matrix</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable</DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../weka/classifiers/evaluation/ConfusionMatrix.html" title="class in weka.classifiers.evaluation">ConfusionMatrix</A></DD></DL><HR><B>Deprecated.</B> <I>Use instead <code>weka.core.matrix.Matrix</code> - only for backwards compatibility.</I><P><DL><DT><PRE>public class <B>Matrix</B><DT>extends java.lang.Object<DT>implements java.lang.Cloneable, java.io.Serializable</DL></PRE><P>Class for performing operations on a matrix of floating-point values. <p/> Deprecated: Uses internally the code of the sub-package <code>weka.core.matrix</code> - only for backwards compatibility.<P><P><DL><DT><B>Version:</B></DT> <DD>$Revision: 1.22 $</DD><DT><B>Author:</B></DT> <DD>Gabi Schmidberger (gabi@cs.waikato.ac.nz), Yong Wang (yongwang@cs.waikato.ac.nz), Eibe Frank (eibe@cs.waikato.ac.nz), Len Trigg (eibe@cs.waikato.ac.nz), Fracpete (fracpete at waikato dot ac dot nz)</DD><DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#weka.core.Matrix">Serialized Form</A></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/core/Matrix.html#Matrix(double[][])">Matrix</A></B>(double[][] array)</CODE><BR> <B>Deprecated.</B> Constructs a matrix using a given array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/core/Matrix.html#Matrix(int, int)">Matrix</A></B>(int nr, int nc)</CODE><BR> <B>Deprecated.</B> Constructs a matrix and initializes it with default values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/core/Matrix.html#Matrix(java.io.Reader)">Matrix</A></B>(java.io.Reader r)</CODE><BR> <B>Deprecated.</B> Reads a matrix from a reader.</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"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#add(weka.core.Matrix)">add</A></B>(<A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> other)</CODE><BR> <B>Deprecated.</B> Returns the sum of this matrix with another.</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/core/Matrix.html#addElement(int, int, double)">addElement</A></B>(int rowIndex, int columnIndex, double value)</CODE><BR> <B>Deprecated.</B> Add a value to an element.</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/core/Matrix.html#clone()">clone</A></B>()</CODE><BR> <B>Deprecated.</B> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#eigenvalueDecomposition(double[][], double[])">eigenvalueDecomposition</A></B>(double[][] V, double[] d)</CODE><BR> <B>Deprecated.</B> Performs Eigenvalue Decomposition using Householder QR Factorization Matrix must be symmetrical.</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/core/Matrix.html#getColumn(int)">getColumn</A></B>(int index)</CODE><BR> <B>Deprecated.</B> Gets a column of the matrix and returns it as a double array.</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/core/Matrix.html#getElement(int, int)">getElement</A></B>(int rowIndex, int columnIndex)</CODE><BR> <B>Deprecated.</B> Returns the value of a cell in the matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#getL()">getL</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the L part of the 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/core/Matrix.html#getRow(int)">getRow</A></B>(int index)</CODE><BR> <B>Deprecated.</B> Gets a row of the matrix and returns it as double array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#getU()">getU</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the U part of the matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#isSymmetric()">isSymmetric</A></B>()</CODE><BR> <B>Deprecated.</B> Returns true if the matrix is symmetric.</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/core/Matrix.html#LUDecomposition()">LUDecomposition</A></B>()</CODE><BR> <B>Deprecated.</B> Performs a LUDecomposition on the matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#main(java.lang.String[])">main</A></B>(java.lang.String[] ops)</CODE><BR> <B>Deprecated.</B> Main method for testing this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#multiply(weka.core.Matrix)">multiply</A></B>(<A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> b)</CODE><BR> <B>Deprecated.</B> Returns the multiplication of two matrices</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/core/Matrix.html#numColumns()">numColumns</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the number of columns in the matrix.</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/core/Matrix.html#numRows()">numRows</A></B>()</CODE><BR> <B>Deprecated.</B> Returns the number of rows in the matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Matrix.html#parseMatlab(java.lang.String)">parseMatlab</A></B>(java.lang.String matlab)</CODE><BR> <B>Deprecated.</B> creates a matrix from the given Matlab string.</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/core/Matrix.html#regression(weka.core.Matrix, double)">regression</A></B>(<A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> y, double ridge)</CODE><BR> <B>Deprecated.</B> Performs a (ridged) linear regression.</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/core/Matrix.html#regression(weka.core.Matrix, double[], double)">regression</A></B>(<A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> y, double[] w, double ridge)</CODE><BR> <B>Deprecated.</B> Performs a weighted (ridged) linear regression.</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/core/Matrix.html#setColumn(int, double[])">setColumn</A></B>(int index, double[] newColumn)</CODE><BR> <B>Deprecated.</B> Sets a column of the matrix to the given column.</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/core/Matrix.html#setElement(int, int, double)">setElement</A></B>(int rowIndex, int columnIndex, double value)</CODE><BR> <B>Deprecated.</B> Sets an element of the matrix to the given value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -