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
9 changed files
with
9 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
function linPlot(model, X, t) | ||
% Plot linear function for 1d data data | ||
% Input: | ||
% model: trained struct | ||
% model: trained model structure | ||
% X: 1 x n data | ||
% t: 1 x n response | ||
% 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
% t: 1 x n response | ||
% lambda: regularization parameter | ||
% Output: | ||
% model: trained struct used by linPred | ||
% model: trained model structure | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 3 | ||
lambda = 0; | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
% X: d x n data | ||
% t: 1 x n response | ||
% Output: | ||
% model: trained struct used by linPred | ||
% model: trained model structure | ||
% llh: loglikelihood | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 3 | ||
|
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 binPlot(model, X, t) | ||
% Plot binary classification result for 2d data | ||
% Input: | ||
% model: trained struct | ||
% model: trained model structure | ||
% X: 2 x n data matrix | ||
% t: 1 x n label | ||
% 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
% t: 1 x n label (0/1) | ||
% lambda: regularization parameter | ||
% Output: | ||
% model: trained model | ||
% model: trained model structure | ||
% llh: loglikelihood | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 3 | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
% t: 1 x n label (1~k) | ||
% lambda: regularization parameter | ||
% Output: | ||
% model: trained model | ||
% model: trained model structure | ||
% llh: loglikelihood | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 3 | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
% Output: | ||
% label: 1 x n clustering result label | ||
% energy: optimization target value | ||
% model: trained struct, used by predict | ||
% model: trained model structure | ||
% 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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
% q: target dimension | ||
% kn: kernel function | ||
% Ouput: | ||
% model: struct trained, used by predit | ||
% model: trained model structure | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 3 | ||
kn = @knGauss; | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
% t: 1 x n response | ||
% lambda: regularization parameter | ||
% Output: | ||
% model: trained struct used by linPred | ||
% model: trained model structure | ||
% Written by Mo Chen ([email protected]). | ||
if nargin < 4 | ||
kn = @knGauss; | ||
|