Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Antoine PIGEAU
2015-Hubble-UserProfiles
Commits
6a988f2a
Commit
6a988f2a
authored
Oct 15, 2021
by
Antoine PIGEAU
Browse files
update library....need to install the correct package
parent
43a14840
Changes
3
Hide whitespace changes
Inline
Side-by-side
source/classifierManager/model/denseNN.py
View file @
6a988f2a
...
...
@@ -27,7 +27,9 @@ from project.projectParameters import ProjectParameters
import
keras
as
kr
from
keras.utils
import
plot_model
# from keras.utils import plot_model
from
keras.utils.vis_utils
import
plot_model
from
tensorflow.keras
import
optimizers
from
classifierManager.model.neuralNetworkInitializer
import
ModelLSTM
from
classifierManager.model.neuralNetworkInitializer
import
ModelPerceptron
...
...
@@ -126,8 +128,8 @@ class DenseNN:
'''
def
compile
(
self
):
optimizer
=
'rmsprop'
#'adam'
optimizer
=
kr
.
optimizers
.
RMSprop
(
lr
=
0.001
,
rho
=
0.9
,
epsilon
=
None
,
decay
=
0.0
)
#
optimizer = 'rmsprop' #'adam'
optimizer
=
optimizers
.
RMSprop
(
lr
=
0.001
,
rho
=
0.9
,
epsilon
=
None
,
decay
=
0.0
)
self
.
model
.
compile
(
optimizer
=
optimizer
,
loss
=
self
.
loss
,
metrics
=
[
'accuracy'
])
print
(
"DenseNN - compile() - compile is done"
)
...
...
source/main/ocr/classificationExperimentMerged.py
View file @
6a988f2a
...
...
@@ -39,13 +39,13 @@ if __name__ == "__main__":
classifier
=
Classifier
(
idCourses
=
ConstantModel
.
ID_COURSES
,
directory
=
Classifier
.
DIRECTORY_EXPERIMENT_MERGED
,
nameGroups
=
[
ConstantModel
.
GROUP_SUCCEED_ALL_USERS
,
ConstantModel
.
GROUP_FAILED_ALL_USERS
],
features
=
N
on
e
,
features
=
C
on
stantFeature
.
IMPLEMENTED_FEATURES
,
typeFeatureGroup
=
ConstantFeature
.
TYPE_FEATURE_GROUP
,
hiddenLayers
=
N
on
e
,
featuresByPeriod
=
ConstantFeature
.
IMPLEMENTED_FEATURES_FORWARD_BEST_MERGED_LR
,
hiddenLayers
=
C
on
stantFeature
.
HIDDEN_LAYERS_BEST_NN_PERCEPTRON_MERGED
,
featuresByPeriod
=
None
,
#
ConstantFeature.IMPLEMENTED_FEATURES_FORWARD_BEST_MERGED_LR,
featuresByCourse
=
None
)
classifier
.
setScriptClassifier
(
ConstantClassifier
.
LogisticRegressi
on
)
classifier
.
setScriptClassifier
(
ConstantClassifier
.
Perceptr
on
)
'''
...
...
@@ -90,9 +90,9 @@ if __name__ == "__main__":
Best features for LR
'''
#
classifier.scriptClassifier.getMergedForwardBestFeaturesCourse(mergedCourse,
#
features = ConstantFeature.IMPLEMENTED_FEATURES,
#
whereToCut=25)
classifier
.
scriptClassifier
.
getMergedForwardBestFeaturesCourse
(
mergedCourse
,
features
=
ConstantFeature
.
IMPLEMENTED_FEATURES
,
whereToCut
=
25
)
#
# classifier.scriptClassifier.getMergedForwardBestFeaturesCourse(mergedCourse,
# features = ConstantFeature.IMPLEMENTED_FEATURES,
...
...
source/main/oulad/classificationExperimentMerged.py
View file @
6a988f2a
...
...
@@ -40,9 +40,9 @@ if __name__ == "__main__":
directory
=
Classifier
.
DIRECTORY_EXPERIMENT_MERGED
,
nameGroups
=
[
ConstantModel
.
GROUP_ALL_GRADED
,
ConstantModel
.
GROUP_ALL_UNGRADED
],
features
=
ConstantFeature
.
IMPLEMENTED_FEATURES
,
featuresByPeriod
=
None
,
#ConstantFeature.BEST_LR_FEATURE_MERGED_ALL_PERIODS,
typeFeatureGroup
=
ConstantFeature
.
TYPE_FEATURE_GROUP
,
hiddenLayers
=
ConstantFeature
.
HIDDEN_LAYERS_BEST_NN_PERCEPTRON_MERGED
,
featuresByPeriod
=
None
,
#ConstantFeature.BEST_LR_FEATURE_MERGED_ALL_PERIODS,
featuresByCourse
=
None
)
...
...
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