A OpenAI Gym Env for discrete
Project description
gym-discrete
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 all patients;
- predict risk of admission \rho, using initialized parameters
- sample an action (either 0 or 1)
- if risk > 0.2 or action=1:
- replace Xa by g, where g(\rho, Xa) is obtained using the patient's risk and Xa value
- else:
- do not intervene, X_a stays the same
- give reward equal to average risk of admission, using predicted Y, initial parameters and sampled values
To install
-
cd gym-discrete
-
python setup.py sdist bdist_wheel
-
twine check dist/*
-
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
-
!pip install gym-discrete
-
import gym_discrete
-
env =gym.make('discrete-v0')
To change version
- change version to, e.g., 1.0.7 from setup.py file
- git clone https://github.com/claudia-viaro/gym-discrete.git
- cd gym-discrete
- 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_discrete-1.2.6.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for gym_discrete-1.2.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79d424921772a47a177d1200a49aea2a8de2b918f7d0c0acb82f16d7b44a81fc |
|
MD5 | 23e17e5e6a6b002743039e330a9086fb |
|
BLAKE2b-256 | ef34711ede90c736dad97ba1dcaefba3f0d959846a39e852b21a97309630277d |