diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-15 04:42:27 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-15 04:42:27 +0000 |
commit | 04503c2a2b6cb94c2ce424b2d887128e9d89e02f (patch) | |
tree | 7050e1b3eb7f66cfef1602a2c87f27e889bea8f3 | |
parent | 03a903228049be69f241f780e43e6a8a8cea23cc (diff) |
automatic import of python-semopy
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-semopy.spec | 378 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 380 insertions, 0 deletions
@@ -0,0 +1 @@ +/semopy-2.3.9.tar.gz diff --git a/python-semopy.spec b/python-semopy.spec new file mode 100644 index 0000000..a98e2d7 --- /dev/null +++ b/python-semopy.spec @@ -0,0 +1,378 @@ +%global _empty_manifest_terminate_build 0 +Name: python-semopy +Version: 2.3.9 +Release: 1 +Summary: Structural Equation Modeling Optimization in Python. +License: MIT License +URL: https://semopy.com +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/35/5b/07d80992e9bd2832cc28212d634a33786aab5fc86bf939a5806b9ca83f9a/semopy-2.3.9.tar.gz +BuildArch: noarch + + +%description +# semopy +[Visit our website for a detailed introduction](https://semopy.com) + + +**semopy** is a Python package that includes numerous Structural Equation Modelling (SEM) techniques. + +## Features + - Write down a model description in a user-friendly syntax + - Estimate model's parameters using a variety of objective functions + - Estimate models with population structure via random effects + - Restricted Maximum Likelihood + - Integration with gaussian processes/mixture models to tackle huge variety of phenomena + - Calculate numerous statistics and fit indices + - Estimate model's parameters in presence of ordinal variables + - A vast number of settings to fit a researcher's needs + - Fast and accurate + - Automatically create fancy HTML reports + +## Installation +**semopy** is available at PyPi and can be installed by typing the following line into terminal: + +`pip install semopy` + + +## Syntax +To specify SEM models, The **semopy** uses the syntax, which is natural to describe regression models in R. The syntax supports three operator symbols characterising relationships between variables: + +- ~ to specify structural part, +- =~ to specify measurement part, +- ~~ to specify common variance between variables. + +For example, let a linear equation in the structural part of SEM model take the form: + +`y = β1 x1 + β2 x2 + ε` + +Then, in **semopy** syntax it becomes: + +`y ~ x1 + x2` + +Parameters β1, β2 are to be estimated by **semopy**. In some cases a user might want to fix some of parameters to particular value. For instance, let's assume that we want β1 to stay equal to 2.0 and we are only interested in estimating β2: + +`y ~ 2*x1 + x2` + + +Likewise, if a latent variable η is explained by manifest variables y1, y2, y3, then in **semopy** syntax it can be written down this way: + +`eta =~ y1 + y2 + y3` + +## Quickstart + +The pipeline for working with SEM models in **semopy** consists of three steps: +1. Specifying a model +2. Loading a dataset. +3. Estimating parameters of the model. + +Main object required for scpecifying and estimating an SEM model is `Model`. + +`Model` is responsible for setting up a model from the proposed SEM syntax: +~~~ +# The first step +from semopy import Model +mod = """ x1 ~ x2 + x3 + x3 ~ x2 + eta1 + eta1 =~ y1 + y2 + y3 + eta1 ~ x1 + """ +model = Model(mod) +~~~ +Then a dataset should be provided: +~~~ +# The second step +from pandas import read_csv +data = read_csv("my_data_file.csv", index_col=0) +~~~ + + +To estimate parameters of the model we run a `fit` method with the dataset as an argument: +~~~ +# The third step +model.fit(data) +~~~ + +The default objective function for estimating parameters is the likelihood function and the optimisation method is SLSQP (Sequential Least-Squares Quadratic Programming). However, the *semopy* supports a wide range of other objective functions and optimisation schemes being specified as parameters in the `fit` method. + +Finally, user can `inspect` parameters' estimates: + +~~~ +model.inspect() +~~~ +## Would you like to know more? +Tutorial and overview of **semopy** features are available at the [project's website](https://semopy.com). + +## Requirements +**numpy**, **pandas**, **scipy**, **sympy**, **sklearn**, **statmodels** +## Authors + +* **Mescheryakov A. Georgy** - *Developer* - [georgy.m](https://gitlab.org/georgy.m) - student, SPbPU +* **Igolkina A. Anna** - *Supervisor* - [iganna](https://github.com/iganna) - Engineer, SPbPU + +## License +This project is licensed under the MIT License - see the LICENSE.md file for details. + + + +%package -n python3-semopy +Summary: Structural Equation Modeling Optimization in Python. +Provides: python-semopy +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-semopy +# semopy +[Visit our website for a detailed introduction](https://semopy.com) + + +**semopy** is a Python package that includes numerous Structural Equation Modelling (SEM) techniques. + +## Features + - Write down a model description in a user-friendly syntax + - Estimate model's parameters using a variety of objective functions + - Estimate models with population structure via random effects + - Restricted Maximum Likelihood + - Integration with gaussian processes/mixture models to tackle huge variety of phenomena + - Calculate numerous statistics and fit indices + - Estimate model's parameters in presence of ordinal variables + - A vast number of settings to fit a researcher's needs + - Fast and accurate + - Automatically create fancy HTML reports + +## Installation +**semopy** is available at PyPi and can be installed by typing the following line into terminal: + +`pip install semopy` + + +## Syntax +To specify SEM models, The **semopy** uses the syntax, which is natural to describe regression models in R. The syntax supports three operator symbols characterising relationships between variables: + +- ~ to specify structural part, +- =~ to specify measurement part, +- ~~ to specify common variance between variables. + +For example, let a linear equation in the structural part of SEM model take the form: + +`y = β1 x1 + β2 x2 + ε` + +Then, in **semopy** syntax it becomes: + +`y ~ x1 + x2` + +Parameters β1, β2 are to be estimated by **semopy**. In some cases a user might want to fix some of parameters to particular value. For instance, let's assume that we want β1 to stay equal to 2.0 and we are only interested in estimating β2: + +`y ~ 2*x1 + x2` + + +Likewise, if a latent variable η is explained by manifest variables y1, y2, y3, then in **semopy** syntax it can be written down this way: + +`eta =~ y1 + y2 + y3` + +## Quickstart + +The pipeline for working with SEM models in **semopy** consists of three steps: +1. Specifying a model +2. Loading a dataset. +3. Estimating parameters of the model. + +Main object required for scpecifying and estimating an SEM model is `Model`. + +`Model` is responsible for setting up a model from the proposed SEM syntax: +~~~ +# The first step +from semopy import Model +mod = """ x1 ~ x2 + x3 + x3 ~ x2 + eta1 + eta1 =~ y1 + y2 + y3 + eta1 ~ x1 + """ +model = Model(mod) +~~~ +Then a dataset should be provided: +~~~ +# The second step +from pandas import read_csv +data = read_csv("my_data_file.csv", index_col=0) +~~~ + + +To estimate parameters of the model we run a `fit` method with the dataset as an argument: +~~~ +# The third step +model.fit(data) +~~~ + +The default objective function for estimating parameters is the likelihood function and the optimisation method is SLSQP (Sequential Least-Squares Quadratic Programming). However, the *semopy* supports a wide range of other objective functions and optimisation schemes being specified as parameters in the `fit` method. + +Finally, user can `inspect` parameters' estimates: + +~~~ +model.inspect() +~~~ +## Would you like to know more? +Tutorial and overview of **semopy** features are available at the [project's website](https://semopy.com). + +## Requirements +**numpy**, **pandas**, **scipy**, **sympy**, **sklearn**, **statmodels** +## Authors + +* **Mescheryakov A. Georgy** - *Developer* - [georgy.m](https://gitlab.org/georgy.m) - student, SPbPU +* **Igolkina A. Anna** - *Supervisor* - [iganna](https://github.com/iganna) - Engineer, SPbPU + +## License +This project is licensed under the MIT License - see the LICENSE.md file for details. + + + +%package help +Summary: Development documents and examples for semopy +Provides: python3-semopy-doc +%description help +# semopy +[Visit our website for a detailed introduction](https://semopy.com) + + +**semopy** is a Python package that includes numerous Structural Equation Modelling (SEM) techniques. + +## Features + - Write down a model description in a user-friendly syntax + - Estimate model's parameters using a variety of objective functions + - Estimate models with population structure via random effects + - Restricted Maximum Likelihood + - Integration with gaussian processes/mixture models to tackle huge variety of phenomena + - Calculate numerous statistics and fit indices + - Estimate model's parameters in presence of ordinal variables + - A vast number of settings to fit a researcher's needs + - Fast and accurate + - Automatically create fancy HTML reports + +## Installation +**semopy** is available at PyPi and can be installed by typing the following line into terminal: + +`pip install semopy` + + +## Syntax +To specify SEM models, The **semopy** uses the syntax, which is natural to describe regression models in R. The syntax supports three operator symbols characterising relationships between variables: + +- ~ to specify structural part, +- =~ to specify measurement part, +- ~~ to specify common variance between variables. + +For example, let a linear equation in the structural part of SEM model take the form: + +`y = β1 x1 + β2 x2 + ε` + +Then, in **semopy** syntax it becomes: + +`y ~ x1 + x2` + +Parameters β1, β2 are to be estimated by **semopy**. In some cases a user might want to fix some of parameters to particular value. For instance, let's assume that we want β1 to stay equal to 2.0 and we are only interested in estimating β2: + +`y ~ 2*x1 + x2` + + +Likewise, if a latent variable η is explained by manifest variables y1, y2, y3, then in **semopy** syntax it can be written down this way: + +`eta =~ y1 + y2 + y3` + +## Quickstart + +The pipeline for working with SEM models in **semopy** consists of three steps: +1. Specifying a model +2. Loading a dataset. +3. Estimating parameters of the model. + +Main object required for scpecifying and estimating an SEM model is `Model`. + +`Model` is responsible for setting up a model from the proposed SEM syntax: +~~~ +# The first step +from semopy import Model +mod = """ x1 ~ x2 + x3 + x3 ~ x2 + eta1 + eta1 =~ y1 + y2 + y3 + eta1 ~ x1 + """ +model = Model(mod) +~~~ +Then a dataset should be provided: +~~~ +# The second step +from pandas import read_csv +data = read_csv("my_data_file.csv", index_col=0) +~~~ + + +To estimate parameters of the model we run a `fit` method with the dataset as an argument: +~~~ +# The third step +model.fit(data) +~~~ + +The default objective function for estimating parameters is the likelihood function and the optimisation method is SLSQP (Sequential Least-Squares Quadratic Programming). However, the *semopy* supports a wide range of other objective functions and optimisation schemes being specified as parameters in the `fit` method. + +Finally, user can `inspect` parameters' estimates: + +~~~ +model.inspect() +~~~ +## Would you like to know more? +Tutorial and overview of **semopy** features are available at the [project's website](https://semopy.com). + +## Requirements +**numpy**, **pandas**, **scipy**, **sympy**, **sklearn**, **statmodels** +## Authors + +* **Mescheryakov A. Georgy** - *Developer* - [georgy.m](https://gitlab.org/georgy.m) - student, SPbPU +* **Igolkina A. Anna** - *Supervisor* - [iganna](https://github.com/iganna) - Engineer, SPbPU + +## License +This project is licensed under the MIT License - see the LICENSE.md file for details. + + + +%prep +%autosetup -n semopy-2.3.9 + +%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-semopy -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 2.3.9-1 +- Package Spec generated @@ -0,0 +1 @@ +6e8e6bd7968d1f45de99c7256857f534 semopy-2.3.9.tar.gz |