diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2015-07-24 13:01:16 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2015-07-24 13:01:16 -0300 |
commit | 6da67a32e56c101b9334d2c6f33bd5238d082330 (patch) | |
tree | 87d6f4dbc4b1d926be75c432ede2578ab45d8b33 /npdistortion.cpp | |
parent | b7e1060b7cb71b30b91cc65c011b719e255c0a06 (diff) |
Color mapping in Scatterplot and initial measures.
- Scatterplot: can now map any floating point data to colors;
- Scatterplot: somewhat optimized geometry/material updates;
- Removed anything related to labels where it was not necessary;
- Added observers to implement distortion (via measures) visualization;
- Added skeleton implementations of NP and silhouette.
Diffstat (limited to 'npdistortion.cpp')
-rw-r--r-- | npdistortion.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/npdistortion.cpp b/npdistortion.cpp new file mode 100644 index 0000000..71db85b --- /dev/null +++ b/npdistortion.cpp @@ -0,0 +1,14 @@ +#include "npdistortion.h" + +#include "mp.h" + +NPDistortion::NPDistortion(const arma::mat &X, const arma::uvec &sampleIndices, int k) + : DistortionObserver(X, sampleIndices) + , m_k(k) +{ +} + +arma::vec NPDistortion::measureFunc(const arma::mat &distA, const arma::mat &distB) +{ + return mp::neighborhoodPreservation(distA, distB, m_k); +} |