attribute.html

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

HTML
1,842
字号
</DL><HR><A NAME="Attribute(java.lang.String, weka.core.Instances, int)"><!-- --></A><H3>Attribute</H3><PRE>public <B>Attribute</B>(java.lang.String&nbsp;attributeName,                 <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;header,                 int&nbsp;index)</PRE><DL><DD>Constructor for a relation-valued attribute with a particular index.<P><DL><DT><B>Parameters:</B><DD><CODE>attributeName</CODE> - the name for the attribute<DD><CODE>header</CODE> - the header information for this attribute<DD><CODE>index</CODE> - the attribute's index</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></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, string, or relation-valued, 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&nbsp;other)</PRE><DL><DD>Tests if given attribute is equal to this attribute.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>equals</CODE> in class <CODE>java.lang.Object</CODE></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&nbsp;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 not 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="isRelationValued()"><!-- --></A><H3>isRelationValued</H3><PRE>public final boolean <B>isRelationValued</B>()</PRE><DL><DD>Tests if the attribute is relation valued.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the attribute is relation valued</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><DD><DL><DT><B>Returns:</B><DD>true if the attribute is a date type</DL></DD></DL><HR><A NAME="name()"><!-- --></A><H3>name</H3><PRE>public final java.lang.String <B>name</B>()</PRE><DL><DD>Returns the attribute's name.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the attribute's name as a string</DL></DD></DL><HR><A NAME="numValues()"><!-- --></A><H3>numValues</H3><PRE>public final int <B>numValues</B>()</PRE><DL><DD>Returns the number of attribute values. Returns 0 for  attributes that are not either nominal, string, or relation-valued.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of attribute values</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public final java.lang.String <B>toString</B>()</PRE><DL><DD>Returns a description of this attribute in ARFF format. Quotes strings if they contain whitespace characters, or if they are a question mark.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a description of this attribute as a string</DL></DD></DL><HR><A NAME="type()"><!-- --></A><H3>type</H3><PRE>public final int <B>type</B>()</PRE><DL><DD>Returns the attribute's type as an integer.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the attribute's type.</DL></DD></DL><HR><A NAME="getDateFormat()"><!-- --></A><H3>getDateFormat</H3><PRE>public final java.lang.String <B>getDateFormat</B>()</PRE><DL><DD>Returns the Date format pattern in case this attribute is of type DATE, otherwise an empty string.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the date format pattern<DT><B>See Also:</B><DD><CODE>SimpleDateFormat</CODE></DL></DD></DL><HR><A NAME="value(int)"><!-- --></A><H3>value</H3><PRE>public final java.lang.String <B>value</B>(int&nbsp;valIndex)</PRE><DL><DD>Returns a value of a nominal or string attribute.  Returns an empty string if the attribute is neither a string nor a nominal attribute.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>valIndex</CODE> - the value's index<DT><B>Returns:</B><DD>the attribute's value as a string</DL></DD></DL><HR><A NAME="relation()"><!-- --></A><H3>relation</H3><PRE>public final <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>relation</B>()</PRE><DL><DD>Returns the header info for a relation-valued attribute, null if the attribute is not relation-valued.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the attribute's value as an Instances object</DL></DD></DL><HR><A NAME="relation(int)"><!-- --></A><H3>relation</H3><PRE>public final <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>relation</B>(int&nbsp;valIndex)</PRE><DL><DD>Returns a value of a relation-valued attribute. Returns null if the attribute is not relation-valued.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>valIndex</CODE> - the value's index<DT><B>Returns:</B><DD>the attribute's value as an Instances object</DL></DD></DL><HR><A NAME="addStringValue(java.lang.String)"><!-- --></A><H3>addStringValue</H3><PRE>public int <B>addStringValue</B>(java.lang.String&nbsp;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>&nbsp;src,                          int&nbsp;index)</PRE>

⌨️ 快捷键说明

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