Load Libraries:
Read Data
Download the data from https://github.com/marymorkos/maternalmortalityhealthriskdata and remove bs feature
Separate features and target variables:
Split the data into training and test data sets
Exhaustive Search Script
Since the original data contains 5 features and one target, our maximum features must be 5 or less than that. You also supposed to mention the minimum features required. Here it is specified as 3. We use Randomforestclassifier as the argument to ExhaustiveFeatureSelector function. Evaluation is based on accuracy of the model RandomForestRegressor. Exhaustive feature selection is one of the best feature selection methods, which evaluates each feature set as brute-force. It means this method tries & make each possible combination of features and return the best performing feature set. It iteratively selects, combines, and mutates feature subsets based on their performance.
Display Results:
Using this technique the system has selected four features out of five features. Removed feature is DiastolicBP