You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During this stage, I delved deep into the data performing univariate, bivariate, and multivariate analysis, during which I identified a lot of outliers in four of the columns, as seen below:
Outlier Detection and Handling π‘οΈ:
For detecting the outliers, I used an ensemble technique using:
Modified Z-score
IQR
Isolation Forest
Zscore was not used due to high skewness in variables.
Models turned out to perform better without outlier handling! π
Data Preprocessing π οΈ:
During this stage, I made sure to avoid data leakage by creating my train, evaluation, and test datasets before doing any preprocessing. This process was done in the following steps:
Data Imputing: Replaced 'Unknown' values in three columns with the mode of the columns (Reduced model complexity and results were improved slightly).
Feature Engineering: Experimented with creating/categorizing features to improve model performance.
Feature Transformations: Applied transformations to columns to reduce skewness. Example implementation:
Encoding: Label encoded variables with a real-life order to them and One-Hot-Encoded purely categorical ones.
Scaling: Utilized sklearn MinMaxScaler for scaling all numerical variables.
Feature Selection: In this stage, I tried to reduce dimensionality using techniques such as correlations, dendrogram analysis, and variance threshold.