Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Scikit learn Scikit learn AllEstimators

From Leeroopedia


Knowledge Sources
Domains Machine Learning, Discovery
Last Updated 2026-02-08 15:00 GMT

Overview

Concrete tool for discovering and listing all estimators available in scikit-learn, provided by scikit-learn.

Description

The all_estimators function crawls the scikit-learn package and returns all classes that inherit from BaseEstimator. It can optionally filter by estimator type (classifier, regressor, cluster, transformer). Classes defined in test modules are excluded. The module also provides all_displays and all_functions for discovering display classes and public functions respectively.

Usage

Use this function for introspection of the scikit-learn library, such as generating documentation, running estimator checks across all estimators, or building dynamic UI components that list available algorithms.

Code Reference

Source Location

Signature

def all_estimators(type_filter=None):
def all_displays():
def all_functions():

Import

from sklearn.utils.discovery import all_estimators

I/O Contract

Inputs

Name Type Required Description
type_filter str or list of str or None No Filter by type: 'classifier', 'regressor', 'cluster', 'transformer', or a list (default None returns all)

Outputs

Name Type Description
estimators list of tuples List of (name, class) tuples where name is the class name string

Usage Examples

Basic Usage

from sklearn.utils.discovery import all_estimators

# List all estimators
estimators = all_estimators()
print(f"Total estimators: {len(estimators)}")
print(estimators[:3])

# Filter by type
classifiers = all_estimators(type_filter="classifier")
print(f"Classifiers: {len(classifiers)}")

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment