ContinuousSGP¶
sgptools.methods.ContinuousSGP
¶
Bases: Method
Implements informative sensor placement/path optimization using a Sparse Gaussian Process (SGP).
This method optimizes the inducing points of an SGP model to maximize the ELBO or other SGP-related objectives.
Refer to the following papers for more details
- Efficient Sensor Placement from Regression with Sparse Gaussian Processes in Continuous and Discrete Spaces [Jakkala and Akella, 2023]
- Multi-Robot Informative Path Planning from Regression with Sparse Gaussian Processes [Jakkala and Akella, 2024]
Attributes:
Name | Type | Description |
---|---|---|
sgpr |
AugmentedSGPR
|
The Augmented Sparse Gaussian Process Regression model. |
Source code in sgptools/methods.py
488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 |
|
transform
property
¶
Gets the transform object associated with the SGP model.
Returns:
Name | Type | Description |
---|---|---|
Transform |
Transform
|
The transform object. |
__init__(num_sensing, X_objective, kernel, noise_variance, transform=None, num_robots=1, X_candidates=None, num_dim=None, X_init=None, X_time=None, orientation=False, **kwargs)
¶
Initializes the ContinuousSGP optimizer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num_sensing
|
int
|
Number of sensing locations (inducing points) to optimize. |
required |
X_objective
|
ndarray
|
(n, d); Data points used to approximate the bounds of the environment. |
required |
kernel
|
Kernel
|
GPflow kernel function. |
required |
noise_variance
|
float
|
Data noise variance. |
required |
transform
|
Optional[Transform]
|
Transform object to apply to inducing points. Defaults to None. |
None
|
num_robots
|
int
|
Number of robots/agents. Defaults to 1. |
1
|
X_candidates
|
Optional[ndarray]
|
(c, d); Discrete set of candidate locations for sensor placement. Defaults to None. |
None
|
num_dim
|
Optional[int]
|
Dimensionality of the sensing locations. Defaults to dimensonality of X_objective. |
None
|
X_init
|
Optional[ndarray]
|
(num_sensing * num_robots, d); Initial inducing points. If None, initial points are randomly selected from X_objective. |
None
|
X_time
|
Optional[ndarray]
|
(m, d); Temporal dimensions of the inducing points, used when modeling spatio-temporal IPP. Defaults to None. |
None
|
orientation
|
bool
|
If True, adds an additional dimension to model sensor FoV rotation angle when selecting initial inducing points. Defaults to False. |
False
|
**kwargs
|
Any
|
Additional keyword arguments. |
{}
|
Source code in sgptools/methods.py
get_hyperparameters()
¶
Retrieves the current kernel and noise variance hyperparameters from the SGP model.
Returns:
Type | Description |
---|---|
Tuple[Kernel, float]
|
Tuple[gpflow.kernels.Kernel, float]: A tuple containing a deep copy of the kernel and the noise variance. |
Source code in sgptools/methods.py
optimize(max_steps=500, optimizer='scipy.L-BFGS-B', verbose=False, **kwargs)
¶
Optimizes the inducing points of the SGP model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
max_steps
|
int
|
Maximum number of optimization steps. Defaults to 500. |
500
|
optimizer
|
str
|
Optimizer " |
'scipy.L-BFGS-B'
|
verbose
|
bool
|
Verbosity, if True additional details will by reported. Defaults to False. |
False
|
**kwargs
|
Any
|
Additional keyword arguments for the optimizer. |
{}
|
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: (num_robots, num_sensing, num_dim); Optimized inducing points (sensing locations). |
Usage
# Assuming X_train, candidates, kernel_opt, noise_variance_opt are defined
csgp_method = ContinuousSGP(
num_sensing=10,
X_objective=dataset.X_train,
kernel=kernel_opt,
noise_variance=noise_variance_opt,
transform=IPPTransform(num_robots=1), # Example transform
X_candidates=candidates # Only if the solution needs to be mapped to candidates
)
optimized_solution = csgp_method.optimize(max_steps=500, optimizer='scipy.L-BFGS-B')
Source code in sgptools/methods.py
update(kernel, noise_variance)
¶
Updates the kernel and noise variance parameters of the SGP model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kernel
|
Kernel
|
Updated GPflow kernel function. |
required |
noise_variance
|
float
|
Updated data noise variance. |
required |