dssdyx / spectral Goto Github PK
View Code? Open in Web Editor NEWThis project forked from timnugent/spectral
Spectral clustering using K-means and a radial basis function kernel matrix [machine learning]
This project forked from timnugent/spectral
Spectral clustering using K-means and a radial basis function kernel matrix [machine learning]
Spectral Clustering ------------------- Tim Nugent 2014 Performs K-means clustering using top K eigenvectors of an affinity (kernel) matrix. Kernel matrix is generated using the radial basis function kernel before being normalised. Input is an nXp data matrix in CSV format via the read_data function, or an nXp Eigen MatrixXd object via the constructor. Build ----- Install Eigen, e.g.: sudo apt-get install libeigen3-dev or download from http://eigen.tuxfamily.org/. Make sure the include path is set right in the Makefile. Compile with 'make' or: g++ -O3 --std=c++11 -Wall -Wextra -I/usr/include/eigen3 src/*.cpp -o bin/sc On OS X using brew: brew install eigen Then: g++ -O3 --std=c++11 -Wall -Wextra -I/usr/local/include/eigen3 src/*.cpp -o bin/sc Run --- Run with 'make test', or: bin/sc Spirals test CSV file is read from the data directory. Output ------ bin/sc Read data/spirals.csv Iterations 1 : Error 1.7881 : Error delta 1.7881 : Centroid movement 0.0711 Iterations 2 : Error 0.4435 : Error delta 1.3446 : Centroid movement 0.0197 Iterations 3 : Error 0.2425 : Error delta 0.2010 : Centroid movement 0.0122 Iterations 4 : Error 0.2130 : Error delta 0.0295 : Centroid movement 0.0000 Iterations 5 : Error 0.2130 : Error delta 0.0000 : Centroid movement 0.0000 Wrote data/spirals_clustered.csv Cluster assignments: 1 1 2 2 1 2 2 2 1 2 2 1 1 2 2 1 1 1 1 1 2 2 1 2 2 2 2 1 1 1 2 1 2 2 1 2 1 2 1 1 2 2 2 2 1 1 1 1 1 2 1 2 1 1 2 2 2 1 1 1 1 1 2 2 1 2 1 1 1 2 2 1 2 2 2 1 1 1 1 2 1 2 1 2 1 1 1 1 1 1 2 1 1 2 2 2 1 2 2 2 2 1 1 1 2 2 1 2 2 2 1 2 1 1 1 1 2 2 1 1 2 1 1 1 2 1 2 1 1 1 1 1 2 2 2 2 2 1 1 1 2 2 1 2 1 1 1 2 2 2 1 2 2 2 2 2 2 1 1 1 1 2 1 2 1 1 1 2 1 1 1 1 2 1 2 1 1 1 2 2 1 1 1 2 2 2 1 1 2 2 2 2 2 2 2 2 1 1 1 1 2 1 2 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 1 1 1 2 2 2 2 1 1 1 2 1 1 2 2 2 2 2 1 1 2 2 2 2 1 1 1 2 2 2 2 2 2 1 1 2 2 1 1 1 1 1 1 1 2 2 2 2 1 2 1 2 1 1 2 2 2 1 2 1 1 1 1 2 2 1 2 1 2 2 2 1 2 1 2 2 1 1 2 2 2 1 Plotting data using R... src/plot.R If R is installed, see spirals_clustered.png. A new CSV file (spirals_clustered.csv) is also written to data/ containing the cluster assignments. To-do ----- -Add more kernels -Add automatic gamma tuning for RBF kernel References ---------- K-means code adapted from: https://github.com/pthimon/clustering Useful info: http://charlesmartin14.wordpress.com/2012/10/09/spectral-clustering/ Bugs ---- [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.