Menu

Deep learning for NeuroImaging in Python.

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the gallery for the big picture.

class nidl.callbacks.multitask_probing.MultiTaskEstimator(estimators)[source]

Bases: BaseEstimator

A meta-estimator that wraps a list of sklearn estimators for multi-task problems (mixed regression/classification).

Parameters:

estimators : list of sklearn.base.BaseEstimator

List of scikit-learn estimators (classifiers, regressors or a mixed). It sets the number of tasks to be solved.

fit(X, y)[source]

Fit each estimator on its corresponding column in y.

Parameters:

X : array-like, shape (n_samples, n_features)

y : array-like, shape (n_samples, n_tasks)

Returns:

self : the fitted estimator.

predict(X)[source]

Predict for each task, returns array of shape (n_samples, n_tasks).

Parameters:

X : array-like, shape (n_samples, n_features)

Returns:

y_preds : array-like, shape (n_samples, n_tasks)

score(X, y)[source]

Average score across all tasks.

Parameters:

X : array-like, shape (n_samples, n_features)

Test samples.

y : array-like, shape (n_samples, n_tasks)

True targets for X.

Returns:

score : float

Follow us

© 2025, nidl developers