Download pages/4_Feature_Engineering.py from Srikanth0804/Flight_Price_Prediction: direct link, hf CLI and curl.
- Browser
- Download file 950 Bytes
-
https://huggingface.co/spaces/Srikanth0804/Flight_Price_Prediction/resolve/main/pages/4_Feature_Engineering.py
- Command line
-
hf download hf://spaces/Srikanth0804/Flight_Price_Prediction/pages/4_Feature_Engineering.py
-
curl -L -o 4_Feature_Engineering.py https://huggingface.co/spaces/Srikanth0804/Flight_Price_Prediction/resolve/main/pages/4_Feature_Engineering.py
950 Bytes
| import streamlit as st | |
| st.title("🛠️ Feature Engineering & Feature Selection") | |
| st.markdown(""" | |
| ## ✨ Feature Engineering: | |
| Several transformations were applied to prepare the dataset for modeling: | |
| - **Encoding:** Applied Ordinal Encoding for categorical variables. | |
| - **Scaling:** Used RobustScaler to handle skewness and outliers. | |
| --- | |
| ## ✅ Selected Features: | |
| The following features were selected for model training: | |
| - Airline | |
| - Source City | |
| - Departure Time | |
| - Stops | |
| - Arrival Time | |
| - Destination City | |
| - Class | |
| - Duration | |
| - Days Left | |
| --- | |
| ## 🚫 Dropped Features: | |
| - Unnecessary or redundant columns that did not add predictive power. | |
| The processed dataset was then used to train and evaluate multiple regression algorithms, including KNN, Linear Regression, Decision Tree, Random Forest, and XGBoost. | |
| """) | |
| if st.button('Next'): | |
| st.switch_page('pages/5_Model_Building.py') | |
| if st.button('Go to EDA'): | |
| st.switch_page('pages/3_EDA.py') |