Skip to content

Choquet regression

ChoquetRegressor fits a normalized monotone capacity by least squares and adds a separate intercept. The model family is grounded in Wang et al. (2000), Grabisch (2003), and Fallah Tehrani et al. (2012). See the theoretical background for the constrained learning formulation.

Model

For an observation \(x\in\mathbb R^n\), the fitted model is

\[ \widehat y = \beta_0 + C_\mu(x), \]

where \(C_\mu\) is the discrete Choquet integral and \(\mu\) is learned subject to the constraints generated by the chosen CapacitySparsity specification.

The default sparsity is FullCapacity(). In most empirical applications with more than a few features, a low-order Möbius representation such as KAdditivity(order=2) is easier to estimate and interpret.

Scaled model with \(q\)

ScaledChoquetRegressor adds the model described by Grabisch after Wang et al. without changing or replacing ChoquetRegressor:

\[ \widehat y = c + q C_\mu(x). \]

The capacity constraints are unchanged: \(\mu(\varnothing)=0\), \(\mu(N)=1\), and \(\mu(A)\leq\mu(B)\) whenever \(A\subseteq B\), together with any selected sparsity constraints. The default q_bounds=(0, np.inf) adds \(q\geq0\), so the complete fitted function remains increasing in every criterion. Set q_bounds=(-np.inf, np.inf) only when a decreasing aggregate is intended.

from capacities_ml_fin.ml.models import ScaledChoquetRegressor
from capacities_ml_fin.ml.optimization import KAdditivity

regressor = ScaledChoquetRegressor(
    sparsity=KAdditivity(order=2),
    q_bounds=(0.0, 10.0),
)
regressor.fit(X_train, y_train)

regressor.q_
regressor.intercept_

For the initial feasible capacity, \(q\) and \(c\) are estimated by ordinary least squares as proposed for the paper's submodels. The estimator then jointly minimizes squared error over \(\mu\), \(q\), and \(c\). Because \(qC_\mu\) is bilinear in the learned parameters, this joint problem is non-convex: SciPy and PYMOO are supported, while CVXPY is rejected explicitly. Normalization of \(\mu\) removes the otherwise immediate scale indeterminacy between \(q\) and \(\mu\).

As with every Choquet model, the predictors must be commensurable; adding \(q\) rescales the aggregate output but does not make criteria with unrelated units commensurable.

Basic usage

from capacities_ml_fin.ml.models import ChoquetRegressor
from capacities_ml_fin.ml.optimization import KAdditivity

regressor = ChoquetRegressor(
    sparsity=KAdditivity(order=2),
    solver="scipy",
)
regressor.fit(X_train, y_train)

y_pred = regressor.predict(X_test)

Removing the intercept

fit_intercept=True remains the default and preserves the standard model \(\widehat y=\beta_0+C_\mu(x)\). Set fit_intercept=False when the Choquet integral must be the complete prediction:

\[ \widehat y=C_\mu(x). \]
model_without_intercept = ChoquetRegressor(
    sparsity=KAdditivity(order=2),
    fit_intercept=False,
).fit(X_train, y_train)

assert model_without_intercept.intercept_ == 0.0

This form is used internally by aggregate_regression_predictions, where the capacity elements are models and the inputs are their predictions.

After fitting, important attributes include:

  • capacity_ — decoded learned capacity;
  • intercept_ — fitted additive intercept;
  • problem_ — solver-independent optimization specification;
  • result_ — backend-independent optimization result;
  • sparsity_ — the effective capacity parameterization;
  • universe_ — fitted feature universe;
  • solver_ — resolved Solver enum.

Why normalize the predictors?

A capacity is monotone in its criteria. If one feature is a benefit and another is a cost, raw values do not share a common semantic direction. The package therefore provides CapacityNormalizer.

from sklearn.pipeline import Pipeline
from capacities_ml_fin.ml.preprocessing import CapacityNormalizer

pipeline = Pipeline(
    [
        (
            "normalize",
            CapacityNormalizer(cost_features=["volatility"]),
        ),
        (
            "model",
            ChoquetRegressor(sparsity=KAdditivity(order=2)),
        ),
    ]
).set_output(transform="pandas")

A cost feature is scaled and then reversed so that a larger transformed value represents a more desirable outcome, matching the orientation of benefit criteria.

Objective and parameterization

For training observations \((x_t,y_t)\), the core objective is

\[ \min_{\mu,\beta_0} \sum_t \left[y_t-\beta_0-C_\mu(x_t)\right]^2 + \operatorname{penalty}(\theta), \]

where \(\theta\) denotes the optimized parameter vector and the penalty is optional.

The implementation exploits that the Choquet integral is linear in either the explicit capacity values or the selected Möbius coefficients once the observation matrix is fixed. A design matrix is built before optimization.

Interaction order selection

The repository regression notebook treats \(k\) as a hyperparameter:

from sklearn.model_selection import GridSearchCV, KFold
from capacities_ml_fin.ml.model_selection import capacity_parameter_grid

search = GridSearchCV(
    pipeline,
    capacity_parameter_grid(
        parameter_name="model__sparsity",
        orders=(1, 2, 3),
    ),
    scoring="neg_mean_squared_error",
    cv=KFold(n_splits=3, shuffle=True, random_state=4),
)
search.fit(X_train, y_train)

For ordered time-series data, replace shuffled CV with an appropriate temporal splitter.

Regularizing selected parameters

L1Penalty and L2Penalty apply only to positions selected in the global optimization vector. For a \(k\)-additive representation, one useful pattern is to penalize interaction terms but leave singleton terms unpenalized.

import numpy as np
from capacities_ml_fin.ml.optimization import L1Penalty

compilation = best_sparsity.compile(X_train.shape[1])
interaction_positions = np.array(
    [
        pos
        for pos, mask in enumerate(compilation.bundle.parameter_masks)
        if mask.bit_count() >= 2
    ],
    dtype=int,
)

penalty = L1Penalty(
    weight=5e-4,
    selection=interaction_positions,
)

model = ChoquetRegressor(
    sparsity=best_sparsity,
    penalty=penalty,
)

This encourages a simpler interaction structure without shrinking the entire model indiscriminately.

Interpret the learned capacity

from capacities_ml_fin.base.interpretation import (
    shapley_indices,
    pairwise_interactions,
    pairwise_interaction_matrix,
)

importance = shapley_indices(regressor.capacity_)
interactions = pairwise_interactions(regressor.capacity_)
matrix = pairwise_interaction_matrix(regressor.capacity_)

The Shapley indices summarize global variable importance in the capacity. Pairwise interactions summarize complementarity or redundancy of the aggregation rule.

Compare with an additive baseline

KAdditivity(order=1) is a natural capacity-based additive baseline. A standard LinearRegression remains useful as a conventional benchmark, especially because the Choquet regressor has a structured monotone aggregation rather than arbitrary signed linear coefficients.

from sklearn.linear_model import LinearRegression

linear = Pipeline(
    [
        ("normalize", CapacityNormalizer(cost_features=["volatility"])),
        ("model", LinearRegression()),
    ]
).set_output(transform="pandas")

Compare both on held-out data using the same preprocessing and split.

Solver choices

ChoquetRegressor accepts strings or Solver values. The default is SciPy. CVXPY is available for objective/constraint combinations with a symbolic translation; PYMOO can be used when a derivative-free evolutionary search is desired.

For ordinary least-squares capacity learning, SciPy is the simplest default in the current implementation.

Important limitations

  • Full capacities scale exponentially with the number of features.
  • Exact Shapley and interaction interpretation also scales combinatorially.
  • Monotonicity encodes a structural assumption: after orientation, increasing a criterion should not reduce the Choquet aggregate.
  • An intercept is estimated separately and is not part of the capacity.

API

See ChoquetRegressor for the generated signature and methods.