File size: 2,081 Bytes
e81347d
 
 
 
 
 
 
 
 
 
 
e3d94d9
e81347d
 
e3d94d9
e81347d
 
 
 
 
 
 
 
 
 
 
e3d94d9
 
 
 
 
 
 
 
 
 
 
e81347d
 
 
 
 
 
 
e3d94d9
 
 
e81347d
 
 
 
 
 
78eb2d0
e81347d
 
78eb2d0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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("pages/5 Model Building.py")

if st.button('Back'):
    st.switch_page("pages/3 EDA.py")