MCPcopy
hub / github.com/mne-tools/mne-python / decision_function

Method decision_function

mne/decoding/search_light.py:266–287  ·  view source on GitHub ↗

Estimate distances of each data slice to the hyperplanes. Parameters ---------- X : array, shape (n_samples, nd_features, n_tasks) The input samples. For each data slice, the corresponding estimator outputs the distance to the hyperplane, e.g.:

(self, X)

Source from the content-addressed store, hash-verified

264 return self._transform(X, "predict_proba")
265
266 def decision_function(self, X):
267 """Estimate distances of each data slice to the hyperplanes.
268
269 Parameters
270 ----------
271 X : array, shape (n_samples, nd_features, n_tasks)
272 The input samples. For each data slice, the corresponding estimator
273 outputs the distance to the hyperplane, e.g.:
274 ``[estimators[ii].decision_function(X[..., ii]) for ii in range(n_estimators)]``.
275 The feature dimension can be multidimensional e.g.
276 X.shape = (n_samples, n_features_1, n_features_2, n_estimators).
277
278 Returns
279 -------
280 y_pred : array, shape (n_samples, n_estimators, n_classes * (n_classes-1) // 2)
281 Predicted distances for each estimator/data slice.
282
283 Notes
284 -----
285 This requires base_estimator to have a ``decision_function`` method.
286 """ # noqa: E501
287 return self._transform(X, "decision_function")
288
289 def _check_Xy(self, X, y=None, fit=False):
290 """Aux. function to check input data."""

Callers 1

test_search_light_basicFunction · 0.95

Calls 1

_transformMethod · 0.95

Tested by 1

test_search_light_basicFunction · 0.76