Documents

BI Competition: Full Pipeline from EDA to Ensemble Modeling

5 min readSep 1, 2023Feb 22, 2026

BI_Competition11 Project

프로젝트
프로젝트

BI_Competition11 is a project submitted to the 2023 Business Intelligence (BI) Competition.

Analysis Pipeline

flowchart TD
    A[원본 데이터] --> B[EDA]
    B --> C[전처리]
    C --> D[Feature Engineering]
    D --> E[모델 선택]
    E --> F[앙상블]
    F --> G[결과 제출]

    B --> B1[분포 분석]
    B --> B2[결측치 확인]
    B --> B3[상관관계]

    C --> C1[결측치 처리]
    C --> C2[이상치 제거]
    C --> C3[인코딩]

Feature Engineering Strategy

import pandas as pd
import numpy as np

def create_features(df):
    # 시간 기반 Feature
    df['hour'] = df['timestamp'].dt.hour
    df['day_of_week'] = df['timestamp'].dt.dayofweek
    df['is_weekend'] = df['day_of_week'].isin([5, 6]).astype(int)

    # 통계 Feature
    df['rolling_mean_7d'] = df.groupby('user_id')['value'].transform(
        lambda x: x.rolling(7, min_periods=1).mean()
    )

    # 교차 Feature
    df['feature_interaction'] = df['feature_a'] * df['feature_b']

    return df

Ensemble Strategy

graph TD
    A[LightGBM] --> D[Weighted Average]
    B[XGBoost] --> D
    C[CatBoost] --> D
    D --> E[최종 예측]

    A -->|0.4| D
    B -->|0.3| D
    C -->|0.3| D
from sklearn.ensemble import VotingRegressor

ensemble = VotingRegressor(
    estimators=[
        ('lgbm', lgbm_model),
        ('xgb', xgb_model),
        ('cat', cat_model),
    ],
    weights=[0.4, 0.3, 0.3]
)

Results

  • Nearly half of the 18 total commits were related to feature engineering
  • Applying the ensemble reduced RMSE by approximately 15%
  • Gained hands-on data analysis experience through the competition
Tags
BIcompetitionensembleFeature Engineeringdata analysis