Skip to content

Commit

Permalink
Small change to docs (#199)
Browse files Browse the repository at this point in the history
* Small change to docs

* Some more
  • Loading branch information
Jarno Lintusaari authored Jul 3, 2017
1 parent 713ab5e commit 6259459
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
12 changes: 6 additions & 6 deletions docs/developer/architecture.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
ELFI architecture
=================

Here we explain the internal representation of the generative model in ELFI. This
Here we explain the internal representation of the ELFI model. This
representation contains everything that is needed to generate data, but is separate from
e.g. the inference methods or the data storages. This information is aimed for developers
and is not essential for using ELFI. We assume the reader is quite familiar with Python
and has perhaps already read some of ELFI's source code.

The low level representation of the generative model is a ``networkx.DiGraph`` with nodes
The low level representation of the ELFI model is a ``networkx.DiGraph`` with nodes
represented as Python dictionaries that are called node state dictionaries. This
representation is held in ``ElfiModel.source_net``. Before the generative model can be ran,
it needs to be compiled and loaded with data (e.g. observed data, precomputed data, batch
representation is held in ``ElfiModel.source_net``. Before the ELFI model can be ran, it
needs to be compiled and loaded with data (e.g. observed data, precomputed data, batch
index, batch size etc). The compilation and loading of data is the responsibility of the
``Client`` implementation and makes it possible in essence to translate ``ElfiModel`` to any
kind of computational backend. Finally the class ``Executor`` is responsible for
``Client`` implementation and makes it possible in essence to translate ``ElfiModel`` to
any kind of computational backend. Finally the class ``Executor`` is responsible for
running the compiled and loaded model and producing the outputs of the nodes.

A user typically creates this low level representation by working with subclasses of
Expand Down
16 changes: 9 additions & 7 deletions docs/good-to-know.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ Here we describe some important concepts related to ELFI. These will help in und
how to implement custom operations (such as simulators or summaries) and can potentially
save the user from some pitfalls.

Generative model
----------------

By a generative model we mean any model that can generate some data. In ELFI the
generative model is described with a `directed acyclic graph (DAG)`_ and the representation
is stored in the `ElfiModel`_ instance. It typically includes everything from the prior
distributions up to the summaries or distances.
ELFI model
----------

In ELFI, the priors, simulators, summaries, distances, etc. are called operations. ELFI
provides a convenient syntax of combining these operations into a network that is called
an `ElfiModel`_, where each node represents an operation. Basically, the `ElfiModel`_ is a
description of how different quantities needed in the inference are to be generated. The
structure of the network is a `directed acyclic graph (DAG)`_.

.. _`directed acyclic graph (DAG)`: https://en.wikipedia.org/wiki/Directed_acyclic_graph

Expand All @@ -22,7 +24,7 @@ Operations
----------

Operations are functions (or more generally Python callables) in the nodes of the
generative model. Those nodes that deal directly with data, e.g. priors, simulators,
ELFI model. Those nodes that deal directly with data, e.g. priors, simulators,
summaries and distances should return a numpy array of length ``batch_size`` that contains
their output.

Expand Down

0 comments on commit 6259459

Please sign in to comment.