Skip to content
Snippets Groups Projects
Commit 730f242c authored by BBQ's avatar BBQ
Browse files

add preference

parent 74ec11cc
Branches learner
No related tags found
No related merge requests found
Pipeline #4616 passed
...@@ -37,10 +37,11 @@ activity: ...@@ -37,10 +37,11 @@ activity:
# Model for preference learning. If dummy is true, then the file parameter is ignored. # Model for preference learning. If dummy is true, then the file parameter is ignored.
preference: preference:
factory: de.tudresden.inf.st.eraser.starter.TestMachineLearningHandlerFactory factory: de.tudresden.inf.st.eraser.feedbackloop.learner_backup.MachineLearningHandlerFactoryImpl
# factory: de.tudresden.inf.st.eraser.starter.TestMachineLearningHandlerFactory
# File to read in. Expected format depends on factory # File to read in. Expected format depends on factory
file: src/main/resources/testHandler.properties # file: src/main/resources/testHandler.properties
# file: ../datasets/backup/preference_data.csv file: ../datasets/backup/preference_data.csv
external: true external: true
# Use dummy model in which the current activity is directly editable. Default: false. # Use dummy model in which the current activity is directly editable. Default: false.
dummy: false dummy: false
......
...@@ -104,7 +104,6 @@ public class MachineLearningImpl implements MachineLearningDecoder, MachineLearn ...@@ -104,7 +104,6 @@ public class MachineLearningImpl implements MachineLearningDecoder, MachineLearn
or let knowledge base pass all relevant items <- push model or let knowledge base pass all relevant items <- push model
*/ */
if (this.goal == GOAL_ACTIVITY_PHONE_AND_WATCH) { if (this.goal == GOAL_ACTIVITY_PHONE_AND_WATCH) {
for (Item item : changedItems) { for (Item item : changedItems) {
if(item.getID().equals("m_accel_x")) if(item.getID().equals("m_accel_x"))
{ {
...@@ -125,7 +124,7 @@ public class MachineLearningImpl implements MachineLearningDecoder, MachineLearn ...@@ -125,7 +124,7 @@ public class MachineLearningImpl implements MachineLearningDecoder, MachineLearn
empty = true; empty = true;
} }
} }
if(!empty){ if(!empty){logger.info("debug_activity_new_data");
this.activity_result = learner.activity_predictor(a_new_data); this.activity_result = learner.activity_predictor(a_new_data);
} }
a_length = 0; a_length = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment