CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-scikit-learn

A comprehensive machine learning library providing supervised and unsupervised learning algorithms with consistent APIs and extensive tools for data preprocessing, model evaluation, and deployment.

87

0.98x
Overview
Eval results
Files

task.mdevals/scenario-10/

Probabilistic Reliability Suite

Tools for uncertainty-aware regression, density-based anomaly scoring, and calibrated classification on tabular data.

Capabilities

Uncertainty-aware regression

  • Fitting on smooth one-dimensional data returns mean predictions within 0.05 of expected values and standard deviations above zero for unseen points @test
  • Lowering the smoothness setting produces predictions that fluctuate more across nearby points than when using a higher smoothness value on the same dataset @test

Density-based anomaly scoring

  • A model trained on a single cluster assigns higher average log-likelihood to in-cluster samples than to a distant outlier cluster @test

Probability calibration

  • Calibrated probabilities on a held-out set reduce Brier score compared to raw base model scores while preserving predicted labels @test
  • Calibrated probabilities sum to one for each sample and stay within [0, 1] bounds @test

Implementation

@generates

API

from typing import Iterable, Tuple

ArrayLike = Iterable[Iterable[float]]
VectorLike = Iterable[float]


class ProbabilisticSuite:
    def fit_regressor(self, features: ArrayLike, targets: VectorLike, smoothness: float = 1.0) -> None:
        """Train a probabilistic regressor that returns mean and uncertainty estimates."""

    def predict_regressor(self, features: ArrayLike) -> Tuple[VectorLike, VectorLike]:
        """Return mean predictions and standard deviations for each sample."""

    def fit_density_estimator(self, features: ArrayLike, components: int = 2) -> None:
        """Train a mixture-based density model capable of per-sample log-likelihood scoring."""

    def score_density(self, features: ArrayLike) -> VectorLike:
        """Return log-likelihood scores for each sample."""

    def fit_calibrated_classifier(self, features: ArrayLike, labels: VectorLike, cv: int = 3, method: str = "sigmoid") -> None:
        """Train a base classifier and wrap it with probability calibration using cross-validation."""

    def predict_calibrated_proba(self, features: ArrayLike) -> ArrayLike:
        """Return calibrated class probabilities for each sample."""

    def predict_calibrated_labels(self, features: ArrayLike) -> VectorLike:
        """Return class labels based on the calibrated probabilities."""

Dependencies { .dependencies }

scikit-learn { .dependency }

Provides probabilistic regression, mixture-based density estimation, and probability calibration utilities.

Install with Tessl CLI

npx tessl i tessl/pypi-scikit-learn

tile.json