4.0
Other
Machine learning algorithm code, can be used in Word, image recognition, recognition
Original version can only run on 32-bit XP, upon his own modifications, suitable for all kinds of versions of MATLAB Windows
clear all
useMex = 0; % Set this to 1 to use mex files to speed things up
%% Generate Synthetic Data
% Notes:
% - X is categorical, each element X(i,j) contains the value of feature j for word i,
% a value of '0' means ignore the feature for this training example
% - y is cateogircal, each element y(i) contains the label for word i
% a value of '0' indicates the position between sentences
[X,y] = crfChain_genSynthetic;
nWords = size(X,1);
nStates = max(y);
nFeatures = max(X);
%% Initialize parameters and data structures
[W,v_start,v_end,v]=crfChain_initWeights (nFeatures,nStates,'randn');% initialization param
matlab
链式
CRF
No comment