Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Supervised MultiModal Integration Tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Baptiste Bauvin
Supervised MultiModal Integration Tool
Commits
647f3189
Commit
647f3189
authored
5 years ago
by
Baptiste Bauvin
Browse files
Options
Downloads
Patches
Plain Diff
Added distrib to utils
parent
38625746
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
multiview_platform/mono_multi_view_classifiers/utils/hyper_parameter_search.py
+18
-1
18 additions, 1 deletion
...no_multi_view_classifiers/utils/hyper_parameter_search.py
with
18 additions
and
1 deletion
multiview_platform/mono_multi_view_classifiers/utils/hyper_parameter_search.py
+
18
−
1
View file @
647f3189
...
@@ -3,7 +3,7 @@ import sys
...
@@ -3,7 +3,7 @@ import sys
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
numpy
as
np
from
scipy.stats
import
randint
from
scipy.stats
import
randint
,
uniform
from
sklearn.model_selection
import
RandomizedSearchCV
from
sklearn.model_selection
import
RandomizedSearchCV
...
@@ -38,6 +38,23 @@ def grid_search(dataset, classifier_name, views_indices=None, k_folds=None, n_it
...
@@ -38,6 +38,23 @@ def grid_search(dataset, classifier_name, views_indices=None, k_folds=None, n_it
"""
Used to perfom gridsearch on the classifiers
"""
"""
Used to perfom gridsearch on the classifiers
"""
pass
pass
class
CustomUniform
:
"""
Used as a distribution returning a float between loc and loc + scale..
It can be used with a multiplier agrument to be able to perform more complex generation
for example 10 e -(float)
"""
def
__init__
(
self
,
loc
=
0
,
state
=
1
,
multiplier
=
""
):
self
.
uniform
=
uniform
(
loc
,
state
)
self
.
multiplier
=
multiplier
def
rvs
(
self
,
random_state
=
None
):
unif
=
self
.
uniform
.
rvs
(
random_state
=
random_state
)
if
self
.
multiplier
==
'
e-
'
:
return
10
**
-
unif
else
:
return
unif
class
CustomRandint
:
class
CustomRandint
:
"""
Used as a distribution returning a integer between low and high-1.
"""
Used as a distribution returning a integer between low and high-1.
It can be used with a multiplier agrument to be able to perform more complex generation
It can be used with a multiplier agrument to be able to perform more complex generation
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment