Click or drag to resize

Factor Class

Class Factor represents a categorical vector in which all elements are drawn from a finite number of factor levels.
Inheritance Hierarchy
SystemObject
  CenterSpace.NMath.CoreFactor

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
[SerializableAttribute]
public class Factor : ICloneable

The Factor type exposes the following members.

Constructors
 NameDescription
Public methodCode exampleFactor(Object) Constructs a Factor instance from the given array of objects.
Public methodFactor(Object, Int32) Constructs a Factor instance from the given array of factor levels, and the given data array consisting of indices into the factor levels.
Public methodCode exampleFactor(Object, Object) Constructs a Factor instance from the given array of objects, using the given factor levels.
Public methodCode exampleFactor(Object, String) Constructs a Factor instance from the given array of objects.
Public methodFactor(Object, Int32, String) Constructs a Factor instance with the specified name from the given array of factor levels, and the given data array consisting of indices into the factor levels.
Public methodCode exampleFactor(Object, Object, String) Constructs a Factor instance from the given array of objects, using the given factor levels.
Top
Properties
 NameDescription
Public propertyData Gets the categorical data for this factor.
Public propertyItem Gets the element at the given index.
Public propertyLength Gets the length of the data vector for this factor.
Public propertyLevels Gets the levels of this factor.
Public propertyName Gets and set the name of this factor.
Public propertyNumberOfLevels Gets the number of levels in this factor.
Top
Methods
 NameDescription
Public methodClone Creates a deep copy of this Factor.
Public methodDataToString Returns a formatted string representation of the data of this factor.
Public methodLevelsToString Returns a formatted string representation of the levels of this factor.
Public methodToString Returns a formatted string representation of this factor.
(Overrides ObjectToString)
Top
Operators
 NameDescription
Public operatorStatic member(Factor to Object) Implicitly converts a factor into an array of objects.
Public operatorStatic member(Factor to String) Implicitly converts a factor into an array of strings.
Top
Fields
 NameDescription
Protected fieldname_ The name of this vector.
Top
Remarks
Factors are usually constructed from a data frame column using the GetFactor() method.
See Also