[FEATURE] Categorical Variable Concatenation

Abierto
#411 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python, scikit-learn

Línea de trabajo

Start by reviewing the linked catcomb repository and its existing implementation of categorical-column concatenation. Then determine how its column selection, combination level, and maximum-cardinality behavior should fit feature_engine; done means those behaviors are defined and the proposed integration is covered by tests. The issue names no feature_engine files or tests to start from.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Expected Behavior

Concatenating categorical variables is a powerful feature engineering technique, often used in competitions. You could watch the 9 minuts of this video for understanding the topic (i placed the video on the right starting minute already): Winning Solution --> RecSys 2020 Tutorial: Feature Engineering for Recommender Systems,

Categorical Variable Concatenation is not implemented in scikit-learn or scikit-learn-contrib packages.

I have coded this feature in a separate repo catcomb and would implement this solution in feature_engine, if you agree.

Basically, what it does, it concatenates all categorical columns with each other based on some parameters you can chose.

image

Its a ColumnsTransformer where you can choose

  • columns: if the categorical columns should be infered automatically, or the column names should be given

  • level: the level of 'combinatorial' deepness
    image

  • max_cardinality: the maximal cardinality of the original columns which should be included in the concatenation process, because very high cardinality concatination isn't that useful

Example
pipe = Pipeline([("catcomb", ColumnsConcatenation(columns='auto', level=2, max_cardinality=500))])

I also posted this issue on scikit-lego and category_encoders, but maybe its better implemented here. The maintainers of the two other packages were uncertain if their repos are the right ones for this feature. So i think feature engine is pretty close to a perfect fit for this feature.

Lenguaje dominante
Python
Estrellas
2.3k
Forks
391
Merge medio
11 h 34 min
PR fusionados (30 d)
11

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de feature-engine/feature_engine

Todos los issues de feature-engine/feature_engine

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.