Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# ``mcerp`` Real-time latin-hypercube sampling-based Monte Carlo ERror Propagation for Python
# mcerp

**Real-time latin-hypercube sampling-based Monte Carlo ERror Propagation for Python**

[![Tests](https://github.com/eggzec/mcerp/actions/workflows/code_test.yml/badge.svg)](https://github.com/eggzec/mcerp/actions/workflows/code_test.yml)
[![Documentation](https://github.com/eggzec/mcerp/actions/workflows/docs_build.yml/badge.svg)](https://github.com/eggzec/mcerp/actions/workflows/docs_build.yml)
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

![MCERP](./_static/logo.png)

Real-time latin-hypercube-sampling-based Monte Carlo error propagation for
Python.
**Real-time latin-hypercube-sampling-based Monte Carlo error propagation for
Python.**

`mcerp` is a stochastic calculator for uncertainty analysis. It represents
inputs as probability distributions, samples them with Latin hypercube
Expand Down
12 changes: 4 additions & 8 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ from mcerp import *
Construct uncertain variables from probability distributions:

```python
x1 = N(24, 1) # normal distribution: mean 24, standard deviation 1
x2 = N(37, 4) # normal distribution: mean 37, standard deviation 4
x3 = Exp(2) # exponential distribution: lambda 2
x1 = N(24, 1) # normal distribution: mean 24, standard deviation 1
x2 = N(37, 4) # normal distribution: mean 37, standard deviation 4
x3 = Exp(2) # exponential distribution: lambda 2
```

The first four moments are available as properties:
Expand Down Expand Up @@ -227,11 +227,7 @@ plotcorr([x1, x2, x3], labels=["x1", "x2", "x3"], show=True)
Now impose a target correlation matrix:

```python
c = np.array([
[1.0, -0.75, 0.0],
[-0.75, 1.0, 0.0],
[0.0, 0.0, 1.0],
])
c = np.array([[1.0, -0.75, 0.0], [-0.75, 1.0, 0.0], [0.0, 0.0, 1.0]])

correlate([x1, x2, x3], c)
correlation_matrix([x1, x2, x3])
Expand Down
6 changes: 1 addition & 5 deletions docs/theory.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,7 @@ x1 = N(24, 1)
x2 = N(37, 4)
x3 = Exp(2)

R = np.array([
[1.0, -0.75, 0.0],
[-0.75, 1.0, 0.0],
[0.0, 0.0, 1.0],
])
R = np.array([[1.0, -0.75, 0.0], [-0.75, 1.0, 0.0], [0.0, 0.0, 1.0]])

correlate([x1, x2, x3], R)

Expand Down