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 […]
Month: October 2022
Find DateTime in the Text Using Python
Why do we need to find DateTime in the text? In the field of data science, we often have to deal with various kinds of data and one of the common is Text data but sometimes datetime in the text has to be extracted. Before jumping into a topic let’s first start with a problem […]
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 […]
Basics of Stock Backtesting in Python
Stock Backtesting in Python is way of testing our strategy in a historical data to see if our strategy makes any money or not. Let’s start with a simple story. John and Joe are two best friends. They both earned some money from their hard working corporate job and wanted to invest it in a […]
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 […]