[FEATURE] Categorical Variable Concatenation

Đang mở
#411 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/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ệ
python, scikit-learn
Lĩnh vực
machine-learning

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của feature-engine/feature_engine

Tất cả issue của feature-engine/feature_engine

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.