Optimized Python Implementation for Chen Primes

Prime numbers have fascinated mathematicians for centuries. Among the many special categories of primes, Chen Primes occupy an interesting place because they extend the idea of twin primes and connect prime numbers with semiprimes. In this article, we’ll understand: What is a Chen Prime? A prime number P is called a Chen Prime if: A … Read more

Sending Data in Unstructured File Form

Unstructured data files consist of a series of bits. The file doesn’t separate the bits from each other in any way. You can’t simply look into the file and see any structure because there isn’t any to see. Unstructured file formats rely on the file user to know how to interpret the data. For example, … Read more

What is early stopping? | Machine Learning from Scratch

Machine learning models, particularly those trained iteratively using algorithms like Gradient Descent, face the risk of overfitting the training data. One powerful and elegant solution to this challenge is known as “Early Stopping.” In this blog post, we’ll delve into the concept of Early Stopping, explore its effectiveness, and showcase a practical implementation using a … Read more

Information Gain in Machine Learning

Information Gain

Information Gain (IG) is critical in machine learning and decision tree algorithms, particularly in data classification and 𝐟𝐞𝐚𝐭𝐮𝐫𝐞 𝐬𝐞𝐥𝐞𝐜𝐭𝐢𝐨𝐧. Information Gain Information Gain is a concept used in the field of machine learning and decision trees to measure the effectiveness of an attribute in classifying a dataset. It is commonly employed in the construction of … Read more

What is Lasso Regression? | Machine Learning from Scratch

Least Absolute Shrinkage and Selection Operator Regression (simply called Lasso Regression) is another regularized version of Linear Regression: just like Ridge Regression, it adds a regularization term to the cost function, but it uses the ℓ1 norm of the weight vector instead of half the square of the ℓ2 norm. Figure below shows the same … Read more

Regularized Linear Models(Ridge Regression) | Machine Learning from Scratch

As we saw in previous posts, a good way to reduce overfitting is to regularize the model (i.e., to constrain it): the fewer degrees of freedom it has, the harder it will be for it to overfit the data. For example, a simple way to regularize a polynomial model is to reduce the number of … Read more

Learning Curves | Machine Learning from Scratch

bias-and-variance.

Till now, We have read about Gradient Descent,Min-Batch Gradient Descent,Stochastic Gradient Descent and other type of Gradient Descents and Polynomial Regression. In this post we will learn about Learning Curves in Machine Learning . Introduction Learning curves are graphical representations of how a model’s performance changes over time as it learns from training data. These … Read more

Polynomial Regression | Machine Learning from Scratch

Polynomial regression

Introduction Till now, We have read about Gradient Descent,Min-Batch Gradient Descent,Stochastic Gradient Descent and other type of Gradient Descents. In this post we will learn about Polynomial Regression. What if your data is actually more complex than a simple straight line? Surprisingly,you can actually use a linear model to fit nonlinear data. A simple way … Read more

Datasets Importing and exporting in Python.

Python Feature Image

What is Dataset? Datasets are container of data in python. It can work as data storage for the various algorithms in python. and also a primary storage of data in Data Science. Below I will be discussing how to import a datasets as dataframe in python. For this post I’ll be using a public dataset … Read more