Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gym-discrete

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gym-discrete

A OpenAI Gym Env for discrete

  • 1.5.6
  • PyPI
  • Socket score

Maintainers
1

Gym-style API

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 (50 possible values between -2 and 2)
  • if risk > 0.2:
    • 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

  • git clone https://github.com/claudia-viaro/gym-discrete.git

  • cd gym-discrete

  • !pip install gym-discrete

  • import gym_discrete

  • env =gym.make('discrete-v0')

To change version

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc