Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.bio.base
Commits
6f288bf6
Commit
6f288bf6
authored
Feb 23, 2017
by
Manuel Günther
Browse files
Use super in base class constructor calls
parent
572d5605
Pipeline
#7485
passed with stages
in 25 minutes and 11 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/bio/base/algorithm/BIC.py
View file @
6f288bf6
...
...
@@ -73,8 +73,7 @@ class BIC(Algorithm):
):
# call base class function and register that this tool requires training for the enrollment
Algorithm
.
__init__
(
self
,
super
(
BIC
,
self
).
__init__
(
requires_enroller_training
=
True
,
comparison_function
=
str
(
comparison_function
),
...
...
bob/bio/base/algorithm/Distance.py
View file @
6f288bf6
...
...
@@ -37,8 +37,7 @@ class Distance (Algorithm):
):
# call base class constructor and register that the algorithm performs a projection
Algorithm
.
__init__
(
self
,
super
(
Distance
,
self
).
__init__
(
distance_function
=
str
(
distance_function
),
is_distance_function
=
is_distance_function
,
...
...
bob/bio/base/algorithm/LDA.py
View file @
6f288bf6
...
...
@@ -65,8 +65,7 @@ class LDA (Algorithm):
):
# call base class constructor and register that the LDA tool performs projection and need the training features split by client
Algorithm
.
__init__
(
self
,
super
(
LDA
,
self
).
__init__
(
performs_projection
=
True
,
split_training_features_by_client
=
True
,
...
...
bob/bio/base/algorithm/PCA.py
View file @
6f288bf6
...
...
@@ -49,8 +49,7 @@ class PCA (Algorithm):
):
# call base class constructor and register that the algorithm performs a projection
Algorithm
.
__init__
(
self
,
super
(
PCA
,
self
).
__init__
(
performs_projection
=
True
,
subspace_dimension
=
subspace_dimension
,
...
...
bob/bio/base/algorithm/PLDA.py
View file @
6f288bf6
...
...
@@ -37,8 +37,7 @@ class PLDA (Algorithm):
"""Initializes the local (PCA-)PLDA tool chain with the given file selector object"""
# call base class constructor and register that this class requires training for enrollment
Algorithm
.
__init__
(
self
,
super
(
PLDA
,
self
).
__init__
(
requires_enroller_training
=
True
,
subspace_dimension_of_f
=
subspace_dimension_of_f
,
# Size of subspace F
...
...
@@ -113,7 +112,7 @@ class PLDA (Algorithm):
"""Generates the PLDA base model from a list of arrays (one per identity),
and a set of training parameters. If PCA is requested, it is trained on the same data.
Both the trained PLDABase and the PCA machine are written."""
# arrange PLDA training data
training_features
=
self
.
_arrange_data
(
training_features
)
...
...
bob/bio/base/extractor/Linearize.py
View file @
6f288bf6
...
...
@@ -15,7 +15,7 @@ class Linearize(Extractor):
def
__init__
(
self
,
dtype
=
None
):
"""If the ``dtype`` parameter is given, it specifies the data type that is enforced for the features."""
Extractor
.
__init__
(
self
,
dtype
=
dtype
)
super
(
Linearize
,
self
)
.
__init__
(
dtype
=
dtype
)
self
.
dtype
=
dtype
def
__call__
(
self
,
data
):
...
...
bob/bio/base/preprocessor/Filename.py
View file @
6f288bf6
...
...
@@ -15,7 +15,7 @@ class Filename (Preprocessor):
def
__init__
(
self
):
# call base class constructor, using a custom ``read_original_data`` that does nothing and always returns None
Preprocessor
.
__init__
(
self
,
writes_data
=
False
,
read_original_data
=
lambda
x
,
y
,
z
:
None
)
super
(
Filename
,
self
)
.
__init__
(
writes_data
=
False
,
read_original_data
=
lambda
x
,
y
,
z
:
None
)
# The call function (i.e. the operator() in C++ terms)
...
...
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