📄 m5utils.html
字号:
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="M5Utils()"><!-- --></A><H3>M5Utils</H3><PRE>public <B>M5Utils</B>()</PRE><DL></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="hasEnumAttr(weka.core.Instances)"><!-- --></A><H3>hasEnumAttr</H3><PRE>public static final boolean <B>hasEnumAttr</B>(<A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Tests if enumerated attribute(s) exists in the instances<DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>true if there is at least one; false if none</DL></DD></DL><HR><A NAME="hasMissing(weka.core.Instances)"><!-- --></A><H3>hasMissing</H3><PRE>public static final boolean <B>hasMissing</B>(<A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Tests if missing value(s) exists in the instances<DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>true if there is missing value(s); false if none</DL></DD></DL><HR><A NAME="sum(int, weka.core.Instances)"><!-- --></A><H3>sum</H3><PRE>public static final double <B>sum</B>(int attr, <A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Returns the sum of the instances values of an attribute<DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - an attribute<DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>the sum value</DL></DD></DL><HR><A NAME="sqrSum(int, weka.core.Instances)"><!-- --></A><H3>sqrSum</H3><PRE>public static final double <B>sqrSum</B>(int attr, <A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Returns the squared sum of the instances values of an attribute<DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - an attribute<DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>the squared sum value</DL></DD></DL><HR><A NAME="stdDev(int, weka.core.Instances)"><!-- --></A><H3>stdDev</H3><PRE>public static final double <B>stdDev</B>(int attr, <A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Returns the standard deviation value of the instances values of an attribute<DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - an attribute<DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>the standard deviation value</DL></DD></DL><HR><A NAME="absDev(int, weka.core.Instances)"><!-- --></A><H3>absDev</H3><PRE>public static final double <B>absDev</B>(int attr, <A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Returns the absolute deviation value of the instances values of an attribute<DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - an attribute<DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>the absolute deviation value</DL></DD></DL><HR><A NAME="variance(int, weka.core.Instances)"><!-- --></A><H3>variance</H3><PRE>public static final double <B>variance</B>(int attr, <A HREF="../../../weka/core/Instances.html">Instances</A> inst)</PRE><DL><DD>Returns the variance value of the instances values of an attribute<DD><DL><DT><B>Parameters:</B><DD><CODE>attr</CODE> - an attribute<DD><CODE>inst</CODE> - instances<DT><B>Returns:</B><DD>the variance value</DL></DD></DL><HR><A NAME="roundDouble(double)"><!-- --></A><H3>roundDouble</H3><PRE>public static final long <B>roundDouble</B>(double value)</PRE><DL><DD>Rounds a double<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the double value<DT><B>Returns:</B><DD>the double rounded</DL></DD></DL><HR><A NAME="floorDouble(double)"><!-- --></A><H3>floorDouble</H3><PRE>public static final long <B>floorDouble</B>(double value)</PRE><DL><DD>Returns the largest (closest to positive infinity) long integer value that is not greater than the argument.<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the double value<DT><B>Returns:</B><DD>the floor integer</DL></DD></DL><HR><A NAME="doubleToStringF(double, int, int)"><!-- --></A><H3>doubleToStringF</H3><PRE>public static final java.lang.String <B>doubleToStringF</B>(double value, int width, int afterDecimalPoint)</PRE><DL><DD>Rounds a double and converts it into a formatted right-justified String. It is like %f format in C language.<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the double value<DD><CODE>width</CODE> - the width of the string<DD><CODE>afterDecimalPoint</CODE> - the number of digits after the decimal point<DT><B>Returns:</B><DD>the double as a formatted string</DL></DD></DL><HR><A NAME="doubleToStringG(double, int, int)"><!-- --></A><H3>doubleToStringG</H3><PRE>public static final java.lang.String <B>doubleToStringG</B>(double value, int width, int precision)</PRE><DL><DD>Rounds a double and converts it into a formatted right-justified String. If the double is not equal to zero and not in the range [10e-3,10e7] it is returned in scientific format. It is like %g format in C language.<DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the double value<DD><CODE>width</CODE> - the width of the string<DD><CODE>precision</CODE> - the number of valid digits<DT><B>Returns:</B><DD>the double as a formatted string</DL></DD></DL><HR><A NAME="deleteTrailingZerosAndDot(java.lang.StringBuffer)"><!-- --></A><H3>deleteTrailingZerosAndDot</H3><PRE>public static final java.lang.StringBuffer <B>deleteTrailingZerosAndDot</B>(java.lang.StringBuffer stringBuffer)</PRE><DL><DD>Deletes the trailing zeros and decimal point in a stringBuffer<DD><DL><DT><B>Parameters:</B><DD><CODE>stringBuffer</CODE> - string buffer return string buffer with deleted trailing zeros and decimal point</DL></DD></DL><HR><A NAME="smoothenValue(double, double, int, int)"><!-- --></A><H3>smoothenValue</H3><PRE>public static final double <B>smoothenValue</B>(double p, double q, int n, int k)</PRE><DL><DD>Returns the smoothed values according to the smoothing formula (np+kq)/(n+k)<DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - a double, normally is the prediction of the model at the current node<DD><CODE>q</CODE> - a double, normally is the prediction of the model at the up node<DD><CODE>n</CODE> - the number of instances at the up node<DD><CODE>k</CODE> - the smoothing constance, default =15<DT><B>Returns:</B><DD>the smoothed value</DL></DD></DL><HR><A NAME="correlation(double[], double[], int)"><!-- --></A><H3>correlation</H3><PRE>public static final double <B>correlation</B>(double[] y1, double[] y2, int n)</PRE><DL><DD>Returns the correlation coefficient of two double vectors<DD><DL><DT><B>Parameters:</B><DD><CODE>y1</CODE> - double vector 1<DD><CODE>y2</CODE> - double vector 2<DD><CODE>n</CODE> - the length of two double vectors<DT><B>Returns:</B><DD>the correlation coefficient</DL></DD></DL><HR><A NAME="eqDouble(double, double)"><!-- --></A><H3>eqDouble</H3><PRE>public static final boolean <B>eqDouble</B>(double a, double b)</PRE><DL><DD>Tests if two double values are equal to each other<DD><DL><DT><B>Parameters:</B><DD><CODE>a</CODE> - double 1<DD><CODE>b</CODE> - double 2<DT><B>Returns:</B><DD>true if equal; false if not equal</DL></DD></DL><HR><A NAME="errorMsg(java.lang.String)"><!-- --></A><H3>errorMsg</H3><PRE>public static final void <B>errorMsg</B>(java.lang.String err)</PRE><DL><DD>Prints error message and exits<DD><DL><DT><B>Parameters:</B><DD><CODE>err</CODE> - error message</DL></DD></DL><HR><A NAME="separatorToString()"><!-- --></A><H3>separatorToString</H3><PRE>public static final java.lang.String <B>separatorToString</B>()</PRE><DL><DD>Prints sepearating line</DL><HR><A NAME="headToString()"><!-- --></A><H3>headToString</H3><PRE>public static final java.lang.String <B>headToString</B>()</PRE><DL><DD>Prints the head lines of the output</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> </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> </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/classifiers/m5/M5Prime.html"><B>PREV CLASS</B></A> <A HREF="../../../weka/classifiers/m5/Matrix.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> <A HREF="M5Utils.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | 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><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -