## Jupyter Notebook Edit mode and Command mode

There are two different working modes for the Jupyter Notebook.Therefore , the same keyboard key press has different effect, depending on which mode the notebook is in currently.There are two modes: Edit mode When in edit mode of jupyter notebook, you can type code and text. we can enter this mode, by pressing enter or … Continue reading Jupyter Notebook Edit mode and Command mode

## Difference between Variance and Covariance

Variance is the measure of, the spread between numbers, in a given data set. In other words, it means, how far each number in the data set is, from the mean of this data set. 2. Covariance is the measure of, the directional relationship between, two random variables. In other words, covariance measures, how much, … Continue reading Difference between Variance and Covariance

## Difference Between Batch, Mini-Batch and Stochastic Gradient Descent

Gradient Descent is one the key algorithm used in Machine Learning. While training machine learning model, we require an algorithm to minimize the value of loss function. Gradient Descent is one of the optimization algorithm , that is used to minimize the loss. There are mainly three types of Gradient Descent algorithm1. Batch Gradient DescentBatch … Continue reading Difference Between Batch, Mini-Batch and Stochastic Gradient Descent

## Pandas Groupby apply Function on each Group Item

Here we are trying to write a solution for Group by COULUMN_2 Sum the COULUMN_1 values in each group and divide each COULUMN_1 values by Sum of it’s group total. After that we need to do df[‘COULUMN_1’] = df_new[‘COULUMN_2’] Where for example column 1 is RANK and column 2 is Id Thanks

## How to write command-line arguments using argparse in python

If you want to run a .py python file from command line and you also want to pass the argument using command line you can use argparse library. This can be done as below: Then you cal run this py file on command line as below python predict.py –my_var 7 Thanks

## Decision Tree vs Linear Regression

Decision Tree can be used for implementing regression as well as classification models, however , Linear Regression can be used for regression problem only. Decision tree can be used for regression, even when there is non linear relationships between the features and the output variable. However, Linear Regression works really nicely when there is linear relationship … Continue reading Decision Tree vs Linear Regression

## Handling missing data in pandas data frame python

In this post we are going to discuss how to handle missing data from a pandas data frame. Find total number of missing data in the data frame Find number of missing data in each column in a data frame Investigate patterns in the amount of missing data in each column. Percentage of missing data … Continue reading Handling missing data in pandas data frame python

## Using torchvision transforms for data augmentation

Transforms are common image transformations. torchvision transforms are used to augment the data with scaling, rotations, mirroring, cropping etc. Transforms are common image transformations. Let us create some possible transforms like RandomRotation , Resize, RandomResizedCrop etc. Below is the code to use transforms for the training, validation, and testing sets transforms.Compose([transforms.Resize(224),transforms.CenterCrop(64),transforms.ToTensor()]) Most neural networks expect the … Continue reading Using torchvision transforms for data augmentation

## int object is not iterable Error

If your code is like below This will give you error like.. int object is not iterable. In Python, the thing you pass to a for statement needs to be some kind of iterable object. The variable count here is a number which is not iterable. You should be writing the code like below to … Continue reading int object is not iterable Error

## Visualize or Print Random Forest Algorithm Model

As a machine learning engineer you may have created the Random Forest Algorithm Model, but have you ever tried to visualize it. If not , this is the post for you. In this post we will learn how to Visualize or Print Random Forest Algorithm Model in Jupyter notebook. Let us import the required library: … Continue reading Visualize or Print Random Forest Algorithm Model

### Follow My Blog

Get new content delivered directly to your inbox.