import streamlit as st # 🛠️ Feature Engineering & Feature Selection st.markdown(""" ## 🛠️ Feature Engineering & Feature Selection ### ✨ Feature Engineering: To ensure the dataset was machine-learning ready, the following preprocessing steps were applied: - **Encoding**: - Categorical variables like `Project_Type`, `Methodology_Used`, `Team_Experience_Level`, and `Requirement_Stability` were converted into numerical format using **OrdinalEncoder**, depending on model compatibility. - **Scaling**: Continuous variables such as `Project_Budget_USD`, `Complexity_Score`, and `Current_Phase_Duration_Months` were normalized using **StandardScaler** to bring features to the same scale and improve model convergence. - **Feature Harmonization**: - Ensured consistency in values across categorical variables, and handled any duplicates or anomalies. --- ### ✅ Selected Features: Following analysis and correlation review, these 11 features were selected for model training: - `Project_Type` - `Team_Size` - `Project_Budget_USD` - `Estimated_Timeline_Months` - `Complexity_Score` - `Stakeholder_Count` - `Methodology_Used` - `Team_Experience_Level` - `External_Dependencies_Count` - `Requirement_Stability` - `Current_Phase_Duration_Months` These features represent a strong balance between environmental, structural, and planning attributes of the project. --- ### 🚫 Dropped Features: - `Unnamed: 0`: Index column without predictive significance - `Past_Similar_Projects`: Removed due to data filtering and possible outliers - `Resource_Availability`, `Technical_Debt_Level`, `Seasonal_Risk_Factor`: Removed during feature reduction (assumed from earlier steps) The final feature set was used to train the **KNearestNeighbors Classifier**, enabling reliable classification of projects into **Low**, **Medium**, **High**,**Critical**. """) if st.button('Next'): st.switch_page(r"pages\5 Model Building.py") if st.button('Back'): st.switch_page(r"pages\3 EDA.py")