Yet ANother pattern recognition matlab toolbox
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
RandomForest-v0.02 initial Apr 25, 2016
actvTED_demo initial Apr 25, 2016
libsvm-3.13 initial Apr 25, 2016
mRMR initial Apr 25, 2016
README.md revise readme Apr 25, 2016
adaboost.m initial Apr 25, 2016
classf_.m initial Apr 25, 2016
classf_ann_te.m initial Apr 25, 2016
classf_ann_tr.m initial Apr 25, 2016
classf_boost_te.m initial Apr 25, 2016
classf_boost_tr.m initial Apr 25, 2016
classf_elm_te.m initial Apr 25, 2016
classf_elm_tr.m initial Apr 25, 2016
classf_gauss_te.m initial Apr 25, 2016
classf_gauss_tr.m initial Apr 25, 2016
classf_knn_te.m initial Apr 25, 2016
classf_knn_tr.m initial Apr 25, 2016
classf_lr_te.m initial Apr 25, 2016
classf_lr_tr.m initial Apr 25, 2016
classf_rf_te.m initial Apr 25, 2016
classf_rf_tr.m initial Apr 25, 2016
classf_softmax_te.m initial Apr 25, 2016
classf_softmax_tr.m initial Apr 25, 2016
classf_svm_te.m initial Apr 25, 2016
classf_svm_tr.m initial Apr 25, 2016
classf_tree_te.m initial Apr 25, 2016
classf_tree_tr.m fix bug in LDA, refactor test.m Apr 26, 2016
defParam.m initial Apr 25, 2016
fmincg.m initial Apr 25, 2016
ftProc_.m initial Apr 25, 2016
ftProc_kpca_te.m initial Apr 25, 2016
ftProc_kpca_tr.m initial Apr 25, 2016
ftProc_lda_te.m initial Apr 25, 2016
ftProc_lda_tr.m fix bug in LDA, refactor test.m Apr 26, 2016
ftProc_mat2ftvec.m initial Apr 25, 2016
ftProc_pca_te.m initial Apr 25, 2016
ftProc_pca_tr.m initial Apr 25, 2016
ftProc_zscore_te.m initial Apr 25, 2016
ftProc_zscore_tr.m initial Apr 25, 2016
ftSel_boost.m initial Apr 25, 2016
ftSel_corr.m initial Apr 25, 2016
ftSel_fisher.m initial Apr 25, 2016
ftSel_ga.m fix bug in LDA, refactor test.m Apr 26, 2016
ftSel_mrmr.m initial Apr 25, 2016
ftSel_rf.m initial Apr 25, 2016
ftSel_sfs.m fix bug in LDA, refactor test.m Apr 26, 2016
ftSel_single.m fix bug in LDA, refactor test.m Apr 26, 2016
ftSel_stepwisefit.m initial Apr 25, 2016
ftSel_svmrfe_ker.m initial Apr 25, 2016
ftSel_svmrfe_ori.m initial Apr 25, 2016
method summary.doc initial Apr 25, 2016
readme.txt initial Apr 25, 2016
regress_.m initial Apr 25, 2016
regress_ann_te.m initial Apr 25, 2016
regress_ann_tr.m initial Apr 25, 2016
regress_elm_te.m initial Apr 25, 2016
regress_elm_tr.m initial Apr 25, 2016
regress_kridge_te.m initial Apr 25, 2016
regress_kridge_tr.m initial Apr 25, 2016
regress_lasso_te.m initial Apr 25, 2016
regress_lasso_tr.m initial Apr 25, 2016
regress_pls_te.m initial Apr 25, 2016
regress_pls_tr.m initial Apr 25, 2016
regress_rf_te.m initial Apr 25, 2016
regress_rf_tr.m initial Apr 25, 2016
regress_ridge_te.m initial Apr 25, 2016
regress_ridge_tr.m initial Apr 25, 2016
regress_simplefit_te.m initial Apr 25, 2016
regress_simplefit_tr.m initial Apr 25, 2016
regress_step_te.m initial Apr 25, 2016
regress_step_tr.m initial Apr 25, 2016
regress_svr_te.m initial Apr 25, 2016
regress_svr_tr.m initial Apr 25, 2016
sigmoid.m initial Apr 25, 2016
smpSel_cluster.m initial Apr 25, 2016
smpSel_ks.m initial Apr 25, 2016
smpSel_llr.m fix bug in LDA, refactor test.m Apr 26, 2016
smpSel_ted.m initial Apr 25, 2016
stump.m initial Apr 25, 2016
test.m fix bug in LDA, refactor test.m Apr 26, 2016
test_genDataset.m fix bug in LDA, refactor test.m Apr 26, 2016
test_getErrRate.m fix bug in LDA, refactor test.m Apr 26, 2016

README.md

Contents

The YAN-PRTools matlab toolbox now includes 40 common pattern recognition algorithms:

Feature processing

  1. mat2ftvec : Transform sample matrices to a feature matrix
  2. zscore : feature normalization
  3. pca : PCA
  4. kpca : KPCA
  5. lda : LDA

Classification

  1. lr : Logistic regression
  2. softmax : Softmax
  3. svm : Wrapper of libsvm
  4. rf : Random forest
  5. knn : K nearest neighbors
  6. gauss : Wrapper of Matlab's classify function, including methods like naive Bayes, fitting normal density function, Mahalanobis distance, etc.
  7. boost : AdaBoost with stump weak classifier
  8. tree : Wrapper of Matlab's tree classifier
  9. ann : Wrapper of the artificial neural networks in Matlab
  10. elm : Basic extreme learning machine

Regression

  1. ridge : Ridge regression
  2. kridge : Kernel ridge regression
  3. svr : Wrapper of support vector regression in libsvm
  4. simplefit : Wrapper to Matlab's basic fitting functions, inncluding least squares, robust fitting, quadratic fitting, etc.
  5. lasso : Wrapper of Matlab's lasso regression
  6. pls : Wrapper of Matlab's patial least square regression
  7. step : Wrapper of Matlab's stepwisefit
  8. rf : Random forest
  9. ann : Wrapper of the artificial neural networks in Matlab
  10. elm : Basic extreme learning machine

Feature selection

  1. corr : Feature ranking based on correlation coefficients (filter method)
  2. fisher : Feature ranking using Fisher ratio (filter method)
  3. mrmr : Feature ranking using minimum redundancy maximal relevance (mRMR) (filter method)
  4. single : Feature ranking based on each single feature's prediction accuracy (wrapper method)
  5. sfs : Feature selection using sequential forward selection (wrapper method)
  6. ga : Feature selection using the genetic algorithm in Matlab (wrapper method)
  7. rf : Feature ranking using random forest (embedded method)
  8. stepwisefit : Feature selection based on stepwise fitting (embedded method)
  9. boost : Feature selection using AdaBoost with the stump weak learner (embedded method)
  10. svmrfe_ori : Feature ranking using SVM-recursive feature elimination (SVM-RFE), the original linear version (embedded method)
  11. svmrfe_ker : Feature ranking using the kernel version of SVM-RFE (embedded method)

Representative sample selection (active learning)

  1. cluster : Sample selection based on cluster centers
  2. ted : Transductive experimental design
  3. llr : Locally linear reconstruction
  4. ks : Kennard-Stone algorithm

Interfaces

Feature processing

[Xnew, model] = ftProc_xxx_tr(X,Y,param) % training
Xnew = ftProc_xxx_te(model,X) % test

Classification

model = classf_xxx_tr(X,Y,param) % training
[pred,prob] = classf_xxx_te(model,Xtest) % test, return the predicted labels and probabilities (optional)

Regression

model = regress_xxx_tr(X,Y,param) % training
rv = regress_xxx_te(model,Xtest) % test, return the predicted values

Feature selection

[ftRank,ftScore] = ftSel_xxx(ft,target,param) % return the feature rank (or subset) and scores (optional)

Representative sample selection (active learning)

smpList = smpSel_xxx(X,nSel,param) % return the indices of the selected samples

Please see test.m for sample usages.

Besides, there are three uniform wrappers: ftProc_, classf_, regress_. They accept algorithm name strings as inputs and combine the training and test phase.


Characteristics

  • The training (tr) and test (te) phases are split for feature processing, classification and regression to allow more flexible use. For example, one trained model can be applied multiple times.
  • The struct "param" is used to pass parameters to algorithms.
  • Default parameters are set clearly at the top of the code, along with the explainations.

In brief, I aimed at three main objectives when developing this toolbox:

  • Unified and simple interface;
  • Convenient to observe and change algorithm parameters, avoiding tedious parameter setting and checking;
  • Extensibile. Simple file structures makes it easier to modify the algorithms.

Dependencies

In the toolbox, 20 algorithms are self-implemented, 11 are wrappers or mainly based on Matlab functions, and 9 are wrappers or mainly based on 3rd party toolboxes, which are listed below. They are included in the project, however, you may need to recompile some of them depending on your computer platform.

Thanks to the authors and MathWorks Inc.! I know that there is so many important algorithms not contained in the toolbox, so everybody is welcomed to contribute new codes! Also, if you find any bug in the codes, please don't hesitate to let me know!

Ke YAN, 2016, Tsinghua Univ. http://yanke23.com, xjed09@gmail.com