GithubHelp home page GithubHelp logo

lilyycl / pharmpy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pharmpy/pharmpy

0.0 0.0 0.0 11.49 MB

A library and toolkit for pharmacometrics

Home Page: https://pharmpy.github.io

License: GNU General Public License v3.0

Shell 0.34% Python 99.52% CSS 0.03% AMPL 0.11%

pharmpy's Introduction

https://img.shields.io/pypi/pyversions/pharmpy-core https://codecov.io/gh/pharmpy/pharmpy/branch/main/graph/badge.svg?token=JZTHXXQPII https://pepy.tech/badge/pharmpy-core/month

logo

https://pharmpy.github.io

Pharmpy is a library and toolkit for pharmacometrics. It can be used as a regular Python package, in R via the pharmr package or via its built in command line interface.

Current features:

  • A model abstraction as a foundation for higher level operations on models
  • Functions for manipulation of models, e.g. changing model components like elimination or absorption
  • Reading NONMEM models and results
  • Running models and complex workflows (with NONMEM or to some extent nlmixr)

This is the team behind Pharmpy

Installation

Install the latest stable version from PyPI:

pip install pharmpy-core    # or 'pip3 install' if that is your default python3 pip

To be able to use components using machine learning the tflite package is needed. It can be installed using:

pip install --index-url https://google-coral.github.io/py-repo/ tflite_runtime

Python Example

>>> from pharmpy.modeling import read_model
>>> model = read_model("run1.mod")
>>> print(model.modelfit_results.parameter_estimates)
THETA(1)      0.004696
THETA(2)      0.984258
THETA(3)      0.158920
OMEGA(1,1)    0.029351
OMEGA(2,2)    0.027906
SIGMA(1,1)    0.013241
Name: 2, dtype: float64
>>> model.parameters
       name     value  lower    upper    fix
   THETA(1)  0.004693   0.00  1000000  False
   THETA(2)  1.009160   0.00  1000000  False
   THETA(3)  0.100000  -0.99  1000000  False
 OMEGA(1,1)  0.030963   0.00       oo  False
 OMEGA(2,2)  0.031128   0.00       oo  False
 SIGMA(1,1)  0.013086   0.00       oo  False
>>>

CLI Example

# Get help
pharmpy -h

# Remove first ID from dataset and save new model using new dataset
pharmpy data filter run1.mod 'ID!=1'

# Extract and print ofvs from multiple model runs
pharmpy results ofv run*.mod

pharmpy's People

Contributors

rikardn avatar stellabelin avatar pharmpy-dev-123 avatar dependabot[bot] avatar yngman avatar johanwborg avatar zhehuang96 avatar kharling avatar billdenney avatar king-of-poppk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.