Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Class CategoricalScale _ Implements IEnumerable |
| C# |
|---|
public class CategoricalScale : IEnumerable |
| C++ |
|---|
public ref class CategoricalScale : IEnumerable |
Methods
| Icon | Type | Description |
|---|---|---|
| Equals(Object) | ||
| Finalize() | ||
| GetCaption(Int32) |
Gets a textual representation of the level at the specified index.
| |
| GetCaptions() |
Gets an array containing the captions of the levels in this CategoricalScale.
| |
| GetComparer() |
Gets an IComparer object that can be used to compare the levels of this CategoricalScale.
| |
| GetEnumerator() |
Returns an IEnumerator object that can be used to iterate through the levels of the CategoricalScale.
| |
| GetHashCode() | Serves as a hash function for a particular type. | |
| GetLevelIndex(Object) |
Gets the index of the specified level in this CategoricalScale.
| |
| GetLevels() |
Gets an array containing the levels of this CategoricalScale.
| |
| GetType() | Gets the Type of the current instance. | |
| Map(Object[]()) |
Returns an array of indexes corresponding to the
| |
| Map(Object) |
Gets the index of the specified level in this CategoricalScale.
| |
| MemberwiseClone() | Creates a shallow copy of the current Object. | |
| ToString() |
Constructors
| Icon | Type | Description |
|---|---|---|
| CategoricalScaleNew(SortOrder) |
Constructs a new categorical scale.
| |
| CategoricalScaleNew(Type, SortOrder) |
Constructs a factor from an enumeration type.
| |
| CategoricalScaleNew(Type) |
Constructs a factor from an enumeration type.
| |
| CategoricalScaleNew(ICollection, String[](), SortOrder) |
Constructs a categorical scale from an ICollection.
| |
| CategoricalScaleNew(ICollection) |
Constructs a categorical scale from an ICollection.
|
Properties
| Icon | Type | Description |
|---|---|---|
| Count |
Gets the number of levels in this CategoricalScale.
| |
| IsOrdered |
Gets a value that indicates whether the categorical scale is ordered or unordered.
| |
| Item(Int32) |
Gets the level corresponding to the specified level index.
In C#, this property is the indexer for the DateTimeScale class. |
Remarks
The Map(Object[]()) method finds the level index corresponding to an object.
Using a CategoricalScale, a categorical variable can be transformed into a numerical variable by replacing the level value by its level index. However, care should be taken that no new meaning is assigned to the numerical value of the level index. A variable that represents color using the categories 'red', 'green' and 'blue' can be converted into a numerical variable with possible values 0, 1, and 2. However, it is completely meaningless to talk about the mean or variance of this variable.
Several derived classes provide functionality tailored to specific kinds of data. These classes extend the Map(Object[]()) methods:
ClassDescriptionDateTimeScaleRepresents a class whose levels are contiguous time intervals.NumericalScaleRepresents a class whose levels are contiguous numerical intervals.CategoricalScale objects are used by CategoricalVariable objects to map levels to numerical values (level indexes).