feat: Group Transformer
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- pandas, python, scikit-learn
- Lĩnh vực
- data, machine-learning
Hướng nghiên cứu
The issue names no files, so start by locating where the library's existing sklearn-compatible transformers are defined and how they follow fit and transform. The proposal is a GroupTransform that stores per-category aggregates in fit and merges them back in transform, but it leaves open whether inputs are DataFrames or ndarrays, and how unseen categories are handled. Settle those choices with the maintainers first; done means a fitted transformer returns the grouped aggregate merged onto the input, with tests for the chosen behaviour.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
Aggregating variables by a single or multiple category is a simple task
df.groupby('cat')["num_var"].transform("mean")
however to make it compatible with a Sklearn Pipeline, a Transformer with some requirements is needed. Feature Engine could provide a transformer with these functionality.
Describe the solution you'd like
A GroupTransform class with a fit() that stores that computes and stores the aggregated information
and a transform method that merges this information.
Class GroupTransform:
def fit(X, y=None):
self.X_agg_ = X.groupby('cat')["num_var"].transform("mean")
def transform(X, y=None):
X.merge(self.X_agg_)
Describe alternatives you've considered
To make it 100% compatible with sklearn the fit and transform methods should takes as input an ndarray.
To pass the information to a new dataframe the merge method is needed.
- Ngôn ngữ chính
- Python
- Star
- 2.3k
- Fork
- 391
- Merge trung bình
- 11 giờ 34 phút
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của feature-engine/feature_engine
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
feature-engine/feature_engine#1141 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
feature-engine/feature_engine#393 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
feature-engine/feature_engine#1140 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CategoricalImputer fails when fill_value is already a categoryCó thể đã có người làm @AryanRG đã nhận 12 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 18/100
feature-engine/feature_engine#1113 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OneHotEncoder loses a dummy name when it matches an encoded input columnCó thể đã có người làm @Aadrit555 đã nhận 7 ngày trước. Đang mở
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 25/100
feature-engine/feature_engine#1106 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của feature-engine/feature_engine
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 79/100
developmentseed/titiler-covjson#164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
awslabs/visual-asset-management-system#2164 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
MakazhanAlpamys/Soup#3589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày