pe.embedding.tabular.tabular_embedding module
- class pe.embedding.tabular.tabular_embedding.TabularEmbedding(info, cat_weight=0.3333333333333333, num_weight=1)[source]
Bases:
EmbeddingCompute the tabular embedding.
- __init__(info, cat_weight=0.3333333333333333, num_weight=1)[source]
Constructor.
- Parameters:
info (dict) – The information (categories and numerical bounds) of the private data
cat_weight (float, optional) – The weight for the categorical columns, defaults to 1/3
num_weight (float, optional) – The weight for the numerical columns, defaults to 1
- compute_embedding(data)[source]
Compute the tabular embedding. (the embedding is computed using the features only, not the labels) Vectorization per column is implemented to improve the performance.
- Parameters:
data (
pe.data.Data) – The data object containing the tabular data- Returns:
The data object with the computed embedding
- Return type: