New feature: Lag or windows features grouped by

Abierto
#668 2 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #1109 de @lcrmorin — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
18/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
pandas, python

Línea de trabajo

The issue asks for lag and window features to be computed per group, using the pandas groupby-then-lag pattern as the reference. Work is already under way in linked pull request #1109, so read that PR first to see what it covers before starting. The issue text names no files, so locate the existing lag-feature transformer in the repository. Done means grouping by one or more columns works and the tests pass.

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

Descripción

Is your feature request related to a problem? Please describe.
For example, you want to create lag features of sales for a retail chain, but taking into account the stores, product categories, and date. It's widespread to create lag features taking into consideration the hierarchy or grouping levels.

Describe the solution you'd like
I would like the la feature creation but apply groups by different columns in the data frame.

Describe alternatives you've considered
An alternative solution would be to create a sklearn transformer class to apply the groupby and lag functions of pandas.

Here is an example of what I'm talking about using pandas: https://www.statology.org/pandas-lag-by-group/

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.