This file contains hidden or 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
| // | |
| // Nearlest Neighbour Classification for MNIST dataset | |
| // | |
| #include <iostream> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <cmath> | |
| #include <map> | |
| #include <vector> | |
| #include <queue> |
This file contains hidden or 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
| // Read MNIST Database (handwritten digits) | |
| // | |
| // Usage: | |
| // 1. download | |
| // train-images-idx3-ubyte.gz | |
| // train-labels-idx2-ubyte.gz | |
| // from | |
| // http://yann.lecun.com/exdb/mnist/ | |
| // and extract them. | |
| // |
This file contains hidden or 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
| % Radial Basis Function expansion | |
| % | |
| % f(x) = sum k(x, yi) wi | |
| % -> w = k(X,Y) \ f(X) | |
| % here k(x,y) := rho(|x-y|), e.g., exp(-|x-y2|^2) | |
| % input data | |
| N = 100; | |
| X = rand(N,1); | |
| fX = abs( cos( 2 * 3.14 * (X .* X) ) ); |
This file contains hidden or 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
| // Two-layer Neural Network | |
| // | |
| // USAGE: | |
| // ./a.out in.txt out.txt | |
| // gnuplot -e "plot 'in.txt', 'out.txt'; pause 2" | |
| // | |
| #include <iostream> | |
| #include <cstdio> | |
| #include <ctime> | |
| #include <cstdlib> |
This file contains hidden or 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
| // | |
| // Sparse LU Decomposition (Gilbert-Peierls) | |
| // | |
| #include <iostream> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <vector> | |
| #include <functional> | |
| #include <algorithm> | |
| #include <cmath> |
This file contains hidden or 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
| :) |
NewerOlder