GreedyCover¶
sgptools.methods.GreedyCover
¶
Bases: HexCover
Greedy sensing-location selection via GP posterior-variance.
The method selects points from a discrete candidate set to cover as many objective/environment points as possible under a single-measurement Gaussian Process (GP) variance reduction criterion.
Refer to the following paper for more details
- Jakkala et al., 2026. Informative Path Planning with Guaranteed Estimation Uncertainty.
Algorithm summary
- Build a boolean coverage matrix.
- Greedily select the candidate with the largest number of newly covered objective points.
- Stop when the target coverage fraction is reached or the sensing budget is exhausted.
- Optionally order the selected points via a TSP solver.
Notes
- Current implementation assumes a single robot (num_robots == 1).
- May return fewer than num_sensing points if the target is reached early.
- Raises ValueError if the target coverage is not achievable from the candidate set.
Source code in sgptools/methods.py
1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 | |
__init__(num_sensing, X_objective, kernel, noise_variance, transform=None, num_robots=1, X_candidates=None, num_dim=None, height=None, width=None, pbounds=None, **kwargs)
¶
Initialize the method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_sensing
|
int
|
Maximum number of sensing locations (not strictly enforced; the tiling determines the actual number of points). |
required |
X_objective
|
ndarray
|
Environment points. Used only to infer the bounding rectangle
(min/max in the first two dimensions) when |
required |
kernel
|
Kernel
|
GP kernel (assumed to have a |
required |
noise_variance
|
float
|
Observation noise variance. |
required |
transform
|
Transform | None
|
Reserved for compatibility with other methods. |
None
|
num_robots
|
int
|
Must be 1. Multi-robot tilings are not supported. |
1
|
X_candidates
|
ndarray | None
|
Ignored. Present for API compatibility with other methods. |
None
|
num_dim
|
int | None
|
Dimensionality of points. Defaults to |
None
|
height
|
float | None
|
Environment height in the y-direction. If None, inferred from
|
None
|
width
|
float | None
|
Environment width in the x-direction. If None, inferred from
|
None
|
pbounds
|
ndarray | None
|
Coordinates of the environment boundry polygon, used to ensure all sensing locations are inside the environment. |
None
|
**kwargs
|
Any
|
Ignored. Accepted for forward compatibility. |
{}
|
Source code in sgptools/methods.py
1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 | |
get_hyperparameters()
¶
Return current kernel and noise variance as (kernel, noise_variance).
Returns:
| Type | Description |
|---|---|
Tuple[Kernel, float]
|
Tuple[gpflow.kernels.Kernel, float]: A tuple containing the kernel instance and noise variance. |
Source code in sgptools/methods.py
optimize(post_var_threshold=0.7, target_fraction=100, return_fovs=False, slack_ratio=None, candidate_method='Hex', X_warm_start=[], **kwargs)
¶
Run greedy sensing-location selection via GP posterior-variance.
This method constructs coverage maps using the GP posterior variance.
Then greedily selects candidates that maximize the number of newly covered objective points until either:
-
target_fraction percent of objective points are covered, or
-
num_sensing points have been selected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
post_var_threshold
|
float
|
Posterior variance upper bound at objective points (same units as the kernel variance). Lower values demand stronger information gain. |
0.7
|
target_fraction
|
int
|
Desired percent coverage in [0, 100]. (Using float allows e.g., 95.0.) |
100
|
return_fovs
|
bool
|
If True, also return polygons summarizing each selected candidate’s covered region (convex hull of covered objective points, buffered). |
False
|
slack_ratio
|
float | None
|
Non-negative slack used to lower the post_var_threshold when generating the candidate set, generating extra candidates and improving the chance of reaching the target coverage. |
None
|
candidate_method
|
str
|
Method used to generate the candidate set. Available options: |
'Hex'
|
X_warm_start
|
ndarray
|
Initial candidate locations to force inclusion. |
[]
|
**kwargs
|
Any
|
Extra arguments forwarded to the TSP solver. |
{}
|
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray | Tuple[np.ndarray, List[shapely.geometry.Polygon]]: X_sol: Array shaped (num_robots, k, d) with k <= num_sensing selected points. (X_sol, fovs): If return_fovs is True, also returns a list of shapely Polygons. |
Source code in sgptools/methods.py
1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 | |
update(kernel, noise_variance)
¶
Update kernel and noise variance hyperparameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kernel
|
Kernel
|
New GPflow kernel instance. |
required |
noise_variance
|
float
|
New observation noise variance. |
required |