Skip to content

Instantly share code, notes, and snippets.

@lisitsyn
Created October 31, 2018 20:11
Show Gist options
  • Select an option

  • Save lisitsyn/eb4eb693d16fc623484295da49bea8c6 to your computer and use it in GitHub Desktop.

Select an option

Save lisitsyn/eb4eb693d16fc623484295da49bea8c6 to your computer and use it in GitHub Desktop.
#include <tapkee/tapkee.hpp>
using namespace std;
using namespace tapkee;
int main(int argc, const char** argv)
{
const int N = 100;
const int M = 10;
tapkee::DenseMatrix matrix(M, N);
for (int i=0; i<M; i++) {
for (int j=0; j<N; j++) {
matrix(i, j) = float(i + j);
}
}
TapkeeOutput output = initialize()
.withParameters((method=MultidimensionalScaling,
target_dimension=1))
.embedUsing(matrix);
cout << output.embedding.transpose() << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment