avatarNaina Chaturvedi

Summary

The provided content outlines the use of Yellowbrick for NLP tasks, including visualizations and clustering of text data, and promotes a series of educational resources and projects in data science, machine learning, and related fields.

Abstract

The web content discusses the integration of Yellowbrick, a visualization library that extends scikit-learn's API, for natural language processing (NLP) applications. It emphasizes the importance of visualizing machine learning workflows and demonstrates how to analyze text data for similarity and topic modeling using TF-IDF vectorization and t-SNE embeddings with different distance metrics. The article also announces the launch of a YouTube channel, Ignito, which will feature videos on various projects and coding exercises. Additionally, it invites readers to subscribe to a tech newsletter for insights into tech interviews, machine learning, data science, and other technology-related topics. The content concludes by teasing upcoming educational series and highlighting past projects with links to detailed implementations and guides.

Opinions

  • The author believes in the practicality of Yellowbrick for enhancing the understanding of machine learning models, particularly in NLP.
  • There is a strong emphasis on the value of visual learning, as evidenced by the inclusion of multiple visualization techniques for document clustering.
  • The author encourages continuous learning and practice through real-world projects, as indicated by the extensive list of implemented projects in various domains of data science and machine learning.
  • The launch of the Ignito YouTube channel suggests the author's commitment to providing accessible educational content in a visual format.
  • By offering a newsletter, the author conveys a desire to build a community and regularly share knowledge and updates in the tech industry.
  • The author's enthusiasm for teaching and sharing is clear from the frequent calls to action for readers to follow, subscribe, and stay tuned for more content.

Day 49: 60 days of Data Science and Machine Learning Series

Yellowbrick for NLP…

Pic credits : Scikit -yb

Yellowbrick combines scikit-learn with matplotlib and provides the scikit-learn API to produce visualizations for the machine learning workflow. A good reference point to understand the vastness of Yellowbrick and how to use it —

Some of the other best Series —

30 Days of Natural Language Processing ( NLP) Series

30 days of Data Engineering with projects Series

60 days of Data Science and ML Series with projects

100 days : Your Data Science and Machine Learning Degree Series with projects

23 Data Science Techniques You Should Know

Tech Interview Series — Curated List of coding questions

Complete System Design with most popular Questions Series

Complete Data Visualization and Pre-processing Series with projects

Complete Python Series with Projects

Complete Advanced Python Series with Projects

Kaggle Best Notebooks that will teach you the most

Complete Developers Guide to Git

All the Data Science and Machine Learning Resources

210 Machine Learning Projects

30 days of Machine Learning Ops

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

You can install yellowbrick using the command below —

$ pip install yellowbrick

In this post, we will analyze the text data using Yellowbrick and assess document similarity, topic modelling etc that are predicated on the notion of “similarity” between documents.

Import necessary libraries

from sklearn.feature_extraction.text import TfidfVectorizer
from yellowbrick.text import TSNEVisualizer

Load Corpus

from textDB import load_data
corpus = load_data('hobbies')
corpus.categories

Output —

['books', 'cinema', 'cooking', 'gaming', 'sports']

Vectorize the Documents

vec = TfidfVectorizer()
docs = vec.fit_transform(corpus.data)
labels= corpus.target
docs.shape

Output —

(448, 21379)

Cluster Similar Documents

# Euclidean Distance
tsne = TSNEVisualizer(size=(700,500),metrics = 'euclidean')
tsne.fit(docs,labels)
tsne.poof()

Output —

Manhattan Distance

#cityblock
tsne = TSNEVisualizer(metic = 'cityblock',size = (700,500))
tsne.fit(docs,labels)
tsne.poof()

Output —

Bray Curtis Dissimilarity

#braycurtis
tsne = TSNEVisualizer(metric='braycurtis',size=(700,500))
tsne.fit(docs,labels)
tsne.poof()

Output —

Canberra Distance

tsne = TSNEVisualizer(metric='canberra',size=(700,500))
tsne.fit(docs,labels)
tsne.poof()

Output —

Cosine Distance

tsne = TSNEVisualizer(metric='cosine',size=(700,500))
tsne.fit(docs,labels)
tsne.poof()

Output —

Learnings —

How to vectorize text data using TF-IDF and clustering documents using embedding techniques

Day 50: Coming soon!

Follow and Stay tuned. Keep coding :)

For other projects, tune to —

Build Machine Learning Pipelines( With Code)

Recurrent Neural Network with Keras

Clustering Geolocation Data in Python using DBSCAN and K-Means

Facial Expression Recognition using Keras

Hyperparameter Tuning with Keras Tuner

Custom Layers in Keras

That’s it fellas. Peace out and keep coding :)

Stay Tuned and of-course let me end this post with a quote by Steve Jobs ;)

“Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it.”

Machine Learning
Artificial Intelligence
Programming
Tech
Data Science
Recommended from ReadMedium