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.
References¶
- 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¶
objective: Objective object to maximize over the chosen locations. transform: Optional transform applied to selected locations.
Source code in sgptools/methods.py
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 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 | |
__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¶
num_sensing:
Number of sensing locations to select.
X_objective:
Array of shape (n, d) used to define the objective (e.g. GP
training inputs).
kernel:
GPflow kernel used inside the objective.
noise_variance:
Observation noise variance used inside the objective.
transform:
Optional transform applied to selected locations before evaluating
the objective and constraints.
num_robots:
Number of robots / agents. GreedyObjective currently supports
only num_robots = 1 and will assert otherwise.
X_candidates:
Discrete candidate locations with shape (c, d). If None,
defaults to X_objective.
num_dim:
Dimensionality of the sensing locations. If None, defaults to
X_objective.shape[-1].
objective:
Objective specification (string key or Objective instance) used
by get_objective when a string is given.
**kwargs:
Additional keyword arguments forwarded to the objective constructor
when objective is a string.
Source code in sgptools/methods.py
get_hyperparameters()
¶
Return the current kernel and noise variance used by the objective.
Returns¶
(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¶
optimizer:
Greedy strategy identifier passed to apricot.CustomSelection
(e.g., 'naive', 'lazy').
verbose:
If True, print progress information from apricot.
**kwargs:
Additional keyword arguments forwarded to CustomSelection
(currently unused in this wrapper but accepted for flexibility).
Returns¶
np.ndarray
Array of shape (num_robots, num_sensing, num_dim) containing the
selected sensing locations.