Represents a statistical Variable that can take on a discrete set of values.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Class CategoricalVariable _ Inherits Variable _ Implements IList(Of Object), ICollection(Of Object), IEnumerable(Of Object), IEnumerable |
| C# |
|---|
public class CategoricalVariable : Variable, IList<Object>, ICollection<Object>, IEnumerable<Object>, IEnumerable |
| C++ |
|---|
public ref class CategoricalVariable : public Variable, IList<Object^>, ICollection<Object^>, IEnumerable<Object^>, IEnumerable |
Methods
| Icon | Type | Description |
|---|---|---|
| Add(Object) |
Adds an observation to the variable.
| |
| Aggregate(Int32[]()) |
Aggregates the values in the variable using the variable's aggregator.
| |
| Aggregate(Int32[](), Aggregator) |
Aggregates the values in the variable using the specified aggregator.
| |
| Clear() |
Removes all observations from the variable.
| |
| Clone() |
Returns a Variable containing a copy of the observations that match the current filter.
| |
| Compare(Int32, Int32) |
Compares the observations at the specified position.
| |
| Contains(Object) |
Determines whether the variable contains a specific observation.
| |
| CopyTo(GeneralVector) |
Copies the level indexes in this variable to the specified vector.
| |
| CopyTo(Object[](), Int32) |
Copies the variable's observations to the specified array.
| |
| CreateIndicatorVariable(Object) |
Constructs an indicator variable for the specified level.
| |
| CreateIndicatorVariable(Object, Object) |
Constructs an indicator variable for the specified levels.
| |
| CreateSubset(Int32, Int32) |
Returns a Variable containing a copy of the observations within the specified range.
| |
| CreateSubset(Filter) |
Returns a Variable containing a copy of the observations that match the specified filter.
| |
| CreateView(Filter) |
Returns a Variable containing the observations that match the specified filter.
| |
| CreateView(Int32, Int32) |
Returns a Variable containing the observations within the specified range.
| |
| Equals(Object) | ||
| Finalize() | ||
| GetEnumerator() |
Returns an IEnumerator that can iterate through this CategoricalVariable's data.
| |
| GetHashCode() | Serves as a hash function for a particular type. | |
| GetLevelIndex(Int32) |
Gets the level index of the value at the specified index.
| |
| GetLevelIndexes() |
Returns the level indexes in this variable as an integer array.
| |
| GetType() | Gets the Type of the current instance. | |
| GetValue(Int32) |
Gets the observation at the specified index.
| |
| GetValueUnfiltered(Int32) |
Gets the value of the variable at the specified index.
| |
| IndexOf(Object) |
Determines the index of a specific observation of the variable.
| |
| Insert(Int32, Object) |
Inserts an observation to the variable at the specified index.
| |
| IsMissing(Int32) |
Returns a value that indicates whether the observation at the specified index is missing.
| |
| MemberwiseClone() | Creates a shallow copy of the current Object. | |
| Remove(Object) |
Removes the first occurrence of a specific observation from the variable.
| |
| RemoveAll(Double) |
Removes all occurrences of a specific observation from the variable.
| |
| RemoveAt(Int32) |
Removes the observation at the specified index.
| |
| ResetCalculations() |
Performs actions necessary when the variable's data has changed.
| |
| Reverse() |
Reverses the observations in the variable.
| |
| SetValue(Object, Int32) |
Sets the observation at the specified index to the specified value.
| |
| SetValueUnfiltered(Object, Int32) |
Sets the value of the variable at the specified index.
| |
| Sort() |
Sorts the observations in the order specified by the SortOrder property.
| |
| Sort(SortOrder) |
Sorts the observations in the order specified by the SortOrder property.
| |
| ToArray() |
Returns all the observations of this variable in an array.
| |
| ToCategoricalVariable() |
Converts the variable to a CategoricalVariable.
| |
| ToString() |
Constructors
| Icon | Type | Description |
|---|---|---|
| CategoricalVariableNew(ICollection) |
Constructs a new CategoricalVariable object.
| |
| CategoricalVariableNew(String, ICollection) |
Constructs a new CategoricalVariable object.
| |
| CategoricalVariableNew(CategoricalScale, Int32[]()) |
Constructs a new CategoricalVariable
using the specified scale and scale indexes.
| |
| CategoricalVariableNew(String, CategoricalScale, Int32[]()) |
Constructs a new CategoricalVariable
using the specified scale and scale indexes.
| |
| CategoricalVariableNew(String, DataColumn) |
Constructs a new CategoricalVariable.
| |
| CategoricalVariableNew(DataColumn) |
Constructs a new CategoricalVariable.
|
Properties
| Icon | Type | Description |
|---|---|---|
| Aggregator |
Gets or sets the Aggregator for this NumericalVariable.
| |
| Filter |
Gets or sets the Filter associated with the current variable.
| |
| Filters |
Gets the CategoricalFilters object associated with this categorical variable.
| |
| IsSortable |
Gets a value that indicates whether the observations can be sorted.
| |
| IsSorted |
Gets a value that indicates whether the observations have been sorted
in the order specified by the SortOrder property.
| |
| Item(Int32) |
Gets the value of the variable corresponding to the specified index.
| |
| Length |
Gets the number of observations of the Variable.
| |
| Maximum |
Gets the largest value of the variable.
| |
| Median |
Gets the median of a variable.
| |
| Minimum |
Gets the smallest value of the variable.
| |
| MissingValue |
Gets or sets the value used to indicate a missing value.
| |
| Mode |
Gets the mode of a variable.
| |
| Name |
Gets or sets the name of this Variable.
| |
| Scale |
Gets the CategoricalScale object that specifies the possible values
of this CategoricalVariable.
| |
| SortOrder |
Gets or sets the order in which observations should be sorted.
| |
| UnfilteredLength |
Returns the number of observations in the variable.
| |
| VariableCollection |
Gets the VariableCollection that contains this variable.
|
Remarks
Use a CategoricalVariable to represent observations that can take
on a discrete set of values.
Every CategoricalVariable has a CategoricalScale object associated with it, that represents the possible values of the variable.
If the scale is IsOrdered, a larger number of descriptive statistics are available, including the Median, the Minimum and the Maximum. For unordered data, only the Mode is available.