Constructs a categorical vector from an index and level indexes.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static CategoricalVector<T> CreateCategorical<T>(
Index<T> index,
IList<int> levels,
ArrayMutability mutability = ArrayMutability.Immutable
)
Public Shared Function CreateCategorical(Of T) (
index As Index(Of T),
levels As IList(Of Integer),
Optional mutability As ArrayMutability = ArrayMutability.Immutable
) As CategoricalVector(Of T)
public:
generic<typename T>
static CategoricalVector<T>^ CreateCategorical(
Index<T>^ index,
IList<int>^ levels,
ArrayMutability mutability = ArrayMutability::Immutable
)
static member CreateCategorical :
index : Index<'T> *
levels : IList<int> *
?mutability : ArrayMutability
(* Defaults:
let _mutability = defaultArg mutability ArrayMutability.Immutable
*)
-> CategoricalVector<'T>
Parameters
- index
- Type: Extreme.DataAnalysisIndexT
An index. - levels
- Type: System.Collections.GenericIListInt32
A list of integer level indexes. - mutability (Optional)
- Type: Extreme.MathematicsArrayMutability
Specifies how the vector's values may be changed.
The default is immutable.
Type Parameters
- T
- The element type of the vector.
Return Value
Type:
CategoricalVectorTA categorical vector with category index
index
and level indexes
levels.
To specify a missing value, set its level index to -1.
Reference