Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
% CHAPTER03
% linReg - Fit linear regression model y=w'x+w0
% linRegFp - Fit empirical Bayesian linear model with Mackay fixed point method (p.168)
% linRegPred - Compute linear regression model reponse y = w'*X+w0 and likelihood
% linRegPred - Compute linear regression model response y = w'*X+w0 and likelihood
% linRnd - Generate data from a linear model p(t|w,x)=G(w'x+w0,sigma), sigma=sqrt(1/beta)
% CHAPTER04
% binPlot - Plot binary classification result for 2d data
Expand All @@ -27,7 +27,7 @@
% logitBinPred - Prediction of binary logistic regression model
% logitMn - Multinomial regression for multiclass problem (Multinomial likelihood)
% logitMnPred - Prediction of multiclass (multinomial) logistic regression model
% sigmoid - Sigmod function
% sigmoid - Sigmoid function
% softmax - Softmax function
% CHAPTER05
% mlpClass - Train a multilayer perceptron neural network for classification with backpropagation
Expand All @@ -39,7 +39,7 @@
% knCenter - Centerize the data in the kernel space
% knGauss - Gaussian (RBF) kernel K = exp(-|x-y|/(2s));
% knKmeans - Perform kernel kmeans clustering.
% knKmeansPred - Prediction for kernel kmeans clusterng
% knKmeansPred - Prediction for kernel kmeans clustering
% knLin - Linear kernel (inner product)
% knPca - Kernel PCA
% knPcaPred - Prediction for kernel PCA
Expand All @@ -49,9 +49,9 @@
% sd2kn - Transform a squared distance matrix to a kernel matrix.
% CHAPTER07
% rvmBinFp - Relevance Vector Machine (ARD sparse prior) for binary classification.
% rvmBinPred - Prodict the label for binary logistic regression model
% rvmBinPred - Predict the label for binary logistic regression model
% rvmRegFp - Relevance Vector Machine (ARD sparse prior) for regression
% rvmRegPred - Compute RVM regression model reponse y = w'*X+w0 and likelihood
% rvmRegPred - Compute RVM regression model response y = w'*X+w0 and likelihood
% rvmRegSeq - Sparse Bayesian Regression (RVM) using sequential algorithm
% CHAPTER08
% MRF
Expand All @@ -61,13 +61,13 @@
% mrfIsGa - Contruct a latent Ising MRF with Gaussian observation
% mrfMf - Mean field for MRF
% NaiveBayes
% nbBern - Naive bayes classifier with indepenet Bernoulli.
% nbBern - Naive bayes classifier with independent Bernoulli.
% nbBernPred - Prediction of naive Bayes classifier with independent Bernoulli.
% nbGauss - Naive bayes classifier with indepenet Gaussian
% nbGauss - Naive bayes classifier with independent Gaussian
% nbGaussPred - Prediction of naive Bayes classifier with independent Gaussian.
% CHAPTER09
% kmeans - Perform kmeans clustering.
% kmeansPred - Prediction for kmeans clusterng
% kmeansPred - Prediction for kmeans clustering
% kmeansRnd - Generate samples from a Gaussian mixture distribution with common variances (kmeans model).
% kmedoids - Perform k-medoids clustering.
% kseeds - Perform kmeans++ seeding
Expand All @@ -76,7 +76,7 @@
% mixBernRnd - Generate samples from a Bernoulli mixture distribution.
% mixGaussEm - Perform EM algorithm for fitting the Gaussian mixture model.
% mixGaussPred - Predict label and responsibility for Gaussian mixture model.
% mixGaussRnd - Genarate samples form a Gaussian mixture model.
% mixGaussRnd - Generate samples from a Gaussian mixture model.
% rvmBinEm - Relevance Vector Machine (ARD sparse prior) for binary classification.
% rvmRegEm - Relevance Vector Machine (ARD sparse prior) for regression
% CHAPTER10
Expand All @@ -94,21 +94,21 @@
% mixDpGb - Collapsed Gibbs sampling for Dirichlet process (infinite) mixture model.
% mixDpGbOl - Online collapsed Gibbs sampling for Dirichlet process (infinite) mixture model.
% mixGaussGb - Collapsed Gibbs sampling for Dirichlet process (infinite) Gaussian mixture model (a.k.a. DPGM).
% mixGaussSample - Genarate samples form a Gaussian mixture model with GaussianWishart prior.
% mixGaussSample - Generate samples from a Gaussian mixture model with GaussianWishart prior.
% CHAPTER12
% fa - Perform EM algorithm for factor analysis model
% pca - Principal component analysis
% pcaEm - Perform EM-like algorithm for PCA (by Sam Roweis).
% pcaEmC - Perform Constrained EM like algorithm for PCA.
% ppcaEm - Perform EM algorithm to maiximize likelihood of probabilistic PCA model.
% ppcaEm - Perform EM algorithm to maximize likelihood of probabilistic PCA model.
% ppcaRnd - Generate data from probabilistic PCA model
% ppcaVb - Perform variatioanl Bayeisan inference for probabilistic PCA model.
% ppcaVb - Perform variational Bayesian inference for probabilistic PCA model.
% CHAPTER13
% HMM
% hmmEm - EM algorithm to fit the parameters of HMM model (a.k.a Baum-Welch algorithm)
% hmmFilter - HMM forward filtering algorithm.
% hmmRnd - Generate a data sequence from a hidden Markov model.
% hmmSmoother - HMM smoothing alogrithm (normalized forward-backward or normalized alpha-beta algorithm).
% hmmSmoother - HMM smoothing algorithm (normalized forward-backward or normalized alpha-beta algorithm).
% hmmViterbi - Viterbi algorithm (calculated in log scale to improve numerical stability).
% LDS
% kalmanFilter - Kalman filter (forward algorithm for linear dynamic system)
Expand All @@ -119,7 +119,7 @@
% CHAPTER14
% adaboostBin - Adaboost for binary classification (weak learner: kmeans)
% adaboostBinPred - Prediction of binary Adaboost
% mixLinPred - Prediction function for mxiture of linear regression
% mixLinPred - Prediction function for mixture of linear regression
% mixLinReg - Mixture of linear regression
% mixLinRnd - Generate data from mixture of linear model
% mixLogitBin - Mixture of logistic regression model for binary classification optimized by Newton-Raphson method
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Pattern Recognition and Machine Learning by C. Bishop ([PRML](http://research.mi

It is written purely in Matlab language. It is self-contained. There is no external dependency.

Note: this package requires Matlab **R2016b** or latter, since it utilizes a new Matlab syntax called [Implicit expansion](https://cn.mathworks.com/help/matlab/release-notes.html?rntext=implicit+expansion&startrelease=R2016b&endrelease=R2016b&groupby=release&sortby=descending) (a.k.a. broadcasting). It also requires Statistics Toolbox (for some simple random number generator) and Image Processing Toolbox (for reading image data).
Note: this package requires Matlab **R2016b** or later, since it utilizes a new Matlab syntax called [Implicit expansion](https://cn.mathworks.com/help/matlab/release-notes.html?rntext=implicit+expansion&startrelease=R2016b&endrelease=R2016b&groupby=release&sortby=descending) (a.k.a. broadcasting). It also requires Statistics Toolbox (for some simple random number generator) and Image Processing Toolbox (for reading image data).

Design Goal
-------
* Succinct: The code is extremely compact. Minimizing code length is a major goal. As a result, the core of the algorithms can be easily spotted.
* Efficient: Many tricks for speeding up Matlab code are applied (e.g. vectorization, matrix factorization, etc.). Usually, functions in this package are orders faster than Matlab builtin ones (e.g. kmeans).
* Robust: Many tricks for numerical stability are applied, such as computing probability in logrithm domain, square root matrix update to enforce matrix symmetry\PD, etc.
* Readable: The code is heavily commented. Corresponding formulas in PRML are annoted. Symbols are in sync with the book.
* Robust: Many tricks for numerical stability are applied, such as computing probability in logarithm domain, square root matrix update to enforce matrix symmetry\PD, etc.
* Readable: The code is heavily commented. Corresponding formulas in PRML are annotated. Symbols are in sync with the book.
* Practical: The package is not only readable, but also meant to be easily used and modified to facilitate ML research. Many functions in this package are already widely used (see [Matlab file exchange](http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A49739)).

Installation
Expand All @@ -25,9 +25,9 @@ git clone https://github.com/PRML/PRMLT.git

3. Run some demos in ~/PRMLT/demo folder. Enjoy!

FeedBack
Feedback
-------
If you find any bug or have any suggestion, please do file issues. I am graceful for any feedback and will do my best to improve this package.
If you find any bug or have any suggestion, please do file issues. I am grateful for any feedback and will do my best to improve this package.

License
-------
Expand Down