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

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: import argparse # Command Line arguments argp = argparse.ArgumentParser() argp.add_argument('--my_var', dest="my_var", action="store", type=int, default=5) params = argp.parse_args() myvar= params.my_var print(myvar) Then … Continue reading How to write command-line arguments using argparse in python

Implementing Logistic Regression in 10 lines in Python

Logistic Regression is one of the most popular Machine Learning algorithm used for the classification problems. It should be noted that though there is a regression word in the name of the algorithm Logistic Regression, it is used for classification problems. A use case of Logistic regression could be, based on the symptoms for a disease that a patient has Logistic … Continue reading Implementing Logistic Regression in 10 lines in Python

How to Enable Intellisense or Autocomplete in Jupyter Notebook

No matter how good you are in programming with respect to a language like python you may not be able to remember all the functions names or syntax or function parameters. So you may require to use intellisense or autocomplete feature of Jupyter notebook while programming in pandas, python and similar libraries. In the below … Continue reading How to Enable Intellisense or Autocomplete in Jupyter Notebook