GreedyObjective¶
sgptools.methods.GreedyObjective
¶
Bases: Method
Informative sensor placement / path optimization using a greedy selection based on a generic objective function.
The method iteratively adds sensing locations from a discrete candidate
set to maximize a user-specified objective (e.g., mutual information),
using apricot.CustomSelection as the selection engine. Only single-robot
scenarios are supported.
Refer to the following papers for more details
- Krause et al., 2008. Near-Optimal Sensor Placements in Gaussian Processes: Theory, Efficient Algorithms and Empirical Studies.
- Ma et al., 2018. Data-driven learning and planning for environmental sampling.
Attributes:
| Name | Type | Description |
|---|---|---|
objective |
Objective
|
Objective object to maximize over the chosen locations. |
transform |
Transform | None
|
Optional transform applied to selected locations. |
Source code in sgptools/methods.py
787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | |
__init__(num_sensing, X_objective, kernel, noise_variance, transform=None, num_robots=1, X_candidates=None, num_dim=None, objective='SLogMI', **kwargs)
¶
Initialize a greedy objective-based method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_sensing
|
int
|
Number of sensing locations to select. |
required |
X_objective
|
ndarray
|
Array of shape |
required |
kernel
|
Kernel
|
GPflow kernel used inside the objective. |
required |
noise_variance
|
float
|
Observation noise variance used inside the objective. |
required |
transform
|
Transform | None
|
Optional transform applied to selected locations before evaluating the objective and constraints. |
None
|
num_robots
|
int
|
Number of robots / agents. |
1
|
X_candidates
|
ndarray | None
|
Discrete candidate locations with shape |
None
|
num_dim
|
int | None
|
Dimensionality of the sensing locations. If |
None
|
objective
|
str | Objective
|
Objective specification (string key or |
'SLogMI'
|
**kwargs
|
Any
|
Additional keyword arguments forwarded to the objective constructor
when |
{}
|
Source code in sgptools/methods.py
get_hyperparameters()
¶
Return the current kernel and noise variance used by the objective.
Returns:
| Type | Description |
|---|---|
Tuple[Kernel, float]
|
Tuple[gpflow.kernels.Kernel, float]: A deep copy of the kernel and the current noise variance. |
Source code in sgptools/methods.py
optimize(optimizer='naive', verbose=False, **kwargs)
¶
Run greedy selection over the candidate set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
optimizer
|
str
|
Greedy strategy identifier passed to |
'naive'
|
verbose
|
bool
|
If |
False
|
**kwargs
|
Any
|
Additional keyword arguments forwarded to |
{}
|
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray:
Array of shape |
Source code in sgptools/methods.py
update(kernel, noise_variance)
¶
Update the kernel and noise variance used by the objective.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kernel
|
Kernel
|
New GPflow kernel instance. |
required |
noise_variance
|
float
|
New observation noise variance. |
required |