From 6da67a32e56c101b9334d2c6f33bd5238d082330 Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Fri, 24 Jul 2015 13:01:16 -0300 Subject: 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. --- npdistortion.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 npdistortion.cpp (limited to 'npdistortion.cpp') 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); +} -- cgit v1.2.3