📄 attribute.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Attribute.html#lowerNumericBoundIsOpen()">lowerNumericBoundIsOpen</A></B>()</CODE><BR> Returns whether the lower numeric bound of the attribute is open.</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/Attribute.html#main(java.lang.String[])">main</A></B>(java.lang.String[] ops)</CODE><BR> Simple main method for testing this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Attribute.html#name()">name</A></B>()</CODE><BR> Returns the attribute's name.</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/Attribute.html#numValues()">numValues</A></B>()</CODE><BR> Returns the number of attribute values.</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/Attribute.html#ordering()">ordering</A></B>()</CODE><BR> Returns the ordering of the attribute.</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/Attribute.html#parseDate(java.lang.String)">parseDate</A></B>(java.lang.String string)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Attribute.html#toString()">toString</A></B>()</CODE><BR> Returns a description of this attribute in ARFF format.</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/Attribute.html#type()">type</A></B>()</CODE><BR> Returns the attribute's type as an integer.</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/Attribute.html#upperNumericBoundIsOpen()">upperNumericBoundIsOpen</A></B>()</CODE><BR> Returns whether the upper numeric bound of the attribute is open.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/Attribute.html#value(int)">value</A></B>(int valIndex)</CODE><BR> Returns a value of a nominal or string attribute.</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/Attribute.html#weight()">weight</A></B>()</CODE><BR> Returns the attribute's weight.</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>getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="NUMERIC"><!-- --></A><H3>NUMERIC</H3><PRE>public static final int <B>NUMERIC</B></PRE><DL><DD>Constant set for numeric attributes.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.NUMERIC">Constant Field Values</A></DL></DL><HR><A NAME="NOMINAL"><!-- --></A><H3>NOMINAL</H3><PRE>public static final int <B>NOMINAL</B></PRE><DL><DD>Constant set for nominal attributes.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.NOMINAL">Constant Field Values</A></DL></DL><HR><A NAME="STRING"><!-- --></A><H3>STRING</H3><PRE>public static final int <B>STRING</B></PRE><DL><DD>Constant set for attributes with string values.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.STRING">Constant Field Values</A></DL></DL><HR><A NAME="DATE"><!-- --></A><H3>DATE</H3><PRE>public static final int <B>DATE</B></PRE><DL><DD>Constant set for attributes with date values.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.DATE">Constant Field Values</A></DL></DL><HR><A NAME="ORDERING_SYMBOLIC"><!-- --></A><H3>ORDERING_SYMBOLIC</H3><PRE>public static final int <B>ORDERING_SYMBOLIC</B></PRE><DL><DD>Constant set for symbolic attributes.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.ORDERING_SYMBOLIC">Constant Field Values</A></DL></DL><HR><A NAME="ORDERING_ORDERED"><!-- --></A><H3>ORDERING_ORDERED</H3><PRE>public static final int <B>ORDERING_ORDERED</B></PRE><DL><DD>Constant set for ordered attributes.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.ORDERING_ORDERED">Constant Field Values</A></DL></DL><HR><A NAME="ORDERING_MODULO"><!-- --></A><H3>ORDERING_MODULO</H3><PRE>public static final int <B>ORDERING_MODULO</B></PRE><DL><DD>Constant set for modulo-ordered attributes.<P><DL><DT><B>See Also:</B><DD><A HREF="../../constant-values.html#weka.core.Attribute.ORDERING_MODULO">Constant Field Values</A></DL></DL><!-- ========= 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="Attribute(java.lang.String)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String attributeName)</PRE><DL><DD>Constructor for a numeric attribute.<P><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute</DL><HR><A NAME="Attribute(java.lang.String, weka.core.ProtectedProperties)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String attributeName, <A HREF="../../weka/core/ProtectedProperties.html" title="class in weka.core">ProtectedProperties</A> metadata)</PRE><DL><DD>Constructor for a numeric attribute, where metadata is supplied.<P><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute<DD><CODE>metadata</CODE> - the attribute's properties</DL><HR><A NAME="Attribute(java.lang.String, java.lang.String)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String attributeName, java.lang.String dateFormat)</PRE><DL><DD>Constructor for a date attribute.<P><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute<DD><CODE>dateFormat</CODE> - a string suitable for use with SimpleDateFormatter for parsing dates.</DL><HR><A NAME="Attribute(java.lang.String, java.lang.String, weka.core.ProtectedProperties)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String attributeName, java.lang.String dateFormat, <A HREF="../../weka/core/ProtectedProperties.html" title="class in weka.core">ProtectedProperties</A> metadata)</PRE><DL><DD>Constructor for a date attribute, where metadata is supplied.<P><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute<DD><CODE>dateFormat</CODE> - a string suitable for use with SimpleDateFormatter for parsing dates.<DD><CODE>metadata</CODE> - the attribute's properties</DL><HR><A NAME="Attribute(java.lang.String, weka.core.FastVector)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String attributeName, <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> attributeValues)</PRE><DL><DD>Constructor for nominal attributes and string attributes. If a null vector of attribute values is passed to the method, the attribute is assumed to be a string.<P><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute<DD><CODE>attributeValues</CODE> - a vector of strings denoting the attribute values. Null if the attribute is a string attribute.</DL><HR><A NAME="Attribute(java.lang.String, weka.core.FastVector, weka.core.ProtectedProperties)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String attributeName, <A HREF="../../weka/core/FastVector.html" title="class in weka.core">FastVector</A> attributeValues, <A HREF="../../weka/core/ProtectedProperties.html" title="class in weka.core">ProtectedProperties</A> metadata)</PRE><DL><DD>Constructor for nominal attributes and string attributes, where metadata is supplied. If a null vector of attribute values is passed to the method, the attribute is assumed to be a string.<P><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute<DD><CODE>attributeValues</CODE> - a vector of strings denoting the attribute values. Null if the attribute is a string attribute.<DD><CODE>metadata</CODE> - the attribute's properties</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="copy()"><!-- --></A><H3>copy</H3><PRE>public java.lang.Object <B>copy</B>()</PRE><DL><DD>Produces a shallow copy of this attribute.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../weka/core/Copyable.html#copy()">copy</A></CODE> in interface <CODE><A HREF="../../weka/core/Copyable.html" title="interface in weka.core">Copyable</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a copy of this attribute with the same index</DL></DD></DL><HR><A NAME="enumerateValues()"><!-- --></A><H3>enumerateValues</H3><PRE>public final java.util.Enumeration <B>enumerateValues</B>()</PRE><DL><DD>Returns an enumeration of all the attribute's values if the attribute is nominal or a string, null otherwise.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>enumeration of all the attribute's values</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public final boolean <B>equals</B>(java.lang.Object other)</PRE><DL><DD>Tests if given attribute is equal to this attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>other</CODE> - the Object to be compared to this attribute<DT><B>Returns:</B><DD>true if the given attribute is equal to this attribute</DL></DD></DL><HR><A NAME="index()"><!-- --></A><H3>index</H3><PRE>public final int <B>index</B>()</PRE><DL><DD>Returns the index of this attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the index of this attribute</DL></DD></DL><HR><A NAME="indexOfValue(java.lang.String)"><!-- --></A><H3>indexOfValue</H3><PRE>public final int <B>indexOfValue</B>(java.lang.String value)</PRE><DL><DD>Returns the index of a given attribute value. (The index of the first occurence of this value.)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the value for which the index is to be returned<DT><B>Returns:</B><DD>the index of the given attribute value if attribute is nominal or a string, -1 if it is numeric or the value can't be found</DL></DD></DL><HR><A NAME="isNominal()"><!-- --></A><H3>isNominal</H3><PRE>public final boolean <B>isNominal</B>()</PRE><DL><DD>Test if the attribute is nominal.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the attribute is nominal</DL></DD></DL><HR><A NAME="isNumeric()"><!-- --></A><H3>isNumeric</H3><PRE>public final boolean <B>isNumeric</B>()</PRE><DL><DD>Tests if the attribute is numeric.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the attribute is numeric</DL></DD></DL><HR><A NAME="isString()"><!-- --></A><H3>isString</H3><PRE>public final boolean <B>isString</B>()</PRE><DL><DD>Tests if the attribute is a string.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the attribute is a string</DL></DD></DL><HR><A NAME="isDate()"><!-- --></A><H3>isDate</H3><PRE>public final boolean <B>isDate</B>()</PRE><DL><DD>Tests if the attribute is a date type.<P><DD><DL></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -