summaryrefslogtreecommitdiff
path: root/python-gym-contin.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 08:45:57 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 08:45:57 +0000
commitdce5d3c754dfd27db60e76244946d614b526529e (patch)
tree9b4bd5b02e2e12c971cbc57c8b54b5c2c62c9bac /python-gym-contin.spec
parent7af2bfdb77aca9e68132e3f78c813306de664116 (diff)
automatic import of python-gym-contin
Diffstat (limited to 'python-gym-contin.spec')
-rw-r--r--python-gym-contin.spec193
1 files changed, 193 insertions, 0 deletions
diff --git a/python-gym-contin.spec b/python-gym-contin.spec
new file mode 100644
index 0000000..0af6ef4
--- /dev/null
+++ b/python-gym-contin.spec
@@ -0,0 +1,193 @@
+%global _empty_manifest_terminate_build 0
+Name: python-gym-contin
+Version: 1.5.0
+Release: 1
+Summary: A OpenAI Gym Env for continuous actions
+License: MIT
+URL: https://pypi.org/project/gym-contin/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/db/f9/4e01859a5d158f2bd94de2dcedecf801aa7095d8af2494179fca39fc5ee1/gym_contin-1.5.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-gym
+
+%description
+# Gym-style API
+
+The domain 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
+- git clone https://github.com/claudia-viaro/gym-contin.git
+- cd gym-contin
+
+- !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/*
+
+
+
+
+%package -n python3-gym-contin
+Summary: A OpenAI Gym Env for continuous actions
+Provides: python-gym-contin
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-gym-contin
+# Gym-style API
+
+The domain 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
+- git clone https://github.com/claudia-viaro/gym-contin.git
+- cd gym-contin
+
+- !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/*
+
+
+
+
+%package help
+Summary: Development documents and examples for gym-contin
+Provides: python3-gym-contin-doc
+%description help
+# Gym-style API
+
+The domain 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
+- git clone https://github.com/claudia-viaro/gym-contin.git
+- cd gym-contin
+
+- !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/*
+
+
+
+
+%prep
+%autosetup -n gym-contin-1.5.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-gym-contin -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.0-1
+- Package Spec generated