In machine learning problems, we often encounter with imbalanced datasets. Problems like fraud detection, claim prediction, churn prediction, anomaly detection, and outlier detection are the examples of classification problem which often consist of the imbalanced dataset.

In this article, I am going to discuss a simple approach to deal with an imbalanced dataset by using imblearn python library which is specially designed to deal with imbalanced datasets. The dataset is which I am using here is taken from Machinehack Detecting Anomalies in Wafer Manufacturing hackathon which consists of binary classes.

Outline of the article :

  1. What is Imbalanced dataset
  2. Imblearn Library
  3. Dealing with Imbalanced dataset


Photo by Samer Khodeir on Unsplash

In this article, we discuss building a simple convolutional neural network(CNN) with PyTorch to classify images into different classes. By the end of this article, you become familiar with PyTorch, CNNs, padding, stride, max pooling and you are able to build your own CNN model for image classification. The dataset we are going to use is Intel Image Classification dataset available on Kaggle.

So let’s begin, here is an outline of what this article going to cover:

  1. Preparing The Dataset
  2. Splitting Data and Prepare Batches
  3. Base Model For Image Classification
  4. Convolution, Padding, Stride, Pooling
  5. CNN Model For Classification
  6. Hyperparameters, Model…


Photo by Pixabay from Pexels

This article is based on week 2 of course Sequence Models on Coursera. In this article, I try to summarise and explain the concept of word representation and word embedding.

Word Representation :

Generally, we represent a word in natural language processing through a vocabulary where every word is represented by a one-hot encoded vector. Suppose we have a vocabulary(V) of 10,000 words.

V = [a, aaron, …, zulu, <UNK>]

Let’s take the word ‘ Man’ is at position 5391 in the vocabulary, then it can be represented by a one-hot encoded vector (O5391 ). …

Pranjal Soni

A data science learner and loves to read and write about machine learning and deep learning. Reach me out on LinkedIn https://www.linkedin.com/in/pranjal-soni/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store