scikit-misc

0.5.2 · active · verified Thu Apr 16

scikit-misc is a Python library providing a collection of miscellaneous tools for data analysis and scientific computing. It includes algorithms that were once part of SciPy's `scipy.misc` module but were removed or deemed unstable, now offered in a more robust form. The library is currently at version 0.5.2 and maintains an active development and release cadence, requiring Python >=3.10.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to use the `loess` function from `skmisc.loess` to perform locally-weighted regression on a sample dataset, generating smoothed predictions.

import numpy as np
from skmisc.loess import loess

# Generate some sample data
x = np.linspace(0, 10, 100)
y = np.sin(x) + np.random.normal(0, 0.5, 100)

# Fit a LOESS model
model = loess(x, y)
model.fit()

# Get smoothed predictions and statistics
pred = model.predict(x).values

print(f"First 5 original y values: {y[:5]}")
print(f"First 5 smoothed y values: {pred[:5]}")

view raw JSON →