top of page
  • Twitter Social Icon
  • LinkedIn Social Icon
  • Facebook Social Icon
Search

Scikit Visualization tools for Machine Learning Model

  • Writer: Nilesh Gode
    Nilesh Gode
  • Sep 15, 2019
  • 2 min read

Create an useful different Visualization Parameters which will actually help us

in Machine Learning Model Building Process.




In this articles, try to give some introduction to Visualization tools from Scikit learn Library, which is very much useful to explain both the predictions their Machine Learning models are producing and how the models themselves work.There are various python libraries being developed that attempt to solve this problem.


Some of the visualization tools such as Yellowbrick, ELI5 , LIME , MLxtend. article try give you demo on each and every tool and finally we can compare all results with different Machine Learning Model such as 'LOGISTIC REGRESSION', 'RANDOM FOREST', 'NAIVE BAYES', 'ENSEMBLES'. The data set we use for Visualization is already available in scikit library name as wine_data. try to classify this data with different ML algorithms.

Now we will dive into the details of each Visualization tool.

Yellowbrick

This library is essentially an extension of the scikit-learn library and provides some really useful and nice looking visualization for Machine Learning Models.The visualizations that can be rendered cover model selection, feature importance and model performance analysis. if any wants to learn more about this useful library visit the given site:https://www.scikit-yb.org/en/latest/. my visualization results are as follows.



Visualization's are very much useful for feature selection to build ML Model from the available data set, depends on the heat-map matrix we have generated after the python coding.



ELI5

ELI5 is another visualization library that is useful for debugging machine learning models and explaining the predictions they have produced. It works with the most common python machine learning libraries including scikit-learn, XGBoost and Keras. for more details visit the given site : https://eli5.readthedocs.io/en/latest/autodocs/eli5.html. This details also helpful for us to select Features depend on Weights and Probability Matrix.

LIME

LIME (local Interpretable model-agnostic explanations) is a package for explaining the predictions made by machine learning algorithms. Lime supports explanations for individual predictions from a wide range of classifiers, and support for scikit-learn is built in. First, we build the ex-plainer, the names of the features used in the model and the names of the classes in the target variable.Next, we create a lambda function that uses the model to predict on a sample of the data.Lime produces a visualization showing how the features have contributed to this particular prediction.


MLxtend


If any one interest in code part for the same please go through following link : https://github.com/nileshgode/Scikit-Visualization-tools-for-ML.

From above discussion and from the code we can easily understood how the scikit visualization tools help us to make the better decision while feature selection from the available data set and it help us very much for ML Model Building phase.

As above discussion concerns regarding bais in Artificial Intelligence, It become more prominent it is becoming more and more important for businesses to be able to explain both the predictions their models are producing and how the models themselves work.

Thanks for Your Valuable time.....

 
 
 

Recent Posts

See All

Comments


SIGN UP AND STAY UPDATED!

Thanks for submitting!

  • Grey Twitter Icon
  • Grey LinkedIn Icon
  • Grey Facebook Icon

Design & Maintain by Nilesh Gode/TalkingwithData

bottom of page