Skip to content

Commit

Permalink
Fixing the merge situation
Browse files Browse the repository at this point in the history
  • Loading branch information
prasi372 committed Nov 24, 2020
1 parent 9cdd9eb commit fe7ea13
Show file tree
Hide file tree
Showing 25 changed files with 2,306 additions and 1,372 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Sciope PYPI workflow
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
16 changes: 4 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
language: python
python:
- "3.5"
- "3.6"
# command to install dependencies
before_install:
- sudo apt-get install -y libxml2 libxml2-dev
- "3.7"
- "3.8"
install:
- python3 -m pip install gillespy2
- pip install pytest
Expand All @@ -15,15 +13,9 @@ install:
- pip install .
# tests should run from the tests directory
before_script:
- wget https://github.com/StochSS/StochKit/archive/master.zip
- unzip master.zip
- cd StochKit-master
- ./install.sh
- export STOCHKIT_HOME=$PWD
- cd ..
- cd sciope/tests
# command to run tests
script: travis_wait 30 py.test --cov-report term --cov
script: pytest --cov-report term --cov
after_success:
- codecov
- cd ../../docs/ && make html
Expand All @@ -33,7 +25,7 @@ deploy:
skip-cleanup: true
keep-history: true
on:
branch: develop
branch: master
github-token: $GITHUB_TOKEN
local-dir: docs/build/html
committer-from-gh: true
22 changes: 11 additions & 11 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
:width: 100%
:align: center

Welcome to sciope's documentation!
Welcome to Sciope's documentation!
===============================

Scalable inference, optimization and parameter exploration (sciope)
is a Python 3 package for performing machine learning-assisted likelihood-free inference and model
exploration by large-scale parameter sweeps. It has been designed to simplify the data-driven workflows
so that users quickly can test and develop new machine learning-assisted approches to likelihood-free inference
so that users quickly can test and develop new machine learning-assisted approaches to likelihood-free inference
and model exploration.

Salient features and contributions of sciope include:
Salient features and contributions of Sciope include:

Systems:

Expand All @@ -38,7 +38,7 @@ Methodology:
Stochastic Gene Regulatory Networks
-----------------------------------
Sciope has been designed for (but is not limited to) Stochastic Gene Regulatory Networks (GRN).
Sciope have built-in support and wrappers for `Gillespy2 <https://github.com/GillesPy2/GillesPy2>`_
Sciope has built-in support and wrappers for `Gillespy2 <https://github.com/GillesPy2/GillesPy2>`_
and is part of the development of next-generation `StochSS <https://stochss.org>`_.

Likelihood-free inference
Expand Down Expand Up @@ -66,23 +66,23 @@ with a `Dask <https://dask.org>`_ backend to support massive parallelism on plat

Installation
===============================
You can install sciope with ``pip``, or by installing from source.
You can install Sciope with ``pip``, or by installing from source.

Pip
---

This will install both sciope and other dependencies like NumPy, sklearn,
This will install both Sciope and other dependencies like NumPy, sklearn,
and so on that are necessary::

pip install sciope

Install from Source
-------------------

To install sciope from source, clone the repository from `github
<https://github.com/sciope/sciope>`_::
To install Sciope from source, clone the repository from `github
<https://github.com/StochSS/sciope>`_::

git clone https://github.com/sciope/sciope.git
git clone https://github.com/StochSS/sciope.git
cd sciope
pip install .

Expand Down Expand Up @@ -162,7 +162,7 @@ Use Sciope's Gillespy2 wrapper to extract simulator and parameters
Use Latin Hypercube design to generate points which will be sampled from during exploration, the points will
be generated using distributed resources if we have a Dask client initialized (in this example just a local cluster).
Generated points will be persited over the worker nodes (i.e no local memory would be used in case of a real cluster).
Generated points will be persisted over the worker nodes (i.e no local memory would be used in case of a real cluster).
Random points from the persisted collection can be gathered by calling :code:`lhc.draw(n_samples)`
Here, we will also use TSFRESH minimal feature set as our summary statistics.

Expand Down Expand Up @@ -210,7 +210,7 @@ it is therefore required that you run in a jupyter notebook with an interactive
:width: 100%
:align: center

Once at least a few points have been assigned a label, sciope has support for semi-supervised learning using label propagation where
Once at least a few points have been assigned a label, Sciope has support for semi-supervised learning using label propagation where
we can infer the labels of unassigned points. This is a great way of filtering the vast amount of data according qualitative behaviour
and preferences.

Expand Down
16 changes: 9 additions & 7 deletions examples/inference/MA2/ma2_inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
"outputs": [],
"source": [
"# Set up simulation\n",
"# We use 10,000 samples in the training dataset to be able to run the notebook quickly, which is comparitively few\n",
"# For accurate inference, the number should be 1 or 2 orders of magnitude more.\n",
"sim = simulate\n",
"true_param = [0.6, 0.2] # true \\theta moving average2\n",
"\n",
Expand All @@ -59,7 +61,7 @@
"validation_ts = np.expand_dims(np.array([simulate(p, n=100) for p in validation_thetas]), 2)\n",
"\n",
"test_thetas = np.array(prior(n=10000))\n",
"test_ts = np.expand_dims(np.array([simulate(p, n=100) for p in validation_thetas]), 2)\n",
"test_ts = np.expand_dims(np.array([simulate(p, n=100) for p in test_thetas]), 2)\n",
"\n",
"abc_trial_thetas = np.array(prior(n=30000))\n",
"abc_trial_ts = np.expand_dims(np.array([simulate(p, n=100) for p in abc_trial_thetas]), 2)"
Expand Down Expand Up @@ -233,9 +235,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CNN test MAE = 0.7031869420803443, MAE at true point = 0.1392668604850769\n",
"DNN test MAE = 0.7157589187285183, MAE at true point = 0.2387733519077301\n",
"PEN test MAE = 0.7589048176817108, MAE at true point = 0.12148187458515167\n"
"CNN test MAE = 0.3804093829415728, MAE at true point = 0.571735179424286\n",
"DNN test MAE = 0.32691127034054135, MAE at true point = 0.2187902897596359\n",
"PEN test MAE = 0.19167063390147682, MAE at true point = 0.1489650845527649\n"
]
}
],
Expand Down Expand Up @@ -323,8 +325,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[[0.36439425 0.24292797]]\n",
"MAE upon comparison as a statistic = 0.1392668604850769\n"
"[[1.21066892 0.73280144]]\n",
"MAE upon comparison as a statistic = 0.571735179424286\n"
]
}
],
Expand Down Expand Up @@ -420,7 +422,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"ABC mean inference error = 1.1916615337995151\n"
"ABC mean inference error = 1.172768172952754\n"
]
}
],
Expand Down

0 comments on commit fe7ea13

Please sign in to comment.