Menu

Deep learning for NeuroImaging in Python.

Note

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

nidl.metrics._regression._check_reg_targets(y_true, y_pred, sample_weight, multioutput, dtype='numeric')[source]

Check that y_true, y_pred and sample_weight belong to the same regression task.

To reduce redundancy when calling _find_matching_floating_dtype, please use _check_reg_targets_with_floating_dtype instead.

Parameters:

y_true : array-like of shape (n_samples,) or (n_samples, n_outputs)

Ground truth (correct) target values.

y_pred : array-like of shape (n_samples,) or (n_samples, n_outputs)

Estimated target values.

sample_weight : array-like of shape (n_samples,) or None

Sample weights.

multioutput : array-like or string in [‘raw_values’, uniform_average’,

‘variance_weighted’] or None None is accepted due to backward compatibility of r2_score().

dtype : str or list, default=”numeric”

the dtype argument passed to check_array.

Returns:

type_true : one of {‘continuous’, continuous-multioutput’}

The type of the true target data, as output by ‘utils.multiclass.type_of_target’.

y_true : array-like of shape (n_samples, n_outputs)

Ground truth (correct) target values.

y_pred : array-like of shape (n_samples, n_outputs)

Estimated target values.

sample_weight : array-like of shape (n_samples,) or None

Sample weights.

multioutput : array-like of shape (n_outputs) or string in [‘raw_values’,

uniform_average’, ‘variance_weighted’] or None Custom output weights if multioutput is array-like or just the corresponding argument if multioutput is a correct keyword.

Follow us

© 2025, nidl developers