Skip to content

Commit

Permalink
Update latest version of site
Browse files Browse the repository at this point in the history
  • Loading branch information
docusaurus-bot committed Sep 6, 2024
1 parent d0b6e80 commit cad18b3
Show file tree
Hide file tree
Showing 25 changed files with 123 additions and 175 deletions.
17 changes: 6 additions & 11 deletions v/latest/api/_modules/botorch/models/approximate_gp.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="kn">from</span> <span class="nn">botorch.models.transforms.outcome</span> <span class="kn">import</span> <span class="n">OutcomeTransform</span>
<span class="kn">from</span> <span class="nn">botorch.models.utils</span> <span class="kn">import</span> <span class="n">validate_input_scaling</span>
<span class="kn">from</span> <span class="nn">botorch.models.utils.gpytorch_modules</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">get_gaussian_likelihood_with_gamma_prior</span><span class="p">,</span>
<span class="n">get_matern_kernel_with_gamma_prior</span><span class="p">,</span>
<span class="n">get_covar_module_with_dim_scaled_prior</span><span class="p">,</span>
<span class="n">get_gaussian_likelihood_with_lognormal_prior</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">botorch.models.utils.inducing_point_allocators</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">GreedyVarianceReduction</span><span class="p">,</span>
Expand Down Expand Up @@ -231,7 +231,7 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="sd"> this does not have to be all of the training inputs).</span>
<span class="sd"> train_Y: Not used.</span>
<span class="sd"> num_outputs: Number of output responses per input.</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses a `MaternKernel`.</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses an `RBFKernel`.</span>
<span class="sd"> mean_module: Mean of GP model. If omitted, uses a `ConstantMean`.</span>
<span class="sd"> variational_distribution: Type of variational distribution to use</span>
<span class="sd"> (default: CholeskyVariationalDistribution), the properties of the</span>
Expand All @@ -255,15 +255,10 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span> <span class="o">=</span> <span class="n">aug_batch_shape</span>

<span class="k">if</span> <span class="n">covar_module</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">covar_module</span> <span class="o">=</span> <span class="n">get_matern_kernel_with_gamma_prior</span><span class="p">(</span>
<span class="n">covar_module</span> <span class="o">=</span> <span class="n">get_covar_module_with_dim_scaled_prior</span><span class="p">(</span>
<span class="n">ard_num_dims</span><span class="o">=</span><span class="n">train_X</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span>
<span class="n">batch_shape</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span><span class="p">,</span>
<span class="p">)</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="n">train_X</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_subset_batch_dict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"mean_module.constant"</span><span class="p">:</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span>
<span class="s2">"covar_module.raw_outputscale"</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
<span class="s2">"covar_module.base_kernel.raw_lengthscale"</span><span class="p">:</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
<span class="p">}</span>

<span class="k">if</span> <span class="n">inducing_point_allocator</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">inducing_point_allocator</span> <span class="o">=</span> <span class="n">GreedyVarianceReduction</span><span class="p">()</span>
Expand Down Expand Up @@ -383,7 +378,7 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="sd"> either a `GaussianLikelihood` (if `num_outputs=1`) or a</span>
<span class="sd"> `MultitaskGaussianLikelihood`(if `num_outputs&gt;1`).</span>
<span class="sd"> num_outputs: Number of output responses per input (default: 1).</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses a `MaternKernel`.</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses an `RBFKernel`.</span>
<span class="sd"> mean_module: Mean of GP model. If omitted, uses a `ConstantMean`.</span>
<span class="sd"> variational_distribution: Type of variational distribution to use</span>
<span class="sd"> (default: CholeskyVariationalDistribution), the properties of the</span>
Expand Down Expand Up @@ -418,7 +413,7 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr

<span class="k">if</span> <span class="n">likelihood</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">num_outputs</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">likelihood</span> <span class="o">=</span> <span class="n">get_gaussian_likelihood_with_gamma_prior</span><span class="p">(</span>
<span class="n">likelihood</span> <span class="o">=</span> <span class="n">get_gaussian_likelihood_with_lognormal_prior</span><span class="p">(</span>
<span class="n">batch_shape</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
17 changes: 6 additions & 11 deletions v/latest/api/_modules/botorch/models/approximate_gp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="kn">from</span> <span class="nn">botorch.models.transforms.outcome</span> <span class="kn">import</span> <span class="n">OutcomeTransform</span>
<span class="kn">from</span> <span class="nn">botorch.models.utils</span> <span class="kn">import</span> <span class="n">validate_input_scaling</span>
<span class="kn">from</span> <span class="nn">botorch.models.utils.gpytorch_modules</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">get_gaussian_likelihood_with_gamma_prior</span><span class="p">,</span>
<span class="n">get_matern_kernel_with_gamma_prior</span><span class="p">,</span>
<span class="n">get_covar_module_with_dim_scaled_prior</span><span class="p">,</span>
<span class="n">get_gaussian_likelihood_with_lognormal_prior</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">botorch.models.utils.inducing_point_allocators</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">GreedyVarianceReduction</span><span class="p">,</span>
Expand Down Expand Up @@ -231,7 +231,7 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="sd"> this does not have to be all of the training inputs).</span>
<span class="sd"> train_Y: Not used.</span>
<span class="sd"> num_outputs: Number of output responses per input.</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses a `MaternKernel`.</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses an `RBFKernel`.</span>
<span class="sd"> mean_module: Mean of GP model. If omitted, uses a `ConstantMean`.</span>
<span class="sd"> variational_distribution: Type of variational distribution to use</span>
<span class="sd"> (default: CholeskyVariationalDistribution), the properties of the</span>
Expand All @@ -255,15 +255,10 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span> <span class="o">=</span> <span class="n">aug_batch_shape</span>

<span class="k">if</span> <span class="n">covar_module</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">covar_module</span> <span class="o">=</span> <span class="n">get_matern_kernel_with_gamma_prior</span><span class="p">(</span>
<span class="n">covar_module</span> <span class="o">=</span> <span class="n">get_covar_module_with_dim_scaled_prior</span><span class="p">(</span>
<span class="n">ard_num_dims</span><span class="o">=</span><span class="n">train_X</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span>
<span class="n">batch_shape</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span><span class="p">,</span>
<span class="p">)</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="n">train_X</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_subset_batch_dict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"mean_module.constant"</span><span class="p">:</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span>
<span class="s2">"covar_module.raw_outputscale"</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
<span class="s2">"covar_module.base_kernel.raw_lengthscale"</span><span class="p">:</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
<span class="p">}</span>

<span class="k">if</span> <span class="n">inducing_point_allocator</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">inducing_point_allocator</span> <span class="o">=</span> <span class="n">GreedyVarianceReduction</span><span class="p">()</span>
Expand Down Expand Up @@ -383,7 +378,7 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr
<span class="sd"> either a `GaussianLikelihood` (if `num_outputs=1`) or a</span>
<span class="sd"> `MultitaskGaussianLikelihood`(if `num_outputs&gt;1`).</span>
<span class="sd"> num_outputs: Number of output responses per input (default: 1).</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses a `MaternKernel`.</span>
<span class="sd"> covar_module: Kernel function. If omitted, uses an `RBFKernel`.</span>
<span class="sd"> mean_module: Mean of GP model. If omitted, uses a `ConstantMean`.</span>
<span class="sd"> variational_distribution: Type of variational distribution to use</span>
<span class="sd"> (default: CholeskyVariationalDistribution), the properties of the</span>
Expand Down Expand Up @@ -418,7 +413,7 @@ <h1>Source code for botorch.models.approximate_gp</h1><div class="highlight"><pr

<span class="k">if</span> <span class="n">likelihood</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">if</span> <span class="n">num_outputs</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">likelihood</span> <span class="o">=</span> <span class="n">get_gaussian_likelihood_with_gamma_prior</span><span class="p">(</span>
<span class="n">likelihood</span> <span class="o">=</span> <span class="n">get_gaussian_likelihood_with_lognormal_prior</span><span class="p">(</span>
<span class="n">batch_shape</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span>
<span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h1>Source code for botorch.models.contextual_multioutput</h1><div class="highli
<span class="sd"> is common across all tasks.</span>
<span class="sd"> mean_module: The mean function to be used. Defaults to `ConstantMean`.</span>
<span class="sd"> covar_module: The module for computing the covariance matrix between</span>
<span class="sd"> the non-task features. Defaults to `MaternKernel`.</span>
<span class="sd"> the non-task features. Defaults to `RBFKernel`.</span>
<span class="sd"> likelihood: A likelihood. The default is selected based on `train_Yvar`.</span>
<span class="sd"> If `train_Yvar` is None, a standard `GaussianLikelihood` with inferred</span>
<span class="sd"> noise level is used. Otherwise, a FixedNoiseGaussianLikelihood is used.</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h1>Source code for botorch.models.contextual_multioutput</h1><div class="highli
<span class="sd"> is common across all tasks.</span>
<span class="sd"> mean_module: The mean function to be used. Defaults to `ConstantMean`.</span>
<span class="sd"> covar_module: The module for computing the covariance matrix between</span>
<span class="sd"> the non-task features. Defaults to `MaternKernel`.</span>
<span class="sd"> the non-task features. Defaults to `RBFKernel`.</span>
<span class="sd"> likelihood: A likelihood. The default is selected based on `train_Yvar`.</span>
<span class="sd"> If `train_Yvar` is None, a standard `GaussianLikelihood` with inferred</span>
<span class="sd"> noise level is used. Otherwise, a FixedNoiseGaussianLikelihood is used.</span>
Expand Down
3 changes: 2 additions & 1 deletion v/latest/api/_modules/botorch/models/gp_regression.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h1>Source code for botorch.models.gp_regression</h1><div class="highlight"><pre
<span class="sd"> is None, and a `FixedNoiseGaussianLikelihood` with the given</span>
<span class="sd"> noise observations if `train_Yvar` is not None.</span>
<span class="sd"> covar_module: The module computing the covariance (Kernel) matrix.</span>
<span class="sd"> If omitted, use a `MaternKernel`.</span>
<span class="sd"> If omitted, uses an `RBFKernel`.</span>
<span class="sd"> mean_module: The mean function to be used. If omitted, use a</span>
<span class="sd"> `ConstantMean`.</span>
<span class="sd"> outcome_transform: An outcome transform that is applied to the</span>
Expand Down Expand Up @@ -232,6 +232,7 @@ <h1>Source code for botorch.models.gp_regression</h1><div class="highlight"><pre
<span class="n">ard_num_dims</span><span class="o">=</span><span class="n">transformed_X</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span>
<span class="n">batch_shape</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span><span class="p">,</span>
<span class="p">)</span>
<span class="c1"># Used for subsetting along the output dimension. See Model.subset_output.</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_subset_batch_dict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"mean_module.raw_constant"</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
<span class="s2">"covar_module.raw_lengthscale"</span><span class="p">:</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h1>Source code for botorch.models.gp_regression</h1><div class="highlight"><pre
<span class="sd"> is None, and a `FixedNoiseGaussianLikelihood` with the given</span>
<span class="sd"> noise observations if `train_Yvar` is not None.</span>
<span class="sd"> covar_module: The module computing the covariance (Kernel) matrix.</span>
<span class="sd"> If omitted, use a `MaternKernel`.</span>
<span class="sd"> If omitted, uses an `RBFKernel`.</span>
<span class="sd"> mean_module: The mean function to be used. If omitted, use a</span>
<span class="sd"> `ConstantMean`.</span>
<span class="sd"> outcome_transform: An outcome transform that is applied to the</span>
Expand Down Expand Up @@ -232,6 +232,7 @@ <h1>Source code for botorch.models.gp_regression</h1><div class="highlight"><pre
<span class="n">ard_num_dims</span><span class="o">=</span><span class="n">transformed_X</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">],</span>
<span class="n">batch_shape</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_aug_batch_shape</span><span class="p">,</span>
<span class="p">)</span>
<span class="c1"># Used for subsetting along the output dimension. See Model.subset_output.</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_subset_batch_dict</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">"mean_module.raw_constant"</span><span class="p">:</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span>
<span class="s2">"covar_module.raw_lengthscale"</span><span class="p">:</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span>
Expand Down
Loading

0 comments on commit cad18b3

Please sign in to comment.