Giter Club home page Giter Club logo

polymoment's Introduction

PolyMoment: High-order Moments of Multivariate Polynomials

PolyMoment is now an online tool at http://polymoment.com/.

This is the implementation of the thesis: Moment-Based Uncertainty Propagation Using Multivariate Polynomials: Advances in Probabilistic Engineering Design.

Usage

The example below demonstrates how PolyMoment can be used to compute the high-order moment, mean, variance, standard deviation, skewness, or kurtosis of polynomial x0^2+x1^2 with random variables x0 and x1 following normal distribution with means m0 and m1, respectively, and standard deviations s0 and s1, respectively.

The supported distributions and their respective probability density functions can be found in this file.

from polymoment import PolyMoment

pm = PolyMoment(
    poly='x0**2+x1**2',
    dist={
        'x0': {
            'distribution': 'normal',	# str
            'type': 'symmetrical',      # str
            'translation': 'm0',        # str | float
            'scale': 's0',              # str | float
            'beta1': None,              # str | float
            'beta2': None,              # str | float
        },
        'x1': {
            'distribution': 'normal',   # str
            'type': 'symmetrical',      # str
            'translation': 'm1',        # str | float
            'scale': 's1',              # str | float
            'beta1': None,              # str | float
            'beta2': None,              # str | float
        }
    }
)

# mean
print(pm.mean())

# variance
print(pm.var())

# standard deviation
print(pm.std())

# skewness
print(pm.skew())

# kurtosis (excess kurtosis + 3)
print(pm.kurt())

# n-th order moment of poly
print(pm.moment(order=1))

Supported Distribution Types

'symmetrical',
'one_sided_right',
'one_sided_left'

Supported Distributions

Further information on the probability density functions listed below can be found in this file.

'uniform',
'trapezoidal',
'triangular',
'beta',
'normal',
'student',
'laplace',
'gamma',
'weibull',
'maxwell'

polymoment's People

Contributors

arvindrajan92 avatar

Watchers

 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.