machine learning with python -machine datalearning feature selection in the previous we have seen in detail how to preprocess and prepare data for machine learning in this let us understand in detail data feature selection and various aspects involved in it importance of data feature selection the performance of machine learning model is directly proportional to the data features used to train it the performance of ml model will be affected negatively if the data features provided to it are irrelevant on the other handuse of relevant data features can increase the accuracy of your ml model especially linear and logistic regression now the question arise that what is automatic feature selectionit may be defined as the process with the help of which we select those features in our data that are most relevant to the output or prediction variable in which we are interested it is also called attribute selection the following are some of the benefits of automatic feature selection before modeling the dataperforming feature selection before data modeling will reduce the overfitting performing feature selection before data modeling will increases the accuracy of ml model performing feature selection before data modeling will reduce the training time feature selection techniques the followings are automatic feature selection techniques that we can use to model ml data in pythonunivariate selection this feature selection technique is very useful in selecting those featureswith the help of statistical testinghaving strongest relationship with the prediction variables we can implement univariate feature selection technique with the help of selectkbest class of scikit-learn python library examplein this examplewe will use pima indians diabetes dataset to select of the attributes having best features with the help of chi-square statistical test from pandas import read_csv from numpy import set_printoptions from sklearn feature_selection import selectkbest