forked from PRML/PRMLT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function [label, energy, model] = knKmeans(X, init, kn) | ||
% Perform kernel k-means clustering. | ||
% K: nxn kernel matrix | ||
% k: number of cluster | ||
% init: either number of clusters or initial label | ||
% Reference: Kernel Methods for Pattern Analysis | ||
% by John Shawe-Taylor, Nello Cristianini | ||
% Written by Mo Chen ([email protected]). | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
function [ R, Z, err ] = knPca( X, d, kn ) | ||
function [ R, Z, err, model] = knPca(X, d, kn) | ||
% Kernel PCA | ||
% X: dxn data matrix | ||
% d: target dimension | ||
% kn: kernel function | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 3 | ||
kn = @knGauss; | ||
end | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
function [ output_args ] = knPcaPred( input_args ) | ||
%KNPCAPRED Summary of this function goes here | ||
% Detailed explanation goes here | ||
function X = knPcaPred(model, Xt) | ||
% Prediction for kernel PCA | ||
% model: trained model structure | ||
% X: d x n testing data | ||
% t (optional): 1 x n testing response | ||
% Written by Mo Chen ([email protected]). | ||
|
||
|
||
end | ||
|