InferringIntention/keyboard_and_mouse/README.MD

2.5 KiB

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