Represents a discrete classification of a
Variable.
SystemObject Extreme.StatisticsCategoricalScale Extreme.StatisticsDateTimeScale Extreme.StatisticsNumericalScale
Namespace: Extreme.StatisticsAssembly: Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16312.0)
public class CategoricalScale : IEnumerable
Public Class CategoricalScale
Implements IEnumerable
public ref class CategoricalScale : IEnumerable
type CategoricalScale =
class
interface IEnumerable
end
The CategoricalScale type exposes the following members.
Top
| Name | Description |
---|
 | Count |
Gets the number of levels in this CategoricalScale.
|
 | IsOrdered |
Gets whether the categorical scale is ordered or unordered.
|
 | Item |
Gets the level corresponding to the specified level index.
In C#, this property is the indexer for the DateTimeScale class. |
 | SortOrder |
Gets a value that indicates how the levels in the scale are sorted.
|
Top
| Name | Description |
---|
 | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
 | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
 | GetCaption |
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. (Inherited from Object.) |
 | GetLevelIndex |
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. (Inherited from Object.) |
 | Map(Object) |
Gets the index of the specified level in this CategoricalScale.
|
 | Map(Object) |
Returns an array of indexes corresponding to the
|
 | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
 | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Use the CategoricalScale class to represent the possible values for a categorical variable.
The unique values are called levels. Every level is assigned an index, ranging from 0 to the number of
distinct values minus 1.
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:
Class | Description |
---|
DateTimeScale | Represents a class whose levels are contiguous time intervals. |
NumericalScale | Represents a class whose levels are contiguous numerical intervals. |
CategoricalScale objects are used by CategoricalVariable objects
to map levels to numerical values (level indexes).
Numerical Libraries
Supported in: 5.x, 4.x
Reference