Skip to content

Commit

Permalink
Merge pull request #1 from Spinachboul/Spinachboul-Update-Readme
Browse files Browse the repository at this point in the history
Update tensor_prod.md
  • Loading branch information
Spinachboul authored Dec 28, 2023
2 parents da68799 + dc1d5a8 commit 089c699
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/src/tensor_prod.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Tensor product function
The tensor product function is defined as:
``f(x) = \prod_{i=1}^d \cos(a\pi x_i)``
A tensor product function combines multiple functions or vectors using the tensor product operation. The tensor product is a mathematical operation that takes two vectors and produces another vector space, capturing their joint behavior across multiple dimensions.

For instance, consider a tensor product function defined as follows:

```\[ f(x) = ∏ᵢ=₁ᵈ cos(aπxᵢ) \]```

Let's import Surrogates and Plots:
```@example tensor
Expand Down Expand Up @@ -38,3 +41,15 @@ plot!(xs,f.(xs), label="True function", legend=:top)
plot!(xs, loba_1.(xs), label="Lobachevsky", legend=:top)
plot!(xs, krig.(xs), label="Kriging", legend=:top)
```

## Kriging Plot

![kriging](https://github.com/Spinachboul/Surrogates.jl/assets/105979087/bf6e2c3d-21e0-46d2-9af4-98ec38e6c462)

## Lobachevsky Plot

![lobachevsky](https://github.com/Spinachboul/Surrogates.jl/assets/105979087/743c2f4c-14b5-4c90-89dd-1a57a53a81dd)

## Combined Plot

![combined_plot](https://github.com/Spinachboul/Surrogates.jl/assets/105979087/c325ee43-2bb9-4876-9a95-4e902113f2b6)

0 comments on commit 089c699

Please sign in to comment.