Skip to content

Time-varying model for Blood Alcohol Level(BAC) prediction.

License

Notifications You must be signed in to change notification settings

stwklu/BAC_prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BAC_prediction

Time-varying model for Blood Alcohol Level(BAC) prediction.

Abstract

Alcoholic beverages are consumed largely for their physiological and psychological effects, but they are often consumed within specific social contexts and may even be a part of religious practices. Because of the effects that alcohol has on the body and on behaviour, governments often regulate its use. A big concern that many people have is how long the alcohol they have been drinking will remain in their system. Drinking heavily puts people at risk for many adverse consequences, including disorientation, coma, or even death. But some people appear to be at greater risk than others for suffering from these problems. In this project, we construct time-dependent mathematical models to interpret this process.

Prerequisite

  • Numpy should be installed for model computation.
  • matplotlib should be installed for graphics and visualization.

Getting Ready

Our python file takes in command line input arguments, so you will need to use terminal for full functionality. Open a terminal, redirect to your work space. Then, clone this repository

git clone https://github.com/stwklu/BAC_prediction.git

Redirect into the repository

cd BAC_prediction

Give permission to execute the code

chmod u+x bac.py

Now the model is ready for use.

Usage

Note that there is no explicit way to set model parameter via command line. Hence for reasonable result you should set the parameters inside the python file before executing the following commands.

  • To replicate Example 1 Discrete Model

    ./bac.py discrete

    Using the parameter specified in report, you should obtain a graph looking like this

  • To replicate Example 2 continuous Model

    ./bac.py continuous

    Using the parameter specified in report, you should obtain a graph looking like this

  • To replicate scatter plot figure 1

    ./bac.py scatter

    Using the parameter specified in report, you should obtain a graph looking like this

  • To do all of above, simply

    ./bac.py

Acknowledgment

This project is intended for obtaining credit in MATH 372 at University of Alberta. We thank Dr.Hassan Safouhi* for providing the initiative of the project as well as the methods we need to address the problems.

About

Time-varying model for Blood Alcohol Level(BAC) prediction.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages