Member-only story
Featured
ML Simplified
Machine Learning Algorithms You Never Knew Existed, But Are Quite Useful
Every heard of Tsetlin Machine!!
When we talk about machine learning, the usual suspects — linear regression, decision trees, and neural networks — often steal the spotlight. But beyond these well-known models, there exist several lesser-known yet powerful algorithms that can tackle unique challenges with remarkable efficiency. In this article, we’ll explore some of the most underrated yet highly useful machine-learning algorithms that deserve a place in your toolkit.
1. Symbolic Regression
Unlike traditional regression models that assume a predefined equation, Symbolic Regression discovers the best mathematical expression to fit the data. In simpler terms: Instead of assuming
Symbolic Regression discovers the actual underlying equation as-
It uses genetic programming, which evolves models over generations through mutation and crossover (similar to natural selection).
# !pip install gplearn
import numpy as np
import matplotlib.pyplot as plt
from gplearn.genetic import SymbolicRegressor
# Generate Sample Data
X = np.linspace(-10, 10, 100).reshape(-1, 1)
y = 3*np.sin(X).ravel() + 2*X.ravel()**2 - 4
# Initialize the Symbolic Regressor
sr = SymbolicRegressor(population_size=2000,
generations=20,
stopping_criteria=0.01,
function_set=('add', 'sub', 'mul', 'div', 'sin', 'cos', 'sqrt', 'log'),
p_crossover=0.7,
random_state=42)
# Fit the model
sr.fit(X, y)
# Make Predictions
y_pred = sr.predict(X)
#
plt.scatter(X, y, color='black', label='True Data')
plt.plot(X, y_pred, color='red', label='Discovered Function')
plt.legend()
plt.show()

Where Can You Use This in Your Projects?
- Predicting Physical Laws: If you have data from physics experiments, symbolic regression can rediscover the original physical law.