Skip to main content

3 Types of Data in Machine Learning

 

Comments

Popular posts from this blog

Feature Importance

 Feature Importance for regression from sklearn . datasets import make _ regression # define dataset X , y = make_regression ( n_samples = 1000 , n_features = 10 , n_informative = 5 , random_state = 1 ) # summarize the dataset print ( X . shape , y . shape ) #linear regression feature importance from sklearn . datasets import make_regression from sklearn . linear_model import LinearRegression from matplotlib import pyplot # define dataset X , y = make_regression ( n_samples = 1000 , n_features = 10 , n_informative = 5 , random_state = 1 ) # define the model model = LinearRegression ( ) # fit the model model . fit ( X , y ) # get importance importance = model . coef _ # summarize feature importance for i , v in enumerate ( importance ) : print ( 'Feature: %0d, Score: %.5f' % ( i , v ) ) # plot feature importance pyplot . bar ( [ x for x in range ( len ( importance ) ) ] , importance ) pyplot . show ( ) feature importance for classification # test cl...

Process of Data Science

 

Feature Engineering

  Feature Engineering is the way of extracting features from data and transforming them into formats that are suitable for Machine Learning algorithms. It is divided into 3 broad categories:- Feature Selection:  All   features aren't equal.   It is all about  selecting a small subset of features from a large pool of features . We select those attributes which best explain the relationship of an independent variable with the target variable. There are certain features which are more important than other features to the accuracy of the model. It is  different from dimensionality reduction  because the dimensionality reduction method does so by combining existing attributes, whereas the feature selection method includes or excludes those features. The methods of Feature Selection are Chi-squared test, correlation coefficient scores, LASSO, Ridge regression etc. Feature Transformation:  It means transforming our original feature to the functions of or...