From 0f09233195c031e9d0b1f0ce7fd81c82e1c8265f Mon Sep 17 00:00:00 2001 From: ErikQQY <2283984853@qq.com> Date: Mon, 27 Nov 2023 00:52:39 +0800 Subject: [PATCH] Fix equations displaying in benchmarks Signed-off-by: ErikQQY <2283984853@qq.com> --- docs/src/Salustowicz.md | 2 +- docs/src/ackley.md | 6 +++--- docs/src/gramacylee.md | 2 +- docs/src/tensor_prod.md | 2 +- docs/src/water_flow.md | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/src/Salustowicz.md b/docs/src/Salustowicz.md index 3f32b47c7..c89d7316c 100644 --- a/docs/src/Salustowicz.md +++ b/docs/src/Salustowicz.md @@ -5,7 +5,7 @@ The true underlying function HyGP had to approximate is the 1D Salustowicz funct The Salustowicz benchmark function is as follows: -``f(x) = e^{(-x)} x^3 cos(x) sin(x) (cos(x) sin^2(x) - 1)`` +``f(x) = e^{-x} x^3 \cos(x) \sin(x) (\cos(x) \sin^2(x) - 1)`` Let's import these two packages `Surrogates` and `Plots`: diff --git a/docs/src/ackley.md b/docs/src/ackley.md index db94c639c..de312e6e6 100644 --- a/docs/src/ackley.md +++ b/docs/src/ackley.md @@ -1,7 +1,7 @@ # Ackley Function The Ackley function is defined as: -``f(x) = -a*exp(-b\sqrt{\frac{1}{d}\sum_{i=1}^d x_i^2}) - exp(\frac{1}{d} \sum_{i=1}^d cos(cx_i)) + a + exp(1)`` +``f(x) = -a*\exp(-b\sqrt{\frac{1}{d}\sum_{i=1}^d x_i^2}) - \exp(\frac{1}{d} \sum_{i=1}^d \cos(cx_i)) + a + \exp(1)`` Usually the recommended values are: ``a = 20``, ``b = 0.2`` and ``c = 2\pi`` Let's see the 1D case. @@ -16,7 +16,7 @@ Now, let's define the `Ackley` function: ```@example ackley function ackley(x) - a, b, c = 20.0, -0.2, 2.0*π + a, b, c = 20.0, 0.2, 2.0*π len_recip = inv(length(x)) sum_sqrs = zero(eltype(x)) sum_cos = sum_sqrs @@ -24,7 +24,7 @@ function ackley(x) sum_cos += cos(c*i) sum_sqrs += i^2 end - return (-a * exp(b * sqrt(len_recip*sum_sqrs)) - + return (-a * exp(-b * sqrt(len_recip*sum_sqrs)) - exp(len_recip*sum_cos) + a + 2.71) end ``` diff --git a/docs/src/gramacylee.md b/docs/src/gramacylee.md index cdc6810a2..1221673f5 100644 --- a/docs/src/gramacylee.md +++ b/docs/src/gramacylee.md @@ -4,7 +4,7 @@ Gramacy & Lee Function is a continuous function. It is not convex. The function ``x \in [-0.5, 2.5]``. The Gramacy & Lee is as follows: -``f(x) = \frac{sin(10\pi x)}{2x} + (x-1)^4``. +``f(x) = \frac{\sin(10\pi x)}{2x} + (x-1)^4``. Let's import these two packages `Surrogates` and `Plots`: diff --git a/docs/src/tensor_prod.md b/docs/src/tensor_prod.md index afc6c4147..832603cc4 100644 --- a/docs/src/tensor_prod.md +++ b/docs/src/tensor_prod.md @@ -1,6 +1,6 @@ # Tensor product function The tensor product function is defined as: -``f(x) = \prod_{i=1}^d cos(a\pi x_i)`` +``f(x) = \prod_{i=1}^d \cos(a\pi x_i)`` Let's import Surrogates and Plots: ```@example tensor diff --git a/docs/src/water_flow.md b/docs/src/water_flow.md index ed98f9e12..885650976 100644 --- a/docs/src/water_flow.md +++ b/docs/src/water_flow.md @@ -1,9 +1,9 @@ # Water flow function The water flow function is defined as: -``f(r_w,r,T_u,H_u,T_l,H_l,L,K_w) = \frac{2*\pi*T_u(H_u - H_l)}{log(\frac{r}{r_w})*[1 + \frac{2LT_u}{log(\frac{r}{r_w})*r_w^2*K_w}+ \frac{T_u}{T_l} ]}`` +``f(r_w,r,T_u,H_u,T_l,H_l,L,K_w) = \frac{2*\pi*T_u(H_u - H_l)}{\log(\frac{r}{r_w})*[1 + \frac{2LT_u}{\log(\frac{r}{r_w})*r_w^2*K_w}+ \frac{T_u}{T_l} ]}`` -It has 8 dimension. +It has 8 dimensions. ```@example water using Surrogates