Commit cb7069f1 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Fix sphinx docs of sample wrapper

parent 3975182c
Pipeline #45127 passed with stage
in 4 minutes and 5 seconds
...@@ -4,6 +4,7 @@ import os ...@@ -4,6 +4,7 @@ import os
from functools import partial from functools import partial
import bob.io.base
import cloudpickle import cloudpickle
import dask.bag import dask.bag
...@@ -13,8 +14,6 @@ from sklearn.base import MetaEstimatorMixin ...@@ -13,8 +14,6 @@ from sklearn.base import MetaEstimatorMixin
from sklearn.base import TransformerMixin from sklearn.base import TransformerMixin
from sklearn.pipeline import Pipeline from sklearn.pipeline import Pipeline
import bob.io.base
from .sample import DelayedSample from .sample import DelayedSample
from .sample import SampleBatch from .sample import SampleBatch
from .sample import SampleSet from .sample import SampleSet
...@@ -84,13 +83,10 @@ class SampleWrapper(BaseWrapper, TransformerMixin): ...@@ -84,13 +83,10 @@ class SampleWrapper(BaseWrapper, TransformerMixin):
Do not use this class except for scikit-learn estimators. Do not use this class except for scikit-learn estimators.
.. todo::
Also implement ``predict``, ``predict_proba``, and ``score``. See:
https://scikit-learn.org/stable/developers/develop.html#apis-of-scikit-learn-objects
Attributes Attributes
---------- ----------
estimator
The scikit-learn estimator that is wrapped.
fit_extra_arguments : [tuple] fit_extra_arguments : [tuple]
Use this option if you want to pass extra arguments to the fit method of the Use this option if you want to pass extra arguments to the fit method of the
mixed instance. The format is a list of two value tuples. The first value in mixed instance. The format is a list of two value tuples. The first value in
...@@ -99,14 +95,14 @@ class SampleWrapper(BaseWrapper, TransformerMixin): ...@@ -99,14 +95,14 @@ class SampleWrapper(BaseWrapper, TransformerMixin):
passing samples to the fit method and want to pass ``subject`` attributes of passing samples to the fit method and want to pass ``subject`` attributes of
samples as the ``y`` argument to the fit method, you can provide ``[("y", samples as the ``y`` argument to the fit method, you can provide ``[("y",
"subject")]`` as the value for this attribute. "subject")]`` as the value for this attribute.
transform_extra_arguments : [tuple] output_attribute : str
Similar to ``fit_extra_arguments`` but for the transform and other similar methods.
output_attribute: str
The name of a Sample attribute where the output of the estimator will be The name of a Sample attribute where the output of the estimator will be
saved to. [Default is ``data``] saved to [Default is ``data``]. For example, if ``output_attribute`` is
Example: ``"annotations"``, then ``sample.annotations`` will contain the output of
if ``output_attribute`` is ``"annotations"``, then the estimator.
``sample.annotations`` will contain the output of the estimator. transform_extra_arguments : [tuple]
Similar to ``fit_extra_arguments`` but for the transform and other similar
methods.
""" """
def __init__( def __init__(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment