Load the dataset First, import the packages required to continue. import pandas as pd import numpy as np import matplotlib.pyplot as plt %matplotlib inline Read the dataset using Pandas Read previously loaded data and store it in a variable named df, display the first few rows with head(), by default head() will return first 5 […]
Blogging
All about blogging.
How Mathematically Naive Bayes Classifier Works?
Previously, we wrote blogs on many machine learning algorithms as well as many other topics to help you broaden your knowledge. Please kindly visit our site and we would be glad if we got some feedback from you to improve our writing. To see some of them, you can follow the mentioned links. Linear Regression […]
Simple Sampling vs Importance Sampling from Monte Carlo Method
We shared the blog, which all are related to Monte Carlo based on simple sampling. To see the previous blogs of Monte Carlo, you can visit the following link. How Can We Generate Random Number From Congruential Method? How to calculate integration using Monte Carlo Method? Estimation of Value of Pi in Different Dimension Why […]
Multi-threading in Python: Basics
Multi-threading in Python is often used when there are tasks related to I/O bound. But before going further, let’s take a few examples where multi-threading could be used: Downloading images from the web and doing image processing-related tasks. It takes some time to download the image and some time to process it too but these […]
Estimation of Value of Pi in Different Dimension
Estimation of Value of Pi From Area of Circle in Two Dimension Using Monte Carlo import random import math import numpy as np import matplotlib.pyplot as plt N = [100,1000,10000,100000,100000] E = [] true_value = 3.141592 for j in range(len(N)): c= 0 s = 0 I = 0 for i in range(N[j]): x = random.random() […]
Working With Datetime in Python
Working with DateTime in Python can be a challenging job if we do not know the right module to do the right thing. Here we will explore some of the useful modules based on their purpose and application rather than exploring the module as a whole. Using datetime Datetime in Python can be done using […]
PCA From Scratch In Python
PCA is a method of dimensional reduction. When a machine learning method has a large number of features, we must choose the features that contribute the most and ignore the datasets that are less significant. This is where PCA comes into play. Consequently, PCA is an unsupervised method for choosing useful datasets from a huge […]
How to calculate integration using Monte Carlo Method?
Introduction In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data. The process of finding integrals is called integration source. To solve the many Data Science problem we should use integration. In Data Science we need to use not only […]
Python Generators
Python Generators are kind of iterators which allows us to iterate through the values returned through the function using yield keyword. In simple words, generators are the function with yield keyword instead of return. Some of benefits of using Python Generators are: They return data as a iterator rather than a whole sequence making it […]
How Can We Generate Random Number From Congruential Method?
What is Random Number A random number is one that is selected at random, as the name suggests, from a group of numbers. As they tend to be excessively slow for most applications in statistics and cryptography, the first methods for producing random numbers, such as dice, coin flipping, and roulette wheels, are still employed […]