attribute.html

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

HTML
1,842
字号
<DL><DD>Adds a string value to the list of valid strings for attributes of type STRING and returns the index of the string. This method is more efficient than addStringValue(String) for long strings.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - The Attribute containing the string value to add.<DD><CODE>index</CODE> - the index of the string value in the source attribute.<DT><B>Returns:</B><DD>the index assigned to the string, or -1 if the attribute is not of type Attribute.STRING</DL></DD></DL><HR><A NAME="addRelation(weka.core.Instances)"><!-- --></A><H3>addRelation</H3><PRE>public int <B>addRelation</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;value)</PRE><DL><DD>Adds a relation to a relation-valued attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - The value to add<DT><B>Returns:</B><DD>the index assigned to the value, or -1 if the attribute is not of type Attribute.RELATIONAL</DL></DD></DL><HR><A NAME="copy(java.lang.String)"><!-- --></A><H3>copy</H3><PRE>public final <A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> <B>copy</B>(java.lang.String&nbsp;newName)</PRE><DL><DD>Produces a shallow copy of this attribute with a new name.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newName</CODE> - the name of the new attribute<DT><B>Returns:</B><DD>a copy of this attribute with the same index</DL></DD></DL><HR><A NAME="formatDate(double)"><!-- --></A><H3>formatDate</H3><PRE>public java.lang.String <B>formatDate</B>(double&nbsp;date)</PRE><DL><DD>Returns the given amount of milliseconds formatted according to the current Date format.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>date</CODE> - the date, represented in milliseconds since                         January 1, 1970, 00:00:00 GMT, to return as string<DT><B>Returns:</B><DD>the formatted date</DL></DD></DL><HR><A NAME="parseDate(java.lang.String)"><!-- --></A><H3>parseDate</H3><PRE>public double <B>parseDate</B>(java.lang.String&nbsp;string)                 throws java.text.ParseException</PRE><DL><DD>Parses the given String as Date, according to the current format and returns the corresponding amount of milliseconds.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>string</CODE> - the date to parse<DT><B>Returns:</B><DD>the date in milliseconds since January 1, 1970, 00:00:00 GMT<DT><B>Throws:</B><DD><CODE>java.text.ParseException</CODE> - if parsing fails</DL></DD></DL><HR><A NAME="getMetadata()"><!-- --></A><H3>getMetadata</H3><PRE>public final <A HREF="../../weka/core/ProtectedProperties.html" title="class in weka.core">ProtectedProperties</A> <B>getMetadata</B>()</PRE><DL><DD>Returns the properties supplied for this attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>metadata for this attribute</DL></DD></DL><HR><A NAME="ordering()"><!-- --></A><H3>ordering</H3><PRE>public final int <B>ordering</B>()</PRE><DL><DD>Returns the ordering of the attribute. One of the following:  ORDERING_SYMBOLIC - attribute values should be treated as symbols. ORDERING_ORDERED  - attribute values have a global ordering. ORDERING_MODULO   - attribute values have an ordering which wraps.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the ordering type of the attribute</DL></DD></DL><HR><A NAME="isRegular()"><!-- --></A><H3>isRegular</H3><PRE>public final boolean <B>isRegular</B>()</PRE><DL><DD>Returns whether the attribute values are equally spaced.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the attribute is regular or not</DL></DD></DL><HR><A NAME="isAveragable()"><!-- --></A><H3>isAveragable</H3><PRE>public final boolean <B>isAveragable</B>()</PRE><DL><DD>Returns whether the attribute can be averaged meaningfully.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the attribute can be averaged or not</DL></DD></DL><HR><A NAME="hasZeropoint()"><!-- --></A><H3>hasZeropoint</H3><PRE>public final boolean <B>hasZeropoint</B>()</PRE><DL><DD>Returns whether the attribute has a zeropoint and may be added meaningfully.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the attribute has a zeropoint or not</DL></DD></DL><HR><A NAME="weight()"><!-- --></A><H3>weight</H3><PRE>public final double <B>weight</B>()</PRE><DL><DD>Returns the attribute's weight.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the attribute's weight as a double</DL></DD></DL><HR><A NAME="setWeight(double)"><!-- --></A><H3>setWeight</H3><PRE>public void <B>setWeight</B>(double&nbsp;value)</PRE><DL><DD>Sets the new attribute's weight<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the new weight</DL></DD></DL><HR><A NAME="getLowerNumericBound()"><!-- --></A><H3>getLowerNumericBound</H3><PRE>public final double <B>getLowerNumericBound</B>()</PRE><DL><DD>Returns the lower bound of a numeric attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the lower bound of the specified numeric range</DL></DD></DL><HR><A NAME="lowerNumericBoundIsOpen()"><!-- --></A><H3>lowerNumericBoundIsOpen</H3><PRE>public final boolean <B>lowerNumericBoundIsOpen</B>()</PRE><DL><DD>Returns whether the lower numeric bound of the attribute is open.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the lower numeric bound is open or not (closed)</DL></DD></DL><HR><A NAME="getUpperNumericBound()"><!-- --></A><H3>getUpperNumericBound</H3><PRE>public final double <B>getUpperNumericBound</B>()</PRE><DL><DD>Returns the upper bound of a numeric attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the upper bound of the specified numeric range</DL></DD></DL><HR><A NAME="upperNumericBoundIsOpen()"><!-- --></A><H3>upperNumericBoundIsOpen</H3><PRE>public final boolean <B>upperNumericBoundIsOpen</B>()</PRE><DL><DD>Returns whether the upper numeric bound of the attribute is open.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the upper numeric bound is open or not (closed)</DL></DD></DL><HR><A NAME="isInRange(double)"><!-- --></A><H3>isInRange</H3><PRE>public final boolean <B>isInRange</B>(double&nbsp;value)</PRE><DL><DD>Determines whether a value lies within the bounds of the attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to check<DT><B>Returns:</B><DD>whether the value is in range</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><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>Simple main method for testing this class.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ops</CODE> - the commandline options</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/core/AllJavadoc.html" title="class in weka.core"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../weka/core/AttributeExpression.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/Attribute.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Attribute.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="te

⌨️ 快捷键说明

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