Deep Learning Explained Simply in Layman Terms

In this post, you will get to learn deep learning through simple explanation (layman terms) and examples. Deep learning is part or subset of machine learning and not something which is different than machine learning. Many of us when starting to learn machine learning try and look for the answers to the question “what is the difference between machine learning & deep learning?”. Well, both machine learning and deep learning is about learning from past experience (data) and make predictions on future data. Deep learning can be termed as an approach to machine learning where learning from past data happens based on artificial neural network (a mathematical model mimicking human brain). …

Continue reading

Posted in Data Science, Deep Learning, Machine Learning. Tagged with , , .

Tensor Broadcasting Explained with Examples

In this post, you will learn about the concepts of Tensor Broadcasting with the help of Python Numpy examples. Recall that Tensor is defined as the container of data (primarily numerical) most fundamental data structure used in Keras and Tensorflow. You may want to check out a related article on Tensor – Tensor explained with Python Numpy examples. Broadcasting of tensor is borrowed from Numpy broadcasting. Broadcasting is technique used for performing arithmetic operations between Numpy arrays / Tensors having different shapes. In this technique, the smaller array is transformed appropriately according to larger array (broadcasted to large array) such that the arithmetic operations can be performed on these arrays.  Take a look …

Continue reading

Posted in Data Science, Deep Learning, Machine Learning, Python. Tagged with , , , , .

Elbow Method vs Silhouette Score – Which is Better?

In this post, you will learn about two different methods to use for finding optimal number of clusters in K-means clustering. These methods are commonly termed as Elbow method and Silhouette analysis. Selecting optimal number of clusters is key to applying clustering algorithm to the dataset. As a data scientist, knowing these two techniques to find out optimal number of clusters would prove to be very helpful while In this relation, you may want to check out detailed posts on the following: K-means clustering elbow method and SSE plot  K-means Silhouette score explained with Python examples In this post, we will use YellowBricks machine learning visualization library for creating the plot related …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

KMeans Silhouette Score Explained with Python Example

In this post, you will learn about concepts of KMeans Silhouette Score in relation to assessing the quality of K-Means clusters fit on the data. As a data scientist, it is of utmost important to understand the concepts of Silhouette score as it would help in evaluating the quality of clustering done using K-Means algorithm. In this post, the following topics will be covered: Introduction to Silhouette Score concepts Silhouette score explained using Python example You may want to check some of the following posts in relation to clustering: K-Means clustering explained with Python examples K-Means clustering elbow method and SSE Plot K-Means interview questions and answers Introduction to Silhouette Score Concepts …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

Tensor Explained with Python Numpy Examples

In this post, you will learn about the concepts of Tensor using Python Numpy examples with the help of simple explanation. When starting to learn deep learning, you must get a good understanding of the data structure namely tensor as it is used widely as the basic data structure in frameworks such as tensorflow, PyTorch, Keras etc. Simply speaking, Tensor is a container of data. The data can be numerical or character. However, mostly, tensors hold numbers or numerical data.  Tensors can be represented as an array data structure. In this post, you will learn about how to express tensor as 1D, 2D, 3D Numpy array. Before going ahead and see the examples …

Continue reading

Posted in Data Science. Tagged with .

Normal Distribution Explained with Python Examples

Normal Distribution Plot

In this post, you will learn about the concepts of Normal Distribution with the help of Python example. As a data scientist, you must get a good understanding of different probability distributions in statistics in order to understand the data in a better manner. Normal distribution is also called as Gaussian distribution or Laplace-Gauss distribution. Normal Distribution with Python Example Normal distribution represents a symmetric distribution where most of the observations cluster around the central peak called as mean of the distribution. The parameter used to measure the variability of observations around the mean is called as standard deviation. The probabilities for values occurring near mean are higher than the values far away from the mean. Normal …

Continue reading

Posted in Data Science.

Bayes Theorem Explained with Examples

In this post, you will learn about Bayes’ Theorem with the help of examples. It is of utmost importance to get a good understanding of Bayes Theorem in order to create probabilistic models. Bayes’ theorem is alternatively called as Bayes’ rule or Bayes’ law. One of the many applications of Bayes’s theorem is Bayesian inference which is one of the approaches of statistical inference (other being Frequentist inference), and fundamental to Bayesian statistics. In this post, you will learn about the following: Introduction to Bayes’ Theorem Bayes’ theorem real-world examples Introduction to Bayes’ Theorem In simple words, Bayes Theorem is used to determine the probability of a hypothesis in the presence of more evidence or information. In other …

Continue reading

Posted in Bayesian, Data Science, statistics. Tagged with .

Joint & Conditional Probability Explained with Examples

In this post, you will learn about joint and conditional probability differences and examples. When starting with Bayesian analytics, it is very important to have a good understanding around probability concepts. And, the probability concepts such as joint and conditional probability is fundamental to probability and key to Bayesian modeling in machine learning. As a data scientist, you must get a good understanding of probability related concepts. Joint & Conditional Probability Concepts In this section, you will learn about basic concepts in relation to Joint and conditional probability. Probability of an event can be quantified as a function of uncertainty of whether that event will occur or not. Let’s say an event A is …

Continue reading

Posted in Bayesian, Data Science, statistics. Tagged with , .

K-means Clustering Elbow Method & SSE Plot – Python

In this plot, you will quickly learn about how to find elbow point using SSE or Inertia plot with Python code and  You may want to check out my blog on K-means clustering explained with Python example.  The following topics get covered in this post: What is Elbow Method? How to create SSE / Inertia plot? How to find Elbow point using SSE Plot What is Elbow Method? Elbow method is one of the most popular method used to select the optimal number of clusters by fitting the model with a range of values for K in K-means algorithm. Elbow method requires drawing a line plot between SSE (Sum of Squared errors) …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

K-Means Clustering Explained with Python Example

In this post, you will learn about K-Means clustering concepts with the help of fitting a K-Means model using Python Sklearn KMeans clustering implementation. Before getting into details, let’s briefly understand the concept of clustering. Clustering represents a set of unsupervised machine learning algorithms belonging to different categories such as prototype-based clustering, hierarchical clustering, density-based clustering etc. K-means is one of the most popular clustering algorithm belong to prototype-based clustering category. The idea is to create K clusters of data where data in each of the K clusters have greater similarity with other data in the same cluster. The different clustering algorithms sets out rules based on how the data …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

Adaboost Algorithm Explained with Python Example

In this post, you will learn about boosting technique and adaboost algorithm with the help of Python example. You will also learn about the concept of boosting in general. Boosting classifiers are a class of ensemble-based machine learning algorithms which helps in variance reduction. It is very important for you as data scientist to learn both bagging and boosting techniques for solving classification problems. Check my post on bagging – Bagging Classifier explained with Python example for learning more about bagging technique. The following represents some of the topics covered in this post: What is Boosting and Adaboost Algorithm? Adaboost algorithm Python example What is Boosting and Adaboost Algorithm? As …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

Bagging Classifier Python Code Example

Bagging Classifier explained with Python code examples

In this post, you will learn about the concept of Bagging along with Bagging Classifier Python code example.  Bagging is also called bootstrap aggregation. It is a data sampling technique where data is sampled with replacement. Bagging classifier helps combine prediction of different estimators and in turn helps reduce variance.   In this post, you will learn about the following topics: Introduction to Bagging and Bagging Classifier Bagging Classifier python example Introduction to Bagging & Bagging Classifier / Regressor Bagging classifier can be called as an ensemble meta-estimator which is created by fitting multiple versions of base estimator, trained with modified training data set created using bagging sampling technique (data sampled using replacement) or otherwise. …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

Hard vs Soft Voting Classifier Python Example

In this post, you will learn about one of the popular and powerful ensemble classifier called as Voting Classifier using Python Sklearn example. Voting classifier comes with multiple voting options such as hard and soft voting options. Hard vs Soft Voting classifier is illustrated with code examples. The following topic has been covered in this post: Voting classifier – Hard vs Soft voting options Voting classifier Python example Voting Classifier – Hard vs Soft Voting Options Voting Classifier is an estimator that combines models representing different classification algorithms associated with individual weights for confidence. The Voting classifier estimator built by combining different classification models turns out to be stronger meta-classifier that balances out the individual …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

Keras Hello World Example

Keras Hello World

In this post, you will learn about how to set up Keras and get started with Keras, one of the most popular deep learning frameworks in current times which is built on top of TensorFlow 2.0 and can scale to large clusters of GPUs. You will also learn about getting started with hello world program with Keras code example. Here are some of the topics which will be covered in this post: Set up Keras with Anaconda Keras Hello World Program Set up Keras with Anaconda In this section, you will learn about how to set up Keras with Anaconda. Here are the steps: Go to Environments page in Anaconda App. …

Continue reading

Posted in Data Science, Deep Learning, Machine Learning. Tagged with , , , .

Handling Class Imbalance using Sklearn Resample

In this post, you will learn about how to tackle class imbalance issue when training machine learning classification models with imbalanced dataset. This is illustrated using Python SKlearn example. In the same context, you may check out my earlier post on handling class imbalance using class_weight. As a data scientist, it is of utmost importance to learn some of these techniques as you will often come across the class imbalance problem while working on different classification problems. Here is how the class imbalance in the dataset can be visualized: Before going ahead and looking at the Python code example related to how to use Sklearn.utils resample method, lets create an imbalanced data …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .

Handle Class Imbalance using Class Weight – Python

In this post, you will learn about how to tackle with or handle class imbalance by adjusting class weight while solving a machine learning classification problem. This will be illustrated using Sklearn Python code example. What is Class Imbalance? Class imbalance is a one of the most common problem when solving classification problems related to healthcare domain, banking (fraud) domain etc. For example, if you want to build a model which classifies a transaction to be fraud or otherwise, the dataset will be highly imbalanced as there won’t be many instances where fraud-related transactions is found. The challenge related to building models having high performance is to address highly skewed data …

Continue reading

Posted in Data Science, Machine Learning, Python. Tagged with , , , .