Skip to content
Open
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
15 changes: 7 additions & 8 deletions docs/r-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ sidebar_position: 5
`treepplr` is an interface for using the TreePPL program. All functions start
with `tp_` to easily distinguish them from functions from other packages.

The three necessary parts for doing analysis with TreePPL are: model, data and
inference machinery.
The three necessary parts for doing analysis with TreePPL are: model, data and
inference machinery.

## Model

You can choose a model in TreePPL language from our
You can choose a model in TreePPL language from our
[library](https://treeppl.org/docs/model-library) or you can write your own model.

To list all available models in our library, use `tp_model_library()` to retrieve
the models within the [TreePPL github repository](https://github.com/treeppl/treeppl/tree/main/models).
the models within the [TreePPL github repository](https://github.com/treeppl/treeppl/tree/main/lib/models).

```r
model_lib <- tp_model_library()
````
To use one of these models you just need its name in `model_lib$model_name`.

If you want to use your own custom model, you will need to write it in TreePPL
language and pass it to an R object that contains either the full path to the
If you want to use your own custom model, you will need to write it in TreePPL
language and pass it to an R object that contains either the full path to the
`.tppl` file containing the model, or a string with the full model.

```r
Expand Down Expand Up @@ -91,7 +91,7 @@ exe_path <- tp_compile(model = model_path, method = "mcmc-lightweight",
```


## Running
## Running

Now you are ready to run your analysis. All you have to do is to pass your data
to the compiled executable and choose how many independent runs you want to do.
Expand Down Expand Up @@ -122,4 +122,3 @@ output_df_mcmc <- tp_parse_mcmc(output)

Different models produce different outputs and thus require different post-processing.
See the model-specific tutorials for ways to process your TreePPL output.

21 changes: 13 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ const config = {
trailingSlash: false,
deploymentBranch: 'gh-pages',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
favicon: 'img/favicon.ico',

markdown: {
hooks: {
onBrokenMarkdownLinks: 'throw',
},
},

presets: [
[
'@docusaurus/preset-classic',
Expand Down Expand Up @@ -89,24 +94,24 @@ const config = {
algolia: {
// The application ID provided by Algolia
appId: 'GMDMVF6JJU',

// Public API key: it is safe to commit it
apiKey: '893a4c3bf8a2be3d557fca8a80ab4471',

indexName: 'treeppl',

// Optional: see doc section below
contextualSearch: true,

// Optional: Algolia search parameters
searchParameters: {},

// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: 'search',

// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
insights: false,

//... other Algolia params
},
footer: {
Expand Down
Loading