The Pythoneers

Your home for innovative tech stories about Python and its limitless possibilities. Discover, learn, and get inspired.

Follow publication

ML Simplified

Machine Learning Algorithms You Never Knew Existed, But Are Quite Useful

Every heard of Tsetlin Machine!!

Abhay Parashar
The Pythoneers
Published in
11 min readMar 24, 2025
Photo by Андрей Сизов on Unsplash

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()
See how well Symbolic Regression has performed fitting the sample data

Where Can You Use This in Your Projects?

  1. Predicting Physical Laws: If you have data from physics experiments, symbolic regression can rediscover the original physical law.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

The Pythoneers
The Pythoneers

Published in The Pythoneers

Your home for innovative tech stories about Python and its limitless possibilities. Discover, learn, and get inspired.

Abhay Parashar
Abhay Parashar

Written by Abhay Parashar

Guarding Systems by Day 👨‍💻, Crafting Stories by Night ✍🏼, Weaving Code by Starlight 🤖

Responses (16)

Write a response