-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_models_training.py
39 lines (31 loc) · 1.73 KB
/
user_models_training.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/python
'''
Copyright 2022 by Michał Stolarz <michal.stolarz@h-brs.de>
This file is part of migrave_personalised_behaviour_model.
It is used for running the complete pipeline for the training the user model (for both clusters).
migrave_personalised_behaviour_model is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
migrave_personalised_behaviour_model is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with migrave_personalised_behaviour_model. If not, see <http://www.gnu.org/licenses/>.
'''
import pandas as pd
from user_model.training.PerformanceSimulation import PerformanceSimulation
from user_model.training.EngagementSimulation import EngagementSimulation
available_models = ["nn", "gp", "rf", "svm", "ab"]
performance_model_name = available_models[1]
feedback_model_name = available_models[1]
data = pd.read_csv('user_model/data/final_clustered.csv', delimiter=',')
C = data[['cluster', 'engagement', 'length', 'robot_feedback', 'previous_score', 'current_score', 'current_result',
'action']]
performance_model = PerformanceSimulation(C)
performance_model.train(performance_model_name)
performance_model.eval(if_save=True)
feedback_model = EngagementSimulation(C)
feedback_model.train(feedback_model_name)
feedback_model.eval(if_save=True)