Skip to content

Adapt Algo Selector

adapt_algo_selector — mvp.adapt_algo_selector

Cluster: Uncategorised | Type: component | MCP Tools: 13

Overview

Algorithm selector that extracts dataset meta-features (sample count, feature count, class imbalance, linearity) and applies rule-based heuristics to produce ranked algorithm recommendations for classification, regression, and clustering tasks. This is the canonical public name for the component backed by mvp.adapt_learning, re-exporting AdaptAlgoSelectorBlock, AlgoSelectorInput, AlgoSelectorOutput, and AlgorithmRecommendation. Pure Python with no external ML dependencies required.

When to use:

  • Selecting an appropriate ML algorithm for a given dataset without manual benchmarking
  • Getting ranked algorithm recommendations based on meta-feature analysis
  • Integrating algorithm selection into AutoML pipelines

Example:

from mvp.adapt_algo_selector import AdaptAlgoSelectorBlock, AlgoSelectorInput

block = AdaptAlgoSelectorBlock(name="algo_selector")
result = block.infer(AlgoSelectorInput(
    X=[[1.0, 2.0], [2.0, 3.0], [3.0, 4.0], [4.0, 5.0], [5.0, 6.0],
       [1.5, 2.5], [2.5, 3.5], [3.5, 4.5]],  # n_samples (rows) × n_features (cols)
    y=[0, 0, 0, 1, 1, 0, 1, 1],                # length n_samples; class labels for classification
    task="classification",                       # or "regression" / "clustering" / "auto"
))
# result.value.recommendations →
#   [KNeighborsClassifier (0.72), RandomForestClassifier (0.70), LogisticRegression (0.60)]
# result.value.dataset_properties → {n_samples: 8, n_features: 2, sample_feature_ratio: 4.0,
#                                    class_imbalance: 1.0, n_classes: 2, ...}

Required input shape: X is a list-of-lists of numeric features (list[list[float | int]]), shape n_samples × n_features. y is a list[float | int | str] of length n_samples. task accepts "classification", "regression", "clustering", or "auto" (default infers from y dtype).

Works well with: adapt_automl, adapt_sklearn, adapt_bayesian, adapt_pandas

Public API

AdaptAlgoSelectorBlock(AdaptLearningBlock)

Algorithm recommendation from dataset meta-features.

Field Type Default
name str 'adapt_algo_selector'

Methods:

infer(input) -> 'Result[AlgoSelectorOutput]'

AdaptAlgoSelectorMCPBlock(AIBlock[AdaptAlgoSelectorMCPInput, AdaptAlgoSelectorMCPOutput, dict])

Dispatcher for 11 operations.

Field Type Default
name str 'adapt_algo_selector_mcp'
resource_bounds ResourceBounds \| None None
usage ResourceUsage field(default_factory=ResourceUsage)

Methods:

infer(data: AdaptAlgoSelectorMCPInput) -> Result[AdaptAlgoSelectorMCPOutput]

MCP Tools

Operation Source
ops adapt_algo_selector_mcp
help adapt_algo_selector_mcp
recommend_algorithm adapt_algo_selector_mcp
detect_task adapt_algo_selector_mcp
get_meta_features adapt_algo_selector_mcp
list_algorithms adapt_algo_selector_mcp
list_strategies adapt_algo_selector_mcp
explain_recommendation adapt_algo_selector_mcp
list_patterns adapt_algo_selector_mcp
discover_capabilities adapt_algo_selector_mcp
snapshot_metadata adapt_algo_selector_mcp
recommend_approach adapt_algo_selector_mcp
backend_native_op adapt_algo_selector_mcp

Dependencies

  • mvp.adapt_learning