From 93820aa2d24e628ff26592c98dc30aa4bd69a928 Mon Sep 17 00:00:00 2001
From: Younes Strittmatter
Date: Thu, 2 Nov 2023 15:32:14 -0400
Subject: [PATCH] Deployed 7797f3e with MkDocs version: 1.5.3
---
404.html | 129 +-
Additional Example/Additional Example.ipynb | 72 -
Additional Example/index.html | 1407 --------------
Basic Usage/Basic Usage.ipynb | 737 ++++++-
Basic Usage/index.html | 1690 ++++++++++++++++-
index.html | 131 +-
index.md | 2 +-
quickstart/index.html | 131 +-
reference/SUMMARY/index.html | 131 +-
.../src/equation_tree/analysis/index.html | 129 +-
.../src/equation_tree/defaults/index.html | 129 +-
reference/src/equation_tree/index.html | 129 +-
reference/src/equation_tree/prior/index.html | 217 ++-
reference/src/equation_tree/sample/index.html | 167 +-
reference/src/equation_tree/src/index.html | 129 +-
.../src/sample_tree_structure/index.html | 129 +-
.../equation_tree/src/tree_node/index.html | 129 +-
reference/src/equation_tree/tree/index.html | 633 +++---
.../equation_tree/util/conversions/index.html | 129 +-
reference/src/equation_tree/util/index.html | 129 +-
.../src/equation_tree/util/io/index.html | 129 +-
.../src/equation_tree/util/priors/index.html | 129 +-
.../equation_tree/util/type_check/index.html | 129 +-
search/search_index.json | 2 +-
sitemap.xml | 15 +-
sitemap.xml.gz | Bin 381 -> 391 bytes
.../equation-formats/equation-formats.md | 16 +
user-guide/equation-formats/index.html | 1136 +++++++++++
user-guide/sampling/index.html | 1023 ++++++++++
user-guide/sampling/sampling.md | 2 +
30 files changed, 6788 insertions(+), 2272 deletions(-)
delete mode 100644 Additional Example/Additional Example.ipynb
delete mode 100644 Additional Example/index.html
create mode 100644 user-guide/equation-formats/equation-formats.md
create mode 100644 user-guide/equation-formats/index.html
create mode 100644 user-guide/sampling/index.html
create mode 100644 user-guide/sampling/sampling.md
diff --git a/404.html b/404.html
index a27db1d..4ef28e1 100644
--- a/404.html
+++ b/404.html
@@ -295,7 +295,7 @@
- Tutorials
+ User Guide
@@ -305,7 +305,7 @@
- Tutorials
+ User Guide
@@ -315,11 +315,31 @@
-
+
- Basic Usage
+ Sampling
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Equation Formats
@@ -354,6 +374,69 @@
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
Code Reference
@@ -395,10 +478,10 @@
-
+
-
+
@@ -409,8 +492,8 @@
-
-
+
+
Src
@@ -431,7 +514,7 @@
-
+
@@ -447,14 +530,14 @@
-
+
-
-
+
+
Equation tree
@@ -575,7 +658,7 @@
-
+
@@ -591,14 +674,14 @@
-
+
-
-
+
+
Src
@@ -667,7 +750,7 @@
-
+
@@ -683,14 +766,14 @@
-
+
-
-
+
+
Util
diff --git a/Additional Example/Additional Example.ipynb b/Additional Example/Additional Example.ipynb
deleted file mode 100644
index b211083..0000000
--- a/Additional Example/Additional Example.ipynb
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "cells": [
- {
- "attachments": {},
- "cell_type": "markdown",
- "metadata": {
- "collapsed": false
- },
- "source": [
- "# Additional Example\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "collapsed": false
- },
- "outputs": [],
- "source": [
- "from autora.equation_tree.equation_tree import Example"
- ]
- },
- {
- "attachments": {},
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Include inline mathematics like this: $4 < 5$\n",
- "\n",
- "Include block mathematics like this (don't forget the empty lines above and below the block):\n",
- "\n",
- "$$ \n",
- "y + 1 = 4 \n",
- "$$\n",
- "\n",
- "... or this:\n",
- "\n",
- "\\begin{align}\n",
- " p(v_i=1|\\mathbf{h}) & = \\sigma\\left(\\sum_j w_{ij}h_j + b_i\\right) \\\\\n",
- " p(h_j=1|\\mathbf{v}) & = \\sigma\\left(\\sum_i w_{ij}v_i + c_j\\right)\n",
- "\\end{align}"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": []
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 2
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython2",
- "version": "2.7.6"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 0
-}
diff --git a/Additional Example/index.html b/Additional Example/index.html
deleted file mode 100644
index 817ba2d..0000000
--- a/Additional Example/index.html
+++ /dev/null
@@ -1,1407 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Additional Example - AutoRA Equation Tree
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Basic Usage/Basic Usage.ipynb b/Basic Usage/Basic Usage.ipynb
index b0a7cca..adc205b 100644
--- a/Basic Usage/Basic Usage.ipynb
+++ b/Basic Usage/Basic Usage.ipynb
@@ -7,7 +7,12 @@
"collapsed": false
},
"source": [
- "# Basic Usage\n"
+ "# Basic Usage\n",
+ "Here, we demonstrate core functionalities of the Equation Tree:\n",
+ "- Basic Functionality for sampling and processing equations\n",
+ "- Advanced settings for sampling equations\n",
+ "\n",
+ "## Installation"
]
},
{
@@ -21,7 +26,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "Requirement already satisfied: equation_tree in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src (0.0.11.dev21+gc4ad4e6.d20230918)\r\n",
+ "Requirement already satisfied: equation_tree in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src (0.0.11.dev27+g1da6b63.d20231102)\r\n",
"Requirement already satisfied: numpy in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/venv/lib/python3.11/site-packages (from equation_tree) (1.25.2)\r\n",
"Requirement already satisfied: sympy in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/venv/lib/python3.11/site-packages (from equation_tree) (1.12)\r\n",
"Requirement already satisfied: importlib_resources in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/venv/lib/python3.11/site-packages (from equation_tree) (6.0.1)\r\n",
@@ -34,26 +39,699 @@
}
],
"source": [
+ "import random\n",
"!pip install equation_tree"
]
},
{
"cell_type": "markdown",
"source": [
- "Include inline mathematics like this: $4 < 5$\n",
+ "## Basic Functionality\n",
"\n",
- "Include block mathematics like this (don't forget the empty lines above and below the block):\n",
+ "### Sampling With Default Settings\n",
+ "First, we need to import the functionality. Here we also set a seed to ensure reproducible results."
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "outputs": [],
+ "source": [
+ "from equation_tree import sample\n",
"\n",
- "$$ \n",
- "y + 1 = 4 \n",
- "$$\n",
+ "# To obtain reproducible results, we set a seed for the following section\n",
+ "import numpy as np\n",
+ "np.random.seed(42)\n",
+ "# Adjusting the input dimension of the equations"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "We use this to sample an equation:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.\n",
+ " warnings.warn(\n",
+ "Processing: 100%|██████████| 1/1 [00:00<00:00, 9.77iteration/s]\n"
+ ]
+ }
+ ],
+ "source": [
+ "equation = sample()"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "### Equation Representations And Features\n",
"\n",
- "... or this:\n",
+ "First, lets look at the type of the equation"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "list"
+ },
+ "execution_count": 4,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "type(equation)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "It is a list! This is because we can sample multiple equations in one go:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Processing: 0%| | 0/100 [00:00, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:51: RuntimeWarning: invalid value encountered in log\n",
+ " \"log\": lambda a: np.log(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:55: RuntimeWarning: invalid value encountered in arccos\n",
+ " \"acos\": lambda a: np.arccos(a),\n",
+ "Processing: 7%|▋ | 7/100 [00:00<00:01, 68.58iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:40: RuntimeWarning: invalid value encountered in scalar power\n",
+ " \"^\": lambda a, b: a**b,\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:52: RuntimeWarning: invalid value encountered in sqrt\n",
+ " \"sqrt\": lambda a: np.sqrt(a),\n",
+ "Processing: 14%|█▍ | 14/100 [00:00<00:01, 68.71iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:56: RuntimeWarning: invalid value encountered in arcsin\n",
+ " \"asin\": lambda a: np.arcsin(a),\n",
+ "Processing: 100%|██████████| 100/100 [00:01<00:00, 85.06iteration/s]\n"
+ ]
+ }
+ ],
+ "source": [
+ "equations = sample(n = 100)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "This returns 100 equations:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "100"
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "len(equations)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "-sin(x_1 - exp(exp(x_1)))"
+ },
+ "execution_count": 7,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[0]"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "-c_2 + tan(c_1*x_1)"
+ },
+ "execution_count": 8,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[42]"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "They are represented as strings, but we can look at other representations as well. For example, prefix notation (for more details on different representations of the equations, see the respective section of the documentation):"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "['-', 'tan', '*', 'c_1', 'x_1', 'c_2']"
+ },
+ "execution_count": 9,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[42].prefix"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "We can also look at features of the equation, for example at the number of constants, the tree depth of the underlying tree, the number of nodes or the tree structure (for more details on these features, see the respective section of the documentation):"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "2"
+ },
+ "execution_count": 10,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[42].n_constants"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "3"
+ },
+ "execution_count": 11,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[42].depth"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "6"
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[42].n_nodes"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "[0, 1, 2, 3, 3, 1]"
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations[42].structure"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "### Instantiate Equations\n",
"\n",
- "\\begin{align}\n",
- " p(v_i=1|\\mathbf{h}) & = \\sigma\\left(\\sum_j w_{ij}h_j + b_i\\right) \\\\\n",
- " p(h_j=1|\\mathbf{v}) & = \\sigma\\left(\\sum_i w_{ij}v_i + c_j\\right)\n",
- "\\end{align}"
+ "Note: the sampled equation are abstract: c_1 are representation of a constant. We can instantiate constants to be numbers:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "abstract: -c_2 + tan(c_1*x_1) , instantiated: tan(0.2720878822071884*x_1) - 0.4936315339297549\n"
+ ]
+ }
+ ],
+ "source": [
+ "# first we need to import the functionality\n",
+ "from equation_tree import instantiate_constants\n",
+ "import random\n",
+ "\n",
+ "# then we can use a function to instantiate the constants. For example for random constants between 0 and 1:\n",
+ "instantiated_equation = instantiate_constants(equations[42], lambda : random.random())\n",
+ "print(f'abstract: {equations[42]}', f', instantiated: {instantiated_equation}')"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "abstract: c_2*x_1**c_1 , instantiated: x_1\n"
+ ]
+ }
+ ],
+ "source": [
+ "# we can also use other functions (for example all functions to be a constant\n",
+ "instantiated_equation_ = instantiate_constants(equations[41], lambda : 1)\n",
+ "print(f'abstract: {equations[41]}', f', instantiated: {instantiated_equation_}')"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "**We can use arbitrary functions to instantiate the constants.\n",
+ "\n",
+ "### Evaluating Equations\n",
+ "\n",
+ "After instantiating equations, we can also evaluate on arbitrary input:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "array([-0.21462429, 0.11148855, 0.57008635, 1.41577756])"
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# import functionality\n",
+ "values = instantiated_equation.evaluate({'x_1': [1, 2, 3, 4]})\n",
+ "values"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "array([-0.21462429, 0.11148855, 0.57008635, 1.41577756])"
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# We can also use pandas dataframes as inputs:\n",
+ "\n",
+ "# import functionality\n",
+ "import pandas as pd\n",
+ "\n",
+ "# define the input and get the values\n",
+ "input_df = pd.DataFrame({'x_1': [1, 2, 3, 4]})\n",
+ "instantiated_equation.evaluate(input_df)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "\n",
+ "## Sample Settings\n",
+ "\n",
+ "When sampling equations, we can control for a variety of features of the underlying distribution.\n",
+ "\n",
+ "### Input Dimensions\n",
+ "\n",
+ "We can manipulate the space on witch the equation is defined. For example, if we want equations that are defined on 2-dimensions, we can write:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.\n",
+ " warnings.warn(\n",
+ "Processing: 0%| | 0/5 [00:00, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:55: RuntimeWarning: invalid value encountered in arccos\n",
+ " \"acos\": lambda a: np.arccos(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:51: RuntimeWarning: invalid value encountered in log\n",
+ " \"log\": lambda a: np.log(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:56: RuntimeWarning: invalid value encountered in arcsin\n",
+ " \"asin\": lambda a: np.arcsin(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:52: RuntimeWarning: invalid value encountered in sqrt\n",
+ " \"sqrt\": lambda a: np.sqrt(a),\n",
+ "Processing: 100%|██████████| 5/5 [00:00<00:00, 112.51iteration/s]\n"
+ ]
+ }
+ ],
+ "source": [
+ "equations_2d = sample(n=5, max_num_variables=2)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "outputs": [
+ {
+ "data": {
+ "text/plain": "[acos(Abs(acos(x_1))),\n -Abs(x_2) + asin(log(x_1)),\n Max(c_1, x_1),\n Max(x_1, Abs(sqrt(sin(x_1)))),\n cos(x_1*(c_1 + x_2))]"
+ },
+ "execution_count": 27,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "equations_2d"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "**Note: Not all the equations have exactly 2 input variable. Some of them have only one. This is since equations with only one input variable are still defined on 2 (or more dimensions)\n",
+ "\n",
+ "### Equation Complexity\n",
+ "\n",
+ "We can also manipulate the equation complexity (as number of nodes)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.\n",
+ " warnings.warn(\n",
+ "Processing: 0%| | 0/5 [00:00, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:55: RuntimeWarning: invalid value encountered in arccos\n",
+ " \"acos\": lambda a: np.arccos(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:56: RuntimeWarning: invalid value encountered in arcsin\n",
+ " \"asin\": lambda a: np.arcsin(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:40: RuntimeWarning: invalid value encountered in scalar power\n",
+ " \"^\": lambda a, b: a**b,\n",
+ "Processing: 100%|██████████| 5/5 [00:00<00:00, 312.27iteration/s]\n",
+ "Processing: 0%| | 0/5 [00:00, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:40: RuntimeWarning: divide by zero encountered in scalar power\n",
+ " \"^\": lambda a, b: a**b,\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:47: RuntimeWarning: invalid value encountered in sin\n",
+ " \"sin\": lambda a: np.sin(a),\n",
+ "Processing: 40%|████ | 2/5 [00:00<00:00, 12.82iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:52: RuntimeWarning: invalid value encountered in sqrt\n",
+ " \"sqrt\": lambda a: np.sqrt(a),\n",
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:51: RuntimeWarning: invalid value encountered in log\n",
+ " \"log\": lambda a: np.log(a),\n",
+ "Processing: 100%|██████████| 5/5 [00:00<00:00, 21.56iteration/s]\n"
+ ]
+ }
+ ],
+ "source": [
+ "equations_simple = sample(n=5, depth=3)\n",
+ "equations_complex = sample(n=5, depth=8)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "*** simple equations ***\n",
+ " [acos(exp(x_1)), Max(c_1, x_1), x_1/c_1, asin(exp(x_1)), x_1**c_1] \n",
+ "\n",
+ "*** complex equations ***\n",
+ " [sin(exp(sqrt(1 - sin(x_1)**2)/sin(x_1))**x_1), (x_1 + Min(x_1, sin(x_1)))/sqrt(1 - (x_1 + Min(x_1, sin(x_1)))**2), sqrt(Min(c_1**sin(sin(x_1)), x_1)), -asin(x_1)**x_1 + Min(c_1, x_1), Max(-x_1 + log(x_1), sqrt(Abs(x_1)))]\n"
+ ]
+ }
+ ],
+ "source": [
+ "print('*** simple equations ***\\n', equations_simple, '\\n')\n",
+ "print('*** complex equations ***\\n', equations_complex)"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "### Using Priors\n",
+ "We can also make use of priors to fully customize the sampling. Here, the entries for the structures, features, functions and operators represent the probability of the respective attribute being sampled."
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.\n",
+ " warnings.warn(\n",
+ "Processing: 100%|██████████| 100/100 [00:00<00:00, 190.81iteration/s]\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": "[cos(cos(x_1)),\n sin(sin(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n -x_3 + sin(x_2) + cos(x_1),\n cos(cos(x_1)),\n cos(sin(x_1)),\n sin(cos(x_1)),\n x_1 + x_2,\n sin(cos(x_1)),\n cos(sin(x_1)),\n x_1 + x_2,\n cos(sin(x_1)),\n x_1 - x_2,\n x_1 + x_2,\n sin(sin(x_1)),\n x_1 + x_2,\n sin(cos(x_1)),\n -c_1 + x_1,\n sin(cos(x_1)),\n x_1 + x_2,\n x_1 + x_2,\n x_1 + x_2,\n x_1 + x_2,\n sin(cos(x_1)),\n c_1 + x_1,\n x_1 - x_2,\n x_1 - x_2,\n x_1 + x_2,\n sin(sin(x_1)),\n c_1 + x_1,\n cos(sin(x_1)),\n cos(sin(x_1)),\n cos(sin(x_1)),\n cos(cos(x_1)),\n c_1 + x_1,\n sin(cos(x_1)),\n sin(cos(x_1)),\n x_1 - x_2,\n cos(sin(x_1)),\n cos(sin(x_1)),\n x_1 - x_2,\n cos(cos(x_1)),\n x_1 + x_2,\n x_1 + x_2,\n sin(sin(x_1)),\n c_1 + x_1,\n c_1 + x_1,\n x_1 + x_2,\n x_1 - x_2,\n sin(sin(x_1)),\n cos(cos(x_1)),\n cos(cos(x_1)),\n cos(cos(x_1)),\n sin(cos(x_1)),\n x_1 - x_2,\n sin(sin(x_1)),\n cos(cos(x_1)),\n c_1 + x_1,\n sin(sin(x_1)),\n cos(sin(x_1)),\n cos(sin(x_1)),\n x_1 + x_2,\n cos(sin(x_1)),\n sin(cos(x_1)),\n c_1 + x_1,\n -x_2,\n x_1 - x_2,\n -x_3 + sin(x_1) + sin(x_2),\n c_1 + x_1,\n x_1 + x_2,\n c_1 + x_1,\n c_1 + x_1,\n sin(sin(x_1)),\n cos(cos(x_1)),\n x_1 + x_2,\n c_1 + x_1,\n -x_1 + cos(x_1) + cos(x_2),\n x_1 - x_2,\n cos(sin(x_1)),\n sin(cos(x_1)),\n sin(cos(x_1)),\n sin(cos(x_1)),\n -x_3 + sin(x_1) + cos(x_2),\n x_1 + x_2,\n -x_3 + sin(x_2) + cos(x_1),\n -x_3 + sin(x_1) + sin(x_2),\n c_1 - x_1,\n c_1 + x_1,\n c_1 + x_1,\n cos(cos(x_1)),\n -x_2 + sin(x_2) + cos(x_1),\n c_1 + x_1,\n sin(sin(x_1)),\n c_1 + x_1,\n x_1 + x_2,\n sin(sin(x_1)),\n x_1 + x_2,\n x_1 + x_2,\n cos(sin(x_1)),\n sin(sin(x_1))]"
+ },
+ "execution_count": 34,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "p = {\n",
+ " 'structures': {'[0, 1, 1]': .3, '[0, 1, 2]': .3, '[0, 1, 2, 3, 2, 3, 1]': .4},\n",
+ " 'features': {'constants': .2, 'variables': .8},\n",
+ " 'functions': {'sin': .5, 'cos': .5},\n",
+ " 'operators': {'+': .8, '-': .2}\n",
+ "}\n",
+ "equations_with_prior = sample(n=10, prior=p, max_num_variables=10)\n",
+ "equations_with_prior"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "markdown",
+ "source": [
+ "We can also use conditional priors conditioned on the parent node:"
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.\n",
+ " warnings.warn(\n",
+ "Processing: 100%|██████████| 100/100 [00:00<00:00, 128.08iteration/s]\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": "[cos(cos(x_1)),\n x_1 - x_2,\n -c_1 + x_1,\n sin(cos(x_1)),\n sin(cos(x_1)),\n c_1 + x_1,\n -c_1 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n cos(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n sin(cos(x_1)),\n c_1 - x_1,\n -x_3 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n c_1 - x_1,\n sin(cos(x_1)),\n cos(cos(x_1)),\n x_1 - x_2,\n -c_1 + sin(x_1) + sin(x_2),\n -x_3 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n c_1 - x_1,\n sin(cos(x_1)),\n x_1 - x_2,\n -x_3 - sin(x_2) + cos(x_1),\n -c_1 + x_1,\n sin(cos(x_1)),\n cos(cos(x_1)),\n sin(cos(x_1)),\n x_1 + x_2,\n cos(cos(x_1)),\n -x_3 + sin(x_1) - sin(x_2),\n c_1 + x_1,\n cos(cos(x_1)),\n cos(cos(x_1)),\n sin(cos(x_1)),\n x_1 - x_2,\n -x_3 + sin(x_1) + sin(x_2),\n -c_1 + x_1,\n c_1 - x_1,\n c_1 + x_1,\n c_1 + x_1,\n cos(cos(x_1)),\n -c_1 + sin(x_1) + sin(x_2),\n c_1 + x_1,\n sin(cos(x_1)),\n sin(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n -x_3 + sin(x_1) - cos(x_2),\n sin(cos(x_1)),\n x_1 - x_2,\n -x_3 + cos(x_1) - cos(x_2),\n x_1 - x_2,\n cos(cos(x_1)),\n sin(cos(x_1)),\n -x_2 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n -c_1 + sin(x_1) + sin(x_2),\n -x_2 + sin(x_1) - cos(x_2),\n cos(cos(x_1)),\n -x_2 + sin(x_1) + sin(x_2),\n -x_3 + sin(x_1) + sin(x_2),\n sin(cos(x_1)),\n cos(cos(x_1)),\n cos(cos(x_1)),\n -c_1 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n cos(cos(x_1)),\n cos(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n cos(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n x_1 + x_2,\n c_1 - x_1,\n -x_1 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n -c_1 + sin(x_1) + sin(x_2),\n c_1 - x_1,\n cos(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n c_1 - x_1,\n -x_3 + sin(x_1) + sin(x_2),\n cos(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n c_1 + x_1,\n x_1 - x_2,\n cos(cos(x_1)),\n c_1 + x_1,\n cos(cos(x_1)),\n sin(cos(x_1)),\n sin(cos(x_1)),\n sin(cos(x_1)),\n sin(cos(x_1)),\n sin(cos(x_1)),\n -x_3 + sin(x_1) + sin(x_2),\n c_1 + x_1]"
+ },
+ "execution_count": 38,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "p_ = {\n",
+ " 'structures': {'[0, 1, 1]': .3, '[0, 1, 2]': .3, '[0, 1, 2, 3, 2, 3, 1]': .4},\n",
+ " 'features': {'constants': .2, 'variables': .8},\n",
+ " 'functions': {'sin': .5, 'cos': .5},\n",
+ " 'operators': {'+': .5, '-': .5},\n",
+ " 'function_conditionals': {\n",
+ " 'sin': {\n",
+ " 'features': {'constants': 0., 'variables': 1.},\n",
+ " 'functions': {'sin': 0., 'cos': 1.},\n",
+ " 'operators': {'+': .5, '-': .5}\n",
+ " },\n",
+ " 'cos': {\n",
+ " 'features': {'constants': 0., 'variables': 1.},\n",
+ " 'functions': {'cos': 1., 'sin': 0.},\n",
+ " 'operators': {'+': 0., '-': 1.}\n",
+ " }\n",
+ " },\n",
+ " 'operator_conditionals': {\n",
+ " '+': {\n",
+ " 'features': {'constants': .5, 'variables': .5},\n",
+ " 'functions': {'sin': 1., 'cos': 0.},\n",
+ " 'operators': {'+': 1., '-': 0.}\n",
+ " },\n",
+ " '-': {\n",
+ " 'features': {'constants': .3, 'variables': .7},\n",
+ " 'functions': {'cos': .5, 'sin': .5},\n",
+ " 'operators': {'+': .9, '-': .1}\n",
+ " }\n",
+ " },\n",
+ "}\n",
+ "equations_with_conditional_prior = sample(n=10, prior=p_, max_num_variables=10)\n",
+ "equations_with_conditional_prior"
],
"metadata": {
"collapsed": false
@@ -61,8 +739,39 @@
},
{
"cell_type": "markdown",
- "metadata": {},
- "source": []
+ "source": [
+ "**WARNING**\n",
+ "If your application is dependent on these priors, you should \"burn\" samples before starting the sampling.\n",
+ "During the sampling process, equations get simplified and invalid equations are discarded. This is likely to lead to disparities between the priors and the sampled frequencies.\n",
+ "To counteract this, the package offers the functionality to \"burn\" samples and adjust the priors so that the outcome frequency match them more closely. To burn samples, use the following code (We don't run it in the notebook since the adjusted priors are saved to disk for future use):\n",
+ "```\n",
+ "burn(\n",
+ " prior,\n",
+ " max_number_variables,\n",
+ " path_to_file,\n",
+ " number_of_burned_samples,\n",
+ " learning_rate\n",
+ " )\n",
+ "```\n",
+ "*this function should be run multiple times. The learning rate defines how much adjusted from previous runs are adjusted.\n",
+ "After burning, you can load the adjusted priors via:\n",
+ "```\n",
+ " sample(..., file=path_to_file)\n",
+ "```\n",
+ "*multiple adjusted priors can be stored in the same file."
+ ],
+ "metadata": {
+ "collapsed": false
+ }
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "outputs": [],
+ "source": [],
+ "metadata": {
+ "collapsed": false
+ }
}
],
"metadata": {
diff --git a/Basic Usage/index.html b/Basic Usage/index.html
index aedca68..29e7109 100644
--- a/Basic Usage/index.html
+++ b/Basic Usage/index.html
@@ -11,10 +11,6 @@
-
-
-
-
@@ -288,37 +284,35 @@
-
-
-
+
-
+
- Tutorials
+ User Guide
-
+
- Tutorials
+ User Guide
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
-
+
-
-
+
+
Code Reference
@@ -418,10 +485,10 @@
-
+
-
+
@@ -432,8 +499,8 @@
-
-
+
+
Src
@@ -454,7 +521,7 @@
-
+
@@ -470,14 +537,14 @@
-
+
-
-
+
+
Equation tree
@@ -598,7 +665,7 @@
-
+
@@ -614,14 +681,14 @@
-
+
-
-
+
+
Src
@@ -690,7 +757,7 @@
-
+
@@ -706,14 +773,14 @@
-
+
-
-
+
+
Util
@@ -850,6 +917,96 @@
+
+
+ Table of contents
+
+
+
@@ -1284,7 +1441,12 @@
@@ -1307,9 +1469,11 @@ Basic Usage¶
-! pip install equation_tree
+import random
+! pip install equation_tree
-!pip install equation_tree
+import random
+!pip install equation_tree
@@ -1321,7 +1485,7 @@ Basic Usage¶
-
Requirement already satisfied: equation_tree in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src (0.0.11.dev21+gc4ad4e6.d20230918)
+Requirement already satisfied: equation_tree in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src (0.0.11.dev27+g1da6b63.d20231102)
Requirement already satisfied: numpy in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/venv/lib/python3.11/site-packages (from equation_tree) (1.25.2)
Requirement already satisfied: sympy in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/venv/lib/python3.11/site-packages (from equation_tree) (1.12)
Requirement already satisfied: importlib_resources in /Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/venv/lib/python3.11/site-packages (from equation_tree) (6.0.1)
@@ -1343,16 +1507,147 @@ Basic Usage¶
+
+
+
+
+
+
+
+
+
+
+
+
+
/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.
+ warnings.warn(
+Processing: 100%|██████████| 1/1 [00:00<00:00, 9.77iteration/s]
+
+
+
+
+
+
+
+
+
@@ -1363,6 +1658,1295 @@
Basic Usage¶
+
+
+
+
+
+
+
+
+
+
+
+
Processing: 0%| | 0/100 [00:00<?, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:51: RuntimeWarning: invalid value encountered in log
+ "log": lambda a: np.log(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:55: RuntimeWarning: invalid value encountered in arccos
+ "acos": lambda a: np.arccos(a),
+Processing: 7%|▋ | 7/100 [00:00<00:01, 68.58iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:40: RuntimeWarning: invalid value encountered in scalar power
+ "^": lambda a, b: a**b,
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:52: RuntimeWarning: invalid value encountered in sqrt
+ "sqrt": lambda a: np.sqrt(a),
+Processing: 14%|█▍ | 14/100 [00:00<00:01, 68.71iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:56: RuntimeWarning: invalid value encountered in arcsin
+ "asin": lambda a: np.arcsin(a),
+Processing: 100%|██████████| 100/100 [00:01<00:00, 85.06iteration/s]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Out[7]:
+
+
-sin(x_1 - exp(exp(x_1)))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Out[9]:
+
+
['-', 'tan', '*', 'c_1', 'x_1', 'c_2']
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
abstract: -c_2 + tan(c_1*x_1) , instantiated: tan(0.2720878822071884*x_1) - 0.4936315339297549
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
abstract: c_2*x_1**c_1 , instantiated: x_1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Out[16]:
+
+
array([-0.21462429, 0.11148855, 0.57008635, 1.41577756])
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Out[17]:
+
+
array([-0.21462429, 0.11148855, 0.57008635, 1.41577756])
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.
+ warnings.warn(
+Processing: 0%| | 0/5 [00:00<?, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:55: RuntimeWarning: invalid value encountered in arccos
+ "acos": lambda a: np.arccos(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:51: RuntimeWarning: invalid value encountered in log
+ "log": lambda a: np.log(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:56: RuntimeWarning: invalid value encountered in arcsin
+ "asin": lambda a: np.arcsin(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:52: RuntimeWarning: invalid value encountered in sqrt
+ "sqrt": lambda a: np.sqrt(a),
+Processing: 100%|██████████| 5/5 [00:00<00:00, 112.51iteration/s]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Out[27]:
+
+
[acos(Abs(acos(x_1))),
+ -Abs(x_2) + asin(log(x_1)),
+ Max(c_1, x_1),
+ Max(x_1, Abs(sqrt(sin(x_1)))),
+ cos(x_1*(c_1 + x_2))]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.
+ warnings.warn(
+Processing: 0%| | 0/5 [00:00<?, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:55: RuntimeWarning: invalid value encountered in arccos
+ "acos": lambda a: np.arccos(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:56: RuntimeWarning: invalid value encountered in arcsin
+ "asin": lambda a: np.arcsin(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:40: RuntimeWarning: invalid value encountered in scalar power
+ "^": lambda a, b: a**b,
+Processing: 100%|██████████| 5/5 [00:00<00:00, 312.27iteration/s]
+Processing: 0%| | 0/5 [00:00<?, ?iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:40: RuntimeWarning: divide by zero encountered in scalar power
+ "^": lambda a, b: a**b,
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:47: RuntimeWarning: invalid value encountered in sin
+ "sin": lambda a: np.sin(a),
+Processing: 40%|████ | 2/5 [00:00<00:00, 12.82iteration/s]/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:52: RuntimeWarning: invalid value encountered in sqrt
+ "sqrt": lambda a: np.sqrt(a),
+/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/tree.py:51: RuntimeWarning: invalid value encountered in log
+ "log": lambda a: np.log(a),
+Processing: 100%|██████████| 5/5 [00:00<00:00, 21.56iteration/s]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
*** simple equations ***
+ [acos(exp(x_1)), Max(c_1, x_1), x_1/c_1, asin(exp(x_1)), x_1**c_1]
+
+*** complex equations ***
+ [sin(exp(sqrt(1 - sin(x_1)**2)/sin(x_1))**x_1), (x_1 + Min(x_1, sin(x_1)))/sqrt(1 - (x_1 + Min(x_1, sin(x_1)))**2), sqrt(Min(c_1**sin(sin(x_1)), x_1)), -asin(x_1)**x_1 + Min(c_1, x_1), Max(-x_1 + log(x_1), sqrt(Abs(x_1)))]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.
+ warnings.warn(
+Processing: 100%|██████████| 100/100 [00:00<00:00, 190.81iteration/s]
+
+
+
+
+
Out[34]:
+
+
[cos(cos(x_1)),
+ sin(sin(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ -x_3 + sin(x_2) + cos(x_1),
+ cos(cos(x_1)),
+ cos(sin(x_1)),
+ sin(cos(x_1)),
+ x_1 + x_2,
+ sin(cos(x_1)),
+ cos(sin(x_1)),
+ x_1 + x_2,
+ cos(sin(x_1)),
+ x_1 - x_2,
+ x_1 + x_2,
+ sin(sin(x_1)),
+ x_1 + x_2,
+ sin(cos(x_1)),
+ -c_1 + x_1,
+ sin(cos(x_1)),
+ x_1 + x_2,
+ x_1 + x_2,
+ x_1 + x_2,
+ x_1 + x_2,
+ sin(cos(x_1)),
+ c_1 + x_1,
+ x_1 - x_2,
+ x_1 - x_2,
+ x_1 + x_2,
+ sin(sin(x_1)),
+ c_1 + x_1,
+ cos(sin(x_1)),
+ cos(sin(x_1)),
+ cos(sin(x_1)),
+ cos(cos(x_1)),
+ c_1 + x_1,
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ x_1 - x_2,
+ cos(sin(x_1)),
+ cos(sin(x_1)),
+ x_1 - x_2,
+ cos(cos(x_1)),
+ x_1 + x_2,
+ x_1 + x_2,
+ sin(sin(x_1)),
+ c_1 + x_1,
+ c_1 + x_1,
+ x_1 + x_2,
+ x_1 - x_2,
+ sin(sin(x_1)),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ sin(cos(x_1)),
+ x_1 - x_2,
+ sin(sin(x_1)),
+ cos(cos(x_1)),
+ c_1 + x_1,
+ sin(sin(x_1)),
+ cos(sin(x_1)),
+ cos(sin(x_1)),
+ x_1 + x_2,
+ cos(sin(x_1)),
+ sin(cos(x_1)),
+ c_1 + x_1,
+ -x_2,
+ x_1 - x_2,
+ -x_3 + sin(x_1) + sin(x_2),
+ c_1 + x_1,
+ x_1 + x_2,
+ c_1 + x_1,
+ c_1 + x_1,
+ sin(sin(x_1)),
+ cos(cos(x_1)),
+ x_1 + x_2,
+ c_1 + x_1,
+ -x_1 + cos(x_1) + cos(x_2),
+ x_1 - x_2,
+ cos(sin(x_1)),
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ -x_3 + sin(x_1) + cos(x_2),
+ x_1 + x_2,
+ -x_3 + sin(x_2) + cos(x_1),
+ -x_3 + sin(x_1) + sin(x_2),
+ c_1 - x_1,
+ c_1 + x_1,
+ c_1 + x_1,
+ cos(cos(x_1)),
+ -x_2 + sin(x_2) + cos(x_1),
+ c_1 + x_1,
+ sin(sin(x_1)),
+ c_1 + x_1,
+ x_1 + x_2,
+ sin(sin(x_1)),
+ x_1 + x_2,
+ x_1 + x_2,
+ cos(sin(x_1)),
+ sin(sin(x_1))]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/Users/younesstrittmatter/Documents/GitHub/AutoRA/equation-tree/src/equation_tree/util/io.py:27: UserWarning: No hashed prior found. Sample frequencies may diverge from the prior. Consider burning this prior first.
+ warnings.warn(
+Processing: 100%|██████████| 100/100 [00:00<00:00, 128.08iteration/s]
+
+
+
+
+
Out[38]:
+
+
[cos(cos(x_1)),
+ x_1 - x_2,
+ -c_1 + x_1,
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ c_1 + x_1,
+ -c_1 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ sin(cos(x_1)),
+ c_1 - x_1,
+ -x_3 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ c_1 - x_1,
+ sin(cos(x_1)),
+ cos(cos(x_1)),
+ x_1 - x_2,
+ -c_1 + sin(x_1) + sin(x_2),
+ -x_3 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ c_1 - x_1,
+ sin(cos(x_1)),
+ x_1 - x_2,
+ -x_3 - sin(x_2) + cos(x_1),
+ -c_1 + x_1,
+ sin(cos(x_1)),
+ cos(cos(x_1)),
+ sin(cos(x_1)),
+ x_1 + x_2,
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) - sin(x_2),
+ c_1 + x_1,
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ sin(cos(x_1)),
+ x_1 - x_2,
+ -x_3 + sin(x_1) + sin(x_2),
+ -c_1 + x_1,
+ c_1 - x_1,
+ c_1 + x_1,
+ c_1 + x_1,
+ cos(cos(x_1)),
+ -c_1 + sin(x_1) + sin(x_2),
+ c_1 + x_1,
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ -x_3 + sin(x_1) - cos(x_2),
+ sin(cos(x_1)),
+ x_1 - x_2,
+ -x_3 + cos(x_1) - cos(x_2),
+ x_1 - x_2,
+ cos(cos(x_1)),
+ sin(cos(x_1)),
+ -x_2 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ -c_1 + sin(x_1) + sin(x_2),
+ -x_2 + sin(x_1) - cos(x_2),
+ cos(cos(x_1)),
+ -x_2 + sin(x_1) + sin(x_2),
+ -x_3 + sin(x_1) + sin(x_2),
+ sin(cos(x_1)),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ -c_1 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ x_1 + x_2,
+ c_1 - x_1,
+ -x_1 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ -c_1 + sin(x_1) + sin(x_2),
+ c_1 - x_1,
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ c_1 - x_1,
+ -x_3 + sin(x_1) + sin(x_2),
+ cos(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ c_1 + x_1,
+ x_1 - x_2,
+ cos(cos(x_1)),
+ c_1 + x_1,
+ cos(cos(x_1)),
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ sin(cos(x_1)),
+ -x_3 + sin(x_1) + sin(x_2),
+ c_1 + x_1]
+
+
+
+
+
+
+
+
diff --git a/index.html b/index.html
index 3a4b6ce..b922364 100644
--- a/index.html
+++ b/index.html
@@ -372,7 +372,7 @@
- Tutorials
+ User Guide
@@ -382,7 +382,7 @@
- Tutorials
+ User Guide
@@ -392,11 +392,31 @@
-
+
- Basic Usage
+ Sampling
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Equation Formats
@@ -431,6 +451,69 @@
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
Code Reference
@@ -472,10 +555,10 @@
-
+
-
+
@@ -486,8 +569,8 @@
-
-
+
+
Src
@@ -508,7 +591,7 @@
-
+
@@ -524,14 +607,14 @@
-
+
-
-
+
+
Equation tree
@@ -652,7 +735,7 @@
-
+
@@ -668,14 +751,14 @@
-
+
-
-
+
+
Src
@@ -744,7 +827,7 @@
-
+
@@ -760,14 +843,14 @@
-
+
-
-
+
+
Util
@@ -961,7 +1044,7 @@
Equation Tree
The Equation Tree package is an equation toolbox with symbolic regression in mind. It represents
expressions as incomplete binary trees and has various features tailored towards testing symbolic
-regression algorithms or training models. The main features are:
+regression algorithms or training models. The most notable features are:
Equation sampling (including priors)
Feature Extraction from equation distributions
diff --git a/index.md b/index.md
index ad0aee7..ac76ca0 100644
--- a/index.md
+++ b/index.md
@@ -2,7 +2,7 @@
The Equation Tree package is an equation toolbox with symbolic regression in mind. It represents
expressions as incomplete binary trees and has various features tailored towards testing symbolic
-regression algorithms or training models. The main features are:
+regression algorithms or training models. The most notable features are:
- Equation sampling (including priors)
- Feature Extraction from equation distributions
diff --git a/quickstart/index.html b/quickstart/index.html
index 1072efb..404f39e 100644
--- a/quickstart/index.html
+++ b/quickstart/index.html
@@ -14,7 +14,7 @@
-
+
@@ -316,7 +316,7 @@
- Tutorials
+ User Guide
@@ -326,7 +326,7 @@
- Tutorials
+ User Guide
@@ -336,11 +336,31 @@
-
+
- Basic Usage
+ Sampling
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Equation Formats
@@ -375,6 +395,69 @@
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
Code Reference
@@ -416,10 +499,10 @@
-
+
-
+
@@ -430,8 +513,8 @@
-
-
+
+
Src
@@ -452,7 +535,7 @@
-
+
@@ -468,14 +551,14 @@
-
+
-
-
+
+
Equation tree
@@ -596,7 +679,7 @@
-
+
@@ -612,14 +695,14 @@
-
+
-
-
+
+
Src
@@ -688,7 +771,7 @@
-
+
@@ -704,14 +787,14 @@
-
+
-
-
+
+
Util
diff --git a/reference/SUMMARY/index.html b/reference/SUMMARY/index.html
index 2550658..50bc7e1 100644
--- a/reference/SUMMARY/index.html
+++ b/reference/SUMMARY/index.html
@@ -11,7 +11,7 @@
-
+
@@ -301,7 +301,7 @@
- Tutorials
+ User Guide
@@ -310,6 +310,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -321,11 +404,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -359,7 +442,7 @@
-
+
@@ -375,14 +458,14 @@
-
+
-
-
+
+
Code Reference
@@ -403,10 +486,10 @@
-
+
-
+
@@ -417,8 +500,8 @@
-
-
+
+
Src
@@ -439,7 +522,7 @@
-
+
@@ -455,14 +538,14 @@
-
+
-
-
+
+
Equation tree
@@ -583,7 +666,7 @@
-
+
@@ -599,14 +682,14 @@
-
+
-
-
+
+
Src
@@ -675,7 +758,7 @@
-
+
@@ -691,14 +774,14 @@
-
+
-
-
+
+
Util
diff --git a/reference/src/equation_tree/analysis/index.html b/reference/src/equation_tree/analysis/index.html
index d45013d..ebd5bb1 100644
--- a/reference/src/equation_tree/analysis/index.html
+++ b/reference/src/equation_tree/analysis/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@
-
-
+
+
Src
@@ -448,7 +531,7 @@
-
+
@@ -464,14 +547,14 @@
-
+
-
-
+
+
Equation tree
@@ -649,7 +732,7 @@
-
+
@@ -665,14 +748,14 @@
-
+
-
-
+
+
Src
@@ -741,7 +824,7 @@
-
+
@@ -757,14 +840,14 @@
-
+
-
-
+
+
Util
diff --git a/reference/src/equation_tree/defaults/index.html b/reference/src/equation_tree/defaults/index.html
index 755fbc0..ee2d43d 100644
--- a/reference/src/equation_tree/defaults/index.html
+++ b/reference/src/equation_tree/defaults/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@
-
-
+
+
Src
@@ -448,7 +531,7 @@
-
+
@@ -464,14 +547,14 @@
-
+
-
-
+
+
Equation tree
@@ -635,7 +718,7 @@
-
+
@@ -651,14 +734,14 @@
-
+
-
-
+
+
Src
@@ -727,7 +810,7 @@
-
+
@@ -743,14 +826,14 @@
-
+
-
-
+
+
Util
diff --git a/reference/src/equation_tree/index.html b/reference/src/equation_tree/index.html
index 29a3bcb..b095531 100644
--- a/reference/src/equation_tree/index.html
+++ b/reference/src/equation_tree/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@
-
-
+
+
Src
@@ -448,7 +531,7 @@
-
+
@@ -464,14 +547,14 @@
-
+
-
-
+
+
Equation tree
@@ -592,7 +675,7 @@
-
+
@@ -608,14 +691,14 @@
-
+
-
-
+
+
Src
@@ -684,7 +767,7 @@
-
+
@@ -700,14 +783,14 @@
-
+
-
-
+
+
Util
diff --git a/reference/src/equation_tree/prior/index.html b/reference/src/equation_tree/prior/index.html
index 3b675db..57b6d22 100644
--- a/reference/src/equation_tree/prior/index.html
+++ b/reference/src/equation_tree/prior/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@
-
-
+
+
Src
@@ -448,7 +531,7 @@
-
+
@@ -464,14 +547,14 @@
-
+
-
-
+
+
Equation tree
@@ -712,7 +795,7 @@
-
+
@@ -728,14 +811,14 @@
-
+
-
-
+
+
Src
@@ -804,7 +887,7 @@
-
+
@@ -820,14 +903,14 @@
-
+
-
-
+
+
Util
@@ -1123,9 +1206,7 @@
Source code in src/equation_tree/prior.py
- 172
-173
-174
+ 174
175
176
177
@@ -1146,7 +1227,9 @@
192
193
194
-195 def add ( prior_a , prior_b ):
+195
+196
+197
def add ( prior_a , prior_b ):
"""
>>> import pprint
>>> a = {'a': {'a_1': 3, 'a_2': 2}, 'b': {'b_1': .1, 'b_2': .3}}
@@ -1203,9 +1286,7 @@
Source code in src/equation_tree/prior.py
- 124
-125
-126
+ 126
127
128
129
@@ -1226,7 +1307,9 @@
144
145
146
-147 def filter_keys ( dict_a , dict_b ):
+147
+148
+149
def filter_keys ( dict_a , dict_b ):
"""
Examples:
>>> import pprint
@@ -1293,9 +1376,7 @@
Source code in src/equation_tree/prior.py
- 389
-390
-391
+ 391
392
393
394
@@ -1312,7 +1393,9 @@
405
406
407
-408 def get_defined_functions ( prior ):
+408
+409
+410
def get_defined_functions ( prior ):
"""
Examples:
>>> test_prior = {
@@ -1375,9 +1458,7 @@
Source code in src/equation_tree/prior.py
- 411
-412
-413
+ 413
414
415
416
@@ -1394,7 +1475,9 @@
427
428
429
-430 def get_defined_operators ( prior ):
+430
+431
+432
def get_defined_operators ( prior ):
"""
Examples:
>>> test_prior = {
@@ -1466,9 +1549,7 @@
Source code in src/equation_tree/prior.py
- 239
-240
-241
+ 241
242
243
244
@@ -1509,7 +1590,9 @@
279
280
281
-282 def multiply ( a , b ):
+282
+283
+284
def multiply ( a , b ):
"""
Examples:
>>> import pprint
@@ -1594,9 +1677,7 @@
Source code in src/equation_tree/prior.py
- 26
-27
-28
+ 28
29
30
31
@@ -1615,7 +1696,9 @@
44
45
46
-47 def prior_from_space ( space ):
+47
+48
+49
def prior_from_space ( space ):
"""
Uniform prior from a list of strings
Examples:
@@ -1661,9 +1744,7 @@
Source code in src/equation_tree/prior.py
- 104
-105
-106
+ 106
107
108
109
@@ -1678,7 +1759,9 @@
118
119
120
-121 def re_normalize ( target , origin ):
+121
+122
+123
def re_normalize ( target , origin ):
""" """
tmp_t = copy . deepcopy ( target )
tmp_o = copy . deepcopy ( origin )
@@ -1729,9 +1812,7 @@
Source code in src/equation_tree/prior.py
- 150
-151
-152
+ 152
153
154
155
@@ -1748,7 +1829,9 @@
166
167
168
-169 def scalar_multiply ( scalar , prior ):
+169
+170
+171
def scalar_multiply ( scalar , prior ):
"""
Examples:
>>> import pprint
@@ -1801,9 +1884,7 @@
Source code in src/equation_tree/prior.py
- 50
-51
-52
+ 52
53
54
55
@@ -1817,7 +1898,9 @@ 63
64
65
-66 def structure_prior_from_depth ( depth ):
+66
+67
+68
def structure_prior_from_depth ( depth ):
"""
Uniform structure prior for a given depth
Examples:
@@ -1885,9 +1968,7 @@
Source code in src/equation_tree/prior.py
- 69
- 70
- 71
+ 71
72
73
74
@@ -1917,7 +1998,9 @@ 98
99
100
-101 def structure_prior_from_max_depth ( max_depth ):
+101
+102
+103
def structure_prior_from_max_depth ( max_depth ):
"""
Uniform structure prior up to a given depth (from min depth 3)
Examples:
@@ -1980,9 +2063,7 @@
Source code in src/equation_tree/prior.py
- 198
-199
-200
+ 200
201
202
203
@@ -2018,7 +2099,9 @@
233
234
235
-236 def subtract ( minuend , subtrahend ):
+236
+237
+238
def subtract ( minuend , subtrahend ):
"""
Minuend - Subtrahend
Examples:
diff --git a/reference/src/equation_tree/sample/index.html b/reference/src/equation_tree/sample/index.html
index 1d28274..f73b2e5 100644
--- a/reference/src/equation_tree/sample/index.html
+++ b/reference/src/equation_tree/sample/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@
-
-
+
+
Src
@@ -448,7 +531,7 @@
-
+
@@ -464,14 +547,14 @@
-
+
-
-
+
+
Equation tree
@@ -642,7 +725,7 @@
-
+
@@ -658,14 +741,14 @@
-
+
-
-
+
+
Src
@@ -734,7 +817,7 @@
-
+
@@ -750,14 +833,14 @@
-
+
-
-
+
+
Util
@@ -971,24 +1054,7 @@
Source code in src/equation_tree/sample.py
- 203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
+ 220
221
222
223
@@ -1065,7 +1131,24 @@ 294
295
296
-297 def sample_tree_raw_from_priors (
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
def sample_tree_raw_from_priors (
max_num_constants : int = 0 ,
max_num_variables : int = 1 ,
feature_priors : Optional [ Dict ] = None ,
diff --git a/reference/src/equation_tree/src/index.html b/reference/src/equation_tree/src/index.html
index 504ab0f..d31e05b 100644
--- a/reference/src/equation_tree/src/index.html
+++ b/reference/src/equation_tree/src/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@
-
-
+
+
Src
@@ -448,7 +531,7 @@
-
+
@@ -464,14 +547,14 @@
-
+
-
-
+
+
Equation tree
@@ -594,7 +677,7 @@
-
+
@@ -610,14 +693,14 @@
-
+
-
-
+
+
Src
@@ -686,7 +769,7 @@
-
+
@@ -702,14 +785,14 @@
-
+
-
-
+
+
Util
diff --git a/reference/src/equation_tree/src/sample_tree_structure/index.html b/reference/src/equation_tree/src/sample_tree_structure/index.html
index deb2019..aa025ca 100644
--- a/reference/src/equation_tree/src/sample_tree_structure/index.html
+++ b/reference/src/equation_tree/src/sample_tree_structure/index.html
@@ -306,7 +306,7 @@
- Tutorials
+ User Guide
@@ -315,6 +315,89 @@
+
+ User Guide
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tutorials
+
+
+
+
+
+
+
+
Tutorials
@@ -326,11 +409,11 @@
-
+
- Basic Usage
+ Equation Sampling
@@ -364,7 +447,7 @@
-
+
@@ -380,14 +463,14 @@
-
+
-
-
+
+
Code Reference
@@ -410,10 +493,10 @@
-
+
-
+
@@ -424,8 +507,8 @@