Skip to content

Commit d7c0652

Browse files
authored
Merge pull request #1004 from gchq/feature/gkp_analytic_test
Analytic example and tests for Greedy Kernel Points
2 parents 7332b40 + 9d1cbd9 commit d7c0652

File tree

10 files changed

+1630
-158
lines changed

10 files changed

+1630
-158
lines changed

.cspell/library_terms.txt

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ logpdf
7272
lstsq
7373
mathbb
7474
mathbf
75+
mathcal
7576
mathrm
7677
matplotlib
7778
maxval

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
(https://github.com/gchq/coreax/issues/934)
1414
- Added `reduce_iterative()` method to Kernel Herding. (https://github.com/gchq/coreax/pull/983)
1515
- Added probabilistic iterative Kernel Herding benchmarking results. (https://github.com/gchq/coreax/pull/983)
16+
- Analytic example with integration test for `GreedyKernelPoints` plus an analytic unit
17+
test for the loss function. (https://github.com/gchq/coreax/pull/1004)
1618

1719
### Fixed
1820

@@ -26,6 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2628
(https://github.com/gchq/coreax/pull/1000)
2729
- Reduced the number of dimensions when applying UMAP in `pounce_benchmark.py`.
2830
(https://github.com/gchq/coreax/pull/1000)
31+
- Refactored `GreedyKernelPoints` and associated functions to make more extensible in
32+
future. (https://github.com/gchq/coreax/pull/1004)
2933

3034
### Removed
3135

coreax/kernels/scalar_valued.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class LinearKernel(ScalarValuedKernel):
3131
r"""
3232
Define a linear kernel.
3333
34-
Given :math:`\rho`=` ``output_scale``and :math:`a=` ``constant`` the linear kernel
34+
Given output scale :math:`\rho` and constant :math:`a`, the linear kernel
3535
is defined as :math:`k: \mathbb{R}^d\times \mathbb{R}^d \to \mathbb{R}`,
3636
:math:`k(x, y) = a + \rho (x)^T(y)`.
3737

coreax/solvers/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ def reduce(
4141
self, dataset: _Data, solver_state: Optional[_State] = None
4242
) -> tuple[_Coreset, _State]:
4343
r"""
44-
Reduce 'dataset' to a coreset - solve the coreset problem.
44+
Reduce ``dataset`` to a coreset - solve the coreset problem.
4545
4646
:param dataset: The (potentially weighted and supervised) data to generate the
4747
coreset from
4848
:param solver_state: Solution state information, primarily used to cache
4949
expensive intermediate solution step information
50-
:return: a tuple of the solved coreset and intermediate solver state information
50+
:return: Solved coreset; Intermediate solver state information
5151
"""
5252

5353

0 commit comments

Comments
 (0)