update README

This commit is contained in:
Lei Shi 2024-03-25 00:49:41 +01:00
parent 83b04e2133
commit e33a28f702
3 changed files with 64 additions and 70 deletions

View file

@ -1,69 +0,0 @@
# 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 [](https://mc-stan.org/users/interfaces/rstan.html)
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

View file

@ -0,0 +1,63 @@
# Keyboard And Mouse Interactive Dataset
# Neural Network
## 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$/`
# Split Prediction
Run `sh sampler_user.sh` to split prediction to 10% to 90%
Run `sh sampler_single_act.sh` to split prediction individual action sequences.
# Bayesian Inference
Run inference to get results of intention prediction for all users and plot results
```
cd stan
Rscript strategy_inference_test.R
sh plot_user.sh
```
Run inference to get results of intention prediction (0% to 100%) for all users and plot results
```
Rscript strategy_inference_test_full_length.R
sh plot_user_length_10_steps.sh
```
Run inference to get all action sequences (0% to 100%) of all users for intention prediction
```
Rscript strategy_inference_test_all_individual_act.R
```
Plot results of user intention prediction of all action sequences
```
sh plot_user_all_individual.sh
```
Plot the user intention prediction results (0% to 100%) of all action sequences
```
sh plot_user_length_10_steps_all_individual.sh

View file

@ -2,7 +2,7 @@
Codes to reproduce results on WAH dataset[^1] Codes to reproduce results on WAH dataset[^1]
[^1]: Modified based on WAH train and test codes (https://github.com/xavierpuigf/watch_and_help)[https://github.com/xavierpuigf/watch_and_help]. [^1]: Modified based on WAH train and test codes, (see WAH)[https://github.com/xavierpuigf/watch_and_help]
## Data ## Data