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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Baptiste Bauvin
Supervised MultiModal Integration Tool
Commits
3f33ad04
Commit
3f33ad04
authored
9 years ago
by
Baptiste Bauvin
Browse files
Options
Downloads
Patches
Plain Diff
Added DB file
parent
be844089
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/MultiView/GetMutliviewDb.py
+15
-0
15 additions, 0 deletions
Code/MultiView/GetMutliviewDb.py
Code/MultiView/Mumbo/Mumbo.py
+4
-2
4 additions, 2 deletions
Code/MultiView/Mumbo/Mumbo.py
with
19 additions
and
2 deletions
Code/MultiView/GetMutliviewDb.py
+
15
−
0
View file @
3f33ad04
import
numpy
as
np
def
getOneViewFromDB
(
viewName
,
pathToDB
):
view
=
np
.
genfromtxt
(
pathToDB
+
viewName
,
delimiter
=
'
;
'
)
return
view
def
getClassLabels
(
pathToDB
):
labels
=
np
.
genfromtxt
(
pathToDB
+
"
ClassLabels.csv
"
,
delimiter
=
'
;
'
)
return
labels
def
getDataset
(
pathToDB
,
viewNames
):
dataset
=
[]
for
viewName
in
viewNames
:
dataset
.
append
(
getOneViewFromDB
(
viewName
,
pathtoDB
))
return
np
.
array
(
dataset
)
This diff is collapsed.
Click to expand it.
Code/MultiView/Mumbo/Mumbo.py
+
4
−
2
View file @
3f33ad04
...
...
@@ -3,6 +3,8 @@ import math
from
joblib
import
Parallel
,
delayed
import
Classifers
# Data shape : ((Views, Examples, Corrdinates))
def
initialize
(
NB_CLASS
,
NB_VIEW
,
NB_ITER
,
DATASET_LENGTH
,
CLASS_LABELS
):
costMatrices
=
np
.
array
([
...
...
@@ -45,7 +47,7 @@ def computeWeights(costMatrices, NB_CLASS, DATASET_LENGTH, iterIndice,
return
weights
def
trainWeakClassifier
(
classifierName
,
DATASET
,
CLASS_LABELS
,
costMatrices
,
def
trainWeakClassifier
(
classifierName
,
monoviewDataset
,
CLASS_LABELS
,
costMatrices
,
NB_CLASS
,
DATASET_LENGTH
,
iterIndice
,
viewIndice
,
classifier_config
):
weights
=
computeWeights
(
costMatrices
,
NB_CLASS
,
DATASET_LENGTH
,
...
...
@@ -64,7 +66,7 @@ def trainWeakClassifers(classifierName, DATASET, CLASS_LABELS, costMatrices,
NB_JOBS
=
NB_CORES
trainedClassifiers
,
classesMatrix
=
Parallel
(
n_jobs
=
NB_JOBS
)(
delayed
(
trainWeakClassifier
)(
classifierName
,
DATASET
,
CLASS_LABELS
,
delayed
(
trainWeakClassifier
)(
classifierName
,
DATASET
[
viewIndice
]
,
CLASS_LABELS
,
costMatrices
,
NB_CLASS
,
DATASET_LENGTH
,
iterIndice
,
viewIndice
,
classifier_config
)
for
viewIndice
in
range
(
NB_VIEW
))
...
...
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