Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
86 additions
and
59 deletions.
There are no files selected for viewing
Submodule data
updated
1 files
+10 −0 | testsuite/meta/converter/diffusionmaps.dat |
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,43 @@ | ||
================ | ||
Diffusion Maps | ||
================ | ||
|
||
Diffusion Maps is a non-linear dimensionality reduction method that uses | ||
eigenfunctions of Markov matrices to diffusion maps for efficient | ||
representations of complex geometric structures. | ||
The diffusion kernel :math: `k` must satisfy | ||
the following properties: | ||
|
||
1. :math: `k` is symmetric :math: `{\bf k}(x, y) = {\bf k}(y, x)` | ||
2. :math: `k` is positivity preserving :math: `{\bf k}(x, y) ≥ 0` | ||
|
||
|
||
For more information see :cite:`Coifman-Lafon2006Diffusionmaps`. | ||
|
||
------- | ||
Example | ||
------- | ||
|
||
We create CDenseFeatures (RealFeatures, here 64 bit float values). | ||
|
||
.. sgexample:: diffusionmaps.sg:create_features | ||
|
||
We create a :sgclass:`CDiffusionMaps` instance, and set its parameters. | ||
|
||
.. sgexample:: diffusionmaps.sg:set_parameters | ||
|
||
Then we apply diffusion maps, which gives us distance embeddings. | ||
|
||
.. sgexample:: diffusionmaps.sg:apply_convert | ||
|
||
We can also extract the estimated feature_matrix. | ||
|
||
.. sgexample:: diffusionmaps.sg:extract | ||
|
||
---------- | ||
References | ||
---------- | ||
:wiki:`Diffusion_map` | ||
|
||
.. bibliography:: ../../references.bib | ||
:filter: docname in docnames |
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,18 @@ | ||
File f_feats = csv_file("../../data/fm_train_real.dat") | ||
|
||
#![create_features] | ||
Features feats = features(f_feats) | ||
#![create_features] | ||
|
||
#![set_parameters] | ||
Kernel k = kernel("GaussianKernel", cache_size=10, log_width=10.0) | ||
Converter diffusion_maps = converter("DiffusionMaps", target_dim=1, kernel=k, t=10) | ||
#![set_parameters] | ||
|
||
#![apply_convert] | ||
Features converted = diffusion_maps.apply(feats) | ||
#![apply_convert] | ||
|
||
#![extract] | ||
RealMatrix feature_matrix = converted.get_real_matrix("feature_matrix") | ||
#![extract] |
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
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 was deleted.
Oops, something went wrong.
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