Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pipelines
Commits
cb7069f1
Commit
cb7069f1
authored
Nov 09, 2020
by
Amir MOHAMMADI
Browse files
Fix sphinx docs of sample wrapper
parent
3975182c
Pipeline
#45127
passed with stage
in 4 minutes and 5 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
bob/pipelines/wrappers.py
View file @
cb7069f1
...
...
@@ -4,6 +4,7 @@ import os
from
functools
import
partial
import
bob.io.base
import
cloudpickle
import
dask.bag
...
...
@@ -13,8 +14,6 @@ from sklearn.base import MetaEstimatorMixin
from
sklearn.base
import
TransformerMixin
from
sklearn.pipeline
import
Pipeline
import
bob.io.base
from
.sample
import
DelayedSample
from
.sample
import
SampleBatch
from
.sample
import
SampleSet
...
...
@@ -84,13 +83,10 @@ class SampleWrapper(BaseWrapper, TransformerMixin):
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
----------
estimator
The scikit-learn estimator that is wrapped.
fit_extra_arguments : [tuple]
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
...
...
@@ -99,14 +95,14 @@ class SampleWrapper(BaseWrapper, TransformerMixin):
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",
"subject")]`` as the value for this attribute.
transform_extra_arguments : [tuple]
Similar to ``fit_extra_arguments`` but for the transform and other similar methods.
output_attribute: str
output_attribute : str
The name of a Sample attribute where the output of the estimator will be
saved to. [Default is ``data``]
Example:
if ``output_attribute`` is ``"annotations"``, then
``sample.annotations`` will contain the output of the estimator.
saved to [Default is ``data``]. For example, if ``output_attribute`` is
``"annotations"``, then ``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__
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment