📄 optimization.html
字号:
<TD><CODE><B><A HREF="../../weka/core/Optimization.html#lnsrch(double[], double[], double[], double, boolean[], double[][], weka.core.Optimization.DynamicIntArray)">lnsrch</A></B>(double[] xold, double[] gradient, double[] direct, double stpmax, boolean[] isFixed, double[][] nwsBounds, weka.core.Optimization.DynamicIntArray wsBdsIndx)</CODE><BR> Find a new point x in the direction p from a point xold at which the value of the function has decreased sufficiently, the positive definiteness of B matrix (approximation of the inverse of the Hessian) is preserved and no bound constraints are violated.</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/Optimization.html#setDebug(boolean)">setDebug</A></B>(boolean db)</CODE><BR> Set whether in debug mode</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/Optimization.html#setMaxIteration(int)">setMaxIteration</A></B>(int it)</CODE><BR> Set the maximal number of iterations in searching (Default 200)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static double[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Optimization.html#solveTriangle(weka.core.Matrix, double[], boolean, boolean[])">solveTriangle</A></B>(<A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> t, double[] b, boolean isLower, boolean[] isZero)</CODE><BR> Solve the linear equation of TX=B where T is a triangle matrix It can be solved using back/forward substitution, with O(N^2) complexity</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, toString, 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="Optimization()"><!-- --></A><H3>Optimization</H3><PRE>public <B>Optimization</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getMinFunction()"><!-- --></A><H3>getMinFunction</H3><PRE>public double <B>getMinFunction</B>()</PRE><DL><DD>Get the minimal function value<P><DD><DL><DT><B>Returns:</B><DD>minimal function value found</DL></DD></DL><HR><A NAME="setMaxIteration(int)"><!-- --></A><H3>setMaxIteration</H3><PRE>public void <B>setMaxIteration</B>(int it)</PRE><DL><DD>Set the maximal number of iterations in searching (Default 200)<P><DD><DL><DT><B>Parameters:</B><DD><CODE>it</CODE> - the maximal number of iterations</DL></DD></DL><HR><A NAME="setDebug(boolean)"><!-- --></A><H3>setDebug</H3><PRE>public void <B>setDebug</B>(boolean db)</PRE><DL><DD>Set whether in debug mode<P><DD><DL><DT><B>Parameters:</B><DD><CODE>db</CODE> - use debug or not</DL></DD></DL><HR><A NAME="getVarbValues()"><!-- --></A><H3>getVarbValues</H3><PRE>public double[] <B>getVarbValues</B>()</PRE><DL><DD>Get the variable values. Only needed when iterations exceeds the max threshold.<P><DD><DL><DT><B>Returns:</B><DD>the current variable values</DL></DD></DL><HR><A NAME="lnsrch(double[], double[], double[], double, boolean[], double[][], weka.core.Optimization.DynamicIntArray)"><!-- --></A><H3>lnsrch</H3><PRE>public double[] <B>lnsrch</B>(double[] xold, double[] gradient, double[] direct, double stpmax, boolean[] isFixed, double[][] nwsBounds, weka.core.Optimization.DynamicIntArray wsBdsIndx) throws java.lang.Exception</PRE><DL><DD>Find a new point x in the direction p from a point xold at which the value of the function has decreased sufficiently, the positive definiteness of B matrix (approximation of the inverse of the Hessian) is preserved and no bound constraints are violated. Details see "Numerical Methods for Unconstrained Optimization and Nonlinear Equations". "Numeric Recipes in C" was also consulted.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xold</CODE> - old x value<DD><CODE>gradient</CODE> - gradient at that point<DD><CODE>direct</CODE> - direction vector<DD><CODE>stpmax</CODE> - maximum step length<DD><CODE>isFixed</CODE> - indicating whether a variable has been fixed<DD><CODE>nwsBounds</CODE> - non-working set bounds. Means these variables are free and subject to the bound constraints in this step<DD><CODE>wsBdsIndx</CODE> - index of variables that has working-set bounds. Means these variables are already fixed and no longer subject to the constraints<DT><B>Returns:</B><DD>new value along direction p from xold, null if no step was taken<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="findArgmin(double[], double[][])"><!-- --></A><H3>findArgmin</H3><PRE>public double[] <B>findArgmin</B>(double[] initX, double[][] constraints) throws java.lang.Exception</PRE><DL><DD>Main algorithm. Descriptions see "Practical Optimization"<P><DD><DL><DT><B>Parameters:</B><DD><CODE>initX</CODE> - initial point of x, assuming no value's on the bound!<DD><CODE>constraints</CODE> - the bound constraints of each variable constraints[0] is the lower bounds and constraints[1] is the upper bounds<DT><B>Returns:</B><DD>the solution of x, null if number of iterations not enough<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="solveTriangle(weka.core.Matrix, double[], boolean, boolean[])"><!-- --></A><H3>solveTriangle</H3><PRE>public static double[] <B>solveTriangle</B>(<A HREF="../../weka/core/Matrix.html" title="class in weka.core">Matrix</A> t, double[] b, boolean isLower, boolean[] isZero)</PRE><DL><DD>Solve the linear equation of TX=B where T is a triangle matrix It can be solved using back/forward substitution, with O(N^2) complexity<P><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the matrix T<DD><CODE>b</CODE> - the vector B<DD><CODE>isLower</CODE> - whether T is a lower or higher triangle matrix<DD><CODE>isZero</CODE> - which row(s) of T are not used when solving the equation. If it's null or all 'false', then every row is used.<DT><B>Returns:</B><DD>the solution of X</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=3 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> </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"> <A HREF="../../weka/core/Matrix.html" title="class in weka.core"><B>PREV CLASS</B></A> <A HREF="../../weka/core/Option.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" target="_top"><B>FRAMES</B></A> <A HREF="Optimization.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_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -