Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User guide #223

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft

User guide #223

wants to merge 7 commits into from

Conversation

s-bessey
Copy link
Collaborator

@s-bessey s-bessey commented Mar 1, 2022

Updates to the user guide
Closes #220, Closes #221, Closes #218

@s-bessey s-bessey marked this pull request as draft March 1, 2022 16:46
s-bessey added 2 commits March 1, 2022 12:20
We use poetry for package management, so running with `python` won't necessarily work due to missing or incorrect packages
@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2022

Codecov Report

Merging #223 (cfd0cea) into develop (778849f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #223   +/-   ##
========================================
  Coverage    97.55%   97.55%           
========================================
  Files           32       32           
  Lines         2531     2531           
========================================
  Hits          2469     2469           
  Misses          62       62           
Flag Coverage Δ
integration 87.31% <ø> (ø)
unit 89.84% <ø> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@s-bessey s-bessey marked this pull request as ready for review March 1, 2022 17:25
@s-bessey s-bessey requested a review from mcmcgrath13 March 1, 2022 17:25
docs/run_local.md Outdated Show resolved Hide resolved
@@ -2,15 +2,15 @@

The model has a wrapper script called `run_titan.py` that makes running a full simulation easy. TITAN can also be run from an interactive repl or a custom script.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider renaming this file

@@ -1,15 +1,15 @@
# Getting Started
# User Guide
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we'd discussed turning this more into a developer's guide instead of a user guide, then moving the install instructions to somewhere more prominent

@@ -0,0 +1,59 @@
# Walkthrough
For documentation on `run_titan.py`, as well as information for running the model interactively, see the [user guide](user_guide.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the walk through for? needs an intro before linking people to go elsewhere

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd think this would be more the user guide and should maybe be folded in with run_local

For documentation on `run_titan.py`, as well as information for running the model interactively, see the [user guide](user_guide.md).

## Parameter setup
TITAN uses the [`paraml`](https://pypi.org/project/paraml/) package for parameter management using YAML. In TITAN, parameters are sub-divided, with each parameter set referring to a main model parameter type (e.g. classes or agent demographics), a model feature (e.g. syringe services), or an exposure (e.g. hiv). Parameters may be set up in one YAML file or a folder of YAML files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe include a screenshot of a folder of yaml files here?

```

### Demographic parameters
Your parameter file can also be used to update demographic information and distributions for agents in the model. Here, we will change the percentage of agents of each race (white and Black) in the model. Add the following to `my_params.yml` (or play around with the numbers yourself! Just make sure they add up to 1):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of capitalizing Black here I'd make them code blocks so it clearly references the demographic classes white and black

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for each of these sections, I'd more links out where people could learn more about the params, or the features available, etc.

features:
random_trial: true
```
We can then change the parameters for the trial. Let's make it select agents randomly:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link out to the param options here

```

### Adding a random trial
Features can also be added to the model via params. To turn on the random trial feature, first we need to activate it:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link features out to somewhere

```
run_titan -p my_params.yml -S atlanta
```
This will save the results of your model in a newly-made `results` directory, or overwrite previous results in an existing `results` directory.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

screenshots might be useful in showing what the expected state should be

This will save the results of your model in a newly-made `results` directory, or overwrite previous results in an existing `results` directory.

## Sweeping parameters
TITAN can also sweep over a set of parameters defined by a CSV file. To use this feature, create a CSV with columns named as `.`-separated parameters. For example, you might change the probability of componenets being treated in the random trial module by using the column name `random_trial.prob` in a `sweep_val.csv` file and populating rows with random numbers between 0 and 1. To run this sweep over the first 10 rows of your CSV, you would use the command:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't have to be csv, right? should this mention the command line version and then maybe do the csv as a tip add on?

@s-bessey s-bessey marked this pull request as draft March 4, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting started Getting started guide Rename "getting started" section
3 participants