📄 attribute.html
字号:
<A NAME="addStringValue(java.lang.String)"><!-- --></A><H3>addStringValue</H3><PRE>public int <B>addStringValue</B>(java.lang.String value)</PRE><DL><DD>Adds a string value to the list of valid strings for attributes of type STRING and returns the index of the string.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - The string value to add<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="addStringValue(weka.core.Attribute, int)"><!-- --></A><H3>addStringValue</H3><PRE>public int <B>addStringValue</B>(<A HREF="../../weka/core/Attribute.html" title="class in weka.core">Attribute</A> src, int index)</PRE><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> 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 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 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 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 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 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="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] 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> </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/AllJavadoc.html" title="class in weka.core"><B>PREV CLASS</B></A> <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> <A HREF="Attribute.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 | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <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 + -