-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SparseKDE, QuickShift and add H2O-BLYP-Piglet dataset (#222)
* Add the class `SparseKDE` is located at `src/skmatter/utils/_sparsekde.py`. It mitigates the high cost of doing KDE for large datasets by doing KDE for selected data points (e.g. grid points sampled by farthest point-sampling). This class takes the original dataset as a parameter and fits the model using the sampled grid points. The corresponding tests can be found in `tests/test_neighbors.py`. * Add the class `QuickShift` in `src/skmatter/clustering/_quick_shift.py` implementing the quick shift clustering algorithm with corresponding tests in `tests/test_clustering.py`. * Add H2O-BLYP-Piglet dataset containing 27233 hydrogen bond with 3D descriptor and weights. The corresponding tests can be found in `tests/test_datasets.py` * Add two auxiliary functions of `effdim` and `oas` stored in `src/skmatter/utils/_sparsekde.py` with corresponding tests in `tests/test_neighbors.py`. * Add two distance metrics compatible with PBC, `pairwise_euclidean_distances` and `pairwise_mahalanobis_distances`, are realized and stored in `src/skmatter/metrics/pairwise.py` with corresponding tests in `tests/test_metrics.py`.
- Loading branch information
1 parent
3c784c9
commit ad56b1d
Showing
29 changed files
with
2,251 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Clustering | ||
========== | ||
|
||
.. automodule:: skmatter.clustering | ||
|
||
.. _quick-shift-api: | ||
|
||
Quick Shift | ||
------------ | ||
|
||
.. autoclass:: skmatter.clustering.QuickShift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,9 @@ API Reference | |
preprocessing | ||
selection | ||
linear_models | ||
clustering | ||
decomposition | ||
metrics | ||
neighbors | ||
datasets | ||
utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Neighbors | ||
========= | ||
|
||
.. automodule:: skmatter.neighbors | ||
|
||
.. _sparse-kde-api: | ||
|
||
Sparse Kernel Density Estimation | ||
-------------------------------- | ||
|
||
.. autoclass:: skmatter.neighbors.SparseKDE | ||
:show-inheritance: | ||
|
||
.. automethod:: fit | ||
.. automethod:: score_samples | ||
.. automethod:: score |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
examples/selection/index | ||
examples/regression/index | ||
examples/reconstruction/index | ||
examples/neighbors/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Neighbors | ||
========= |
Oops, something went wrong.