Package org.apache.spark.ml.attribute
Class NumericAttribute
Object
org.apache.spark.ml.attribute.Attribute
org.apache.spark.ml.attribute.NumericAttribute
- All Implemented Interfaces:
- Serializable
A numeric attribute with optional summary statistics.
 param:  name optional name
 param:  index optional index
 param:  min optional min value
 param:  max optional max value
 param:  std optional standard deviation
 param:  sparsity optional sparsity (ratio of zeros)
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionattrType()Attribute type.static NumericAttributeThe default numeric attribute.booleanstatic AttributefromStructField(StructField field) inthashCode()scala.Option<Object>index()Index of the attribute.booleanTests whether this attribute is nominal, true forNominalAttributeandBinaryAttribute.booleanTests whether this attribute is numeric, true forNumericAttributeandBinaryAttribute.scala.Option<Object>max()scala.Option<Object>min()scala.Option<String>name()Name of the attribute.scala.Option<Object>sparsity()scala.Option<Object>std()withIndex(int index) Copy with a new index.withMax(double max) Copy with a new max value.withMin(double min) Copy with a new min value.Copy with a new name.Copy without the index.Copy without the max value.Copy without the min value.Copy without the name.Copy without the sparsity.Copy without the standard deviation.Copy without summary statistics.withSparsity(double sparsity) Copy with a new sparsity.withStd(double std) Copy with a new standard deviation.Methods inherited from class org.apache.spark.ml.attribute.AttributetoMetadata, toMetadata, toString, toStructField, toStructField
- 
Method Details- 
defaultAttrThe default numeric attribute.
- 
fromStructField
- 
nameDescription copied from class:AttributeName of the attribute. None if it is not set.
- 
indexDescription copied from class:AttributeIndex of the attribute. None if it is not set.
- 
min
- 
max
- 
std
- 
sparsity
- 
attrTypeDescription copied from class:AttributeAttribute type.
- 
withNameDescription copied from class:AttributeCopy with a new name.
- 
withoutNameDescription copied from class:AttributeCopy without the name.- Specified by:
- withoutNamein class- Attribute
 
- 
withIndexDescription copied from class:AttributeCopy with a new index.
- 
withoutIndexDescription copied from class:AttributeCopy without the index.- Specified by:
- withoutIndexin class- Attribute
 
- 
withMinCopy with a new min value.
- 
withoutMinCopy without the min value.
- 
withMaxCopy with a new max value.
- 
withoutMaxCopy without the max value.
- 
withStdCopy with a new standard deviation.
- 
withoutStdCopy without the standard deviation.
- 
withSparsityCopy with a new sparsity.
- 
withoutSparsityCopy without the sparsity.
- 
withoutSummaryCopy without summary statistics.
- 
isNumericpublic boolean isNumeric()Description copied from class:AttributeTests whether this attribute is numeric, true forNumericAttributeandBinaryAttribute.
- 
isNominalpublic boolean isNominal()Description copied from class:AttributeTests whether this attribute is nominal, true forNominalAttributeandBinaryAttribute.
- 
equals
- 
hashCodepublic int hashCode()
 
-