Represents an encoding of the levels in a categorical variable.
SystemObject Extreme.DataAnalysisCategoricalEncoding
Namespace:
Extreme.DataAnalysis
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
[SerializableAttribute]
public abstract class CategoricalEncoding
<SerializableAttribute>
Public MustInherit Class CategoricalEncoding
[SerializableAttribute]
public ref class CategoricalEncoding abstract
[<AbstractClassAttribute>]
[<SerializableAttribute>]
type CategoricalEncoding = class end
The CategoricalEncoding type exposes the following members.
Top
Top
Use the CategoricalEncoding class to specify
how a categorical variable should be encoded as indicator variables.
An encoding is a set of mappings from categories to real numbers.
The mappings are returned as IndexT objects.
Encodings can have two forms: full rank and reduced rank.
A full rank encoding means that, when the encoding is applied to
each category, the resulting matrix has full rank.
Reduced rank encoding means that the resulting matrix does
not have full rank. This is useful when specifying models that
include a constant term. In such cases, the full rank encoding
and the constant term are linearly dependent.
To create an encoding, use one of the
methods of the CategoricalEncoding class.
You can then use the GetFullRankEncoding(Int32) or
GetReducedRankEncoding(Int32) to get the encoding.
Alternatively, you can inherit from CategoricalEncoding
The creation of indicator variables is mostly transparent.
To create an indicator variable, use the index with the
WithCategoriesU(IListU)
method.
Reference