InferringIntention/keyboard_and_mouse
2024-03-24 23:42:27 +01:00
..
checkpoints/lstmlast_bs_8_lr_0.0001_hidden_size_128 first commit 2024-03-24 23:42:27 +01:00
dataset first commit 2024-03-24 23:42:27 +01:00
stan first commit 2024-03-24 23:42:27 +01:00
networks.py first commit 2024-03-24 23:42:27 +01:00
process_data.py first commit 2024-03-24 23:42:27 +01:00
README.MD first commit 2024-03-24 23:42:27 +01:00
sampler_single_act.py first commit 2024-03-24 23:42:27 +01:00
sampler_single_act.sh first commit 2024-03-24 23:42:27 +01:00
sampler_user.py first commit 2024-03-24 23:42:27 +01:00
sampler_user.sh first commit 2024-03-24 23:42:27 +01:00
temp.py first commit 2024-03-24 23:42:27 +01:00
test.py first commit 2024-03-24 23:42:27 +01:00
test.sh first commit 2024-03-24 23:42:27 +01:00
train.py first commit 2024-03-24 23:42:27 +01:00
train.sh first commit 2024-03-24 23:42:27 +01:00

Keyboard And Mouse Interactive Dataset

Neural Network

Requirements

The code is test in Ubuntu 20.04.

pytorch 1.11.0 matplotlib 3.3.2 pickle 4.0 pandas 1.4.3

Train

Set training parameters in train.sh

Run sh train.sh to train the model

Test

Run sh test.sh to run test on trained model

Predictions are saved under prediction/task$i$/

Bayesian Inference

Requirements

R 4.2.1 RStan

Run sh sampler_user.sh to split prediction to 10% to 90%

Run Rscript stan/strategy_inference_test.R to get results of intention prediction for all users Run sh stan/plot_user.sh to plot the bar chart for user intention prediction results of all action sequences

Run Rscript stan/strategy_inference_test_full_length.R to get results of intention prediction (0% to 100%) for all users Run sh stan/plot_user_length_10_steps.sh to plot the bar chart for user intention prediction results (0% to 100%) of all action sequences

Run sh sampler_single_act.sh to get the predictions for each individual action sequence. Run Rscript stan/strategy_inference_test_all_individual_act.R to get all action sequences (0% to 100%) of all users for intention prediction Run sh plot_user_all_individual.sh to plot the bar chart for user intention prediction results of all action sequences Run sh plot_user_length_10_steps_all_individual.sh to plot the user intention prediction results (0% to 100%) of all action sequences

Set training and test parameters in train.sh and test.sh

Run sh train.sh to train the model.

Run sh test.sh to run test on trained model. Predictions are saved under prediction/task$i$/

Run sh sampler_user.sh to split prediction to 10% to 90%

Run stan/strategy_inference_test.R to get results of intention prediction for all users Run stan/plot_user.py to plot the bar chart for user intention prediction results of all action sequences

Run stan/strategy_inference_test_full_length.R to get results of intention prediction (0% to 100%) for all users Run stan/plot_user_length_10_users.py to plot the bar chart for user intention prediction results (0% to 100%) of all action sequences

Run stan/strategy_inference_test_all_individual_act.R to get all action sequences (0% to 100%) of all users for intention prediction Run stan/plot_user_all_individual.py to plot the bar chart for user intention prediction results of all action sequences Run stan/plot_user_length_10_steps_all_individual.py to plot the user intention prediction results (0% to 100%) of all action sequences