How to group columns with the mode in DataFrame
In many scenarios, you want to group columns with respect to one column with their mode values. Especially in categorical columns. So here is how you can group columns with their mode.
In many scenarios, you want to group columns with respect to one column with their mode values. Especially in categorical columns. So here is how you can group columns with their mode.
Many feature selection techniques include RFE(Recursive feature elimination), VIF(Variance Inflation Factor), VarianceThreshold, and many more. Lasso is one of the feature selection techniques in Data Science, which is used for feature selection for linear regression problems only. Lasso has two use cases. First, it is used to get rid of the overfitting of the linear regression model. And second, as… Continue readingFeature Selection with Lasso Regression in machine learning
So I was recently doing one machine learning project and I came across a situation where I wanted to sort values of months in the pandas’ DataFrame(Like January, February, etc..). Sorting months in their order is necessary for EDA when you want to create plots on month vs any other feature. So here is a method to sort the month… Continue readingHow to sort pandas DataFrame by month names
To spit data into a training set and test set, you had indeed used the train_test_split library from scikit learn.Here we will talk about one parameter called stratify in train_test_split in a simple way.