A OpenAI Gym Env for continuous actions
Project description
gym_contin
The domanin features a continuos state and a dicrete action space.
The environment initializes:
- cross-sectional dataset with variables X_a, X_s, Y and N observations;
- logit model fitted on the dataset, retrieving parameters \theta_0, \theta_1, \theta_2;
The agent:
- sees a patient (sample observation);
- predict his risk of admission \rho, using initialized parameters
- if \rho < 1/2:
- do not intervene on X_a, which stays the same
- else:
- sample an action a in [0,1]
- compute g(a, X_a) = newX_a
- intervene on X_a by updating it to newX_a
- give reward equal to average risk of admission, using predicted Y, initial parameters and sampled values
(shouldn't I fit a new logit-link? parameters are now diff?)
To install
-
cd gym-contin
-
python setup.py sdist bdist_wheel
-
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
-
!pip install gym-contin
-
import gym
-
import gym_contin
-
env =gym.make('contin-v0')
To change version
- change version to, e.g., 1.0.7 from setup.py file
- git clone https://github.com/claudia-viaro/gym-contin.git
- cd gym-contin
- python setup.py sdist bdist_wheel
- twine check dist/*
- twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gym_contin-1.1.9.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for gym_contin-1.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c69d9d09682c66795edc5942cb655c0b5db1be2e0996e77afaf69b42a47a99 |
|
MD5 | 9f6b6d81758f9ee64f7ab262ab0e343d |
|
BLAKE2b-256 | 08c05d92f17b5dc5ddbb3db8784c978f4eef80c6fc3953bc24f10fe3ee859d06 |