plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | SenticNet/one-class-svm-master | fp_given_fn.m | .m | one-class-svm-master/dd_tools/fp_given_fn.m | 678 | utf_8 | 25d458adcd73d9c8576d61ae3989493d | %FP_GIVEN_FN Estimate FPr for a fixed FNr
%
% FP = FP_GIVEN_FN(D,FN)
%
% INPUT
% D One-class dataset
% FN False negative rate
%
% OUTPUT
% FP False positive rate
%
% DESCRIPTION
% Compute the false positive rate FP, given a maximum false negative
% rate FN on dataset D (where D is typically the output ... |
github | SenticNet/one-class-svm-master | consistent_occ.m | .m | one-class-svm-master/dd_tools/consistent_occ.m | 3,903 | utf_8 | fe4a646bf6ffedbf5fac622c4324fe05 | %CONSISTENT_OCC
%
% W = CONSISTENT_OCC(X,NAME,FRACREJ,RANGE,NRFOLDS)
% W = X*CONSISTENT_OCC([],NAME,FRACREJ,RANGE,NRFOLDS)
% W = X*CONSISTENT_OCC(NAME,FRACREJ,RANGE,NRFOLDS)
%
% INPUT
% X Dataset
% NAME Name of a one-class classifier (default = 'gauss_dd')
% FRACREJ Fraction of target obje... |
github | SenticNet/one-class-svm-master | istarget.m | .m | one-class-svm-master/dd_tools/istarget.m | 1,178 | utf_8 | eb41db9fd0eab4f8e28198bf3f03ce05 | %ISTARGET true if the label is target
%
% I = ISTARGET(A)
% I = ISTARGET(LAB)
%
% INPUT
% A Dataset
% LAB Label vector
%
% OUTPUT
% I 0/1 vector indicating if objs aren't/are target objects
%
% DESCRIPTION
% Returns 1 for the objects in dataset A which are labeled 'target', and
% 0 ... |
github | SenticNet/one-class-svm-master | fn_given_fp.m | .m | one-class-svm-master/dd_tools/fn_given_fp.m | 681 | utf_8 | be92c0f25ca73c4997ff284482cc6ade | %FN_GIVEN_FP Estimate FNr for a fixed FPr
%
% FN = FN_GIVEN_FP(D,FN)
%
% INPUT
% D One-class dataset
% FP False positive rate
%
% OUTPUT
% FN False negative rate
%
% DESCRIPTION
% Compute the false negative rate FN, given a maximum false positive
% rate FP on dataset D (where D is typically the output ... |
github | SenticNet/one-class-svm-master | new_f_svs.m | .m | one-class-svm-master/dd_tools/new_f_svs.m | 1,318 | utf_8 | a7feafaac1469f2a8acf2cdda9dafd98 | % NEW_F_SVS
%
% [FRAC_SV2,ALF,B,SVX] = NEW_F_SVS(SIGMA, X, LABX,...
% FRAC_ERROR, FRACSV, THISEPS)
% Support function for the training of the SVDD in the optimization
% routine for optimizing sigma.
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of ... |
github | SenticNet/one-class-svm-master | plotroc.m | .m | one-class-svm-master/dd_tools/plotroc.m | 4,894 | utf_8 | b38d90b53e8bfedc1c3eb025fc01a835 | %PLOTROC Draw an ROC curve
%
% H = PLOTROC(W,A,LINESTYLE)
% H = PLOTROC(E,LINESTYLE)
%
% INPUT
% W Trained one-class classifier
% A One-class classifier
% E ROC curve, precision-recall curve
% LINESTYLE The color, line style or markers used
%
% OUTPUT
% H Figu... |
github | SenticNet/one-class-svm-master | auclpm.m | .m | one-class-svm-master/dd_tools/auclpm.m | 6,764 | utf_8 | 114537972c139b9c2e3127ccb87ba7c0 | %AUCLPM AUC optimized linear mapping
%
% W = AUCLPM(X, C, RTYPE, PAR, UNITNORM)
% W = X*AUCLPM([], C, RTYPE, PAR, UNITNORM)
% W = X*AUCLPM(C, RTYPE, PAR, UNITNORM)
%
% INPUT
% X Dataset
% C Regularization parameter (default = 10)
% RTYPE Subsample approach for constraints (default = 'sub... |
github | SenticNet/one-class-svm-master | mogEMextend.m | .m | one-class-svm-master/dd_tools/mogEMextend.m | 2,730 | utf_8 | 31e8572f673935bd90643fecabe4ae00 | %MOGEMEXTEND Extend a MoG with one cluster and apply EM
%
% [MEANS,INVCOVS,PRIORS] = MOGEMEXTEND(X,COVTYPE,MEANS,INVCOVS,PRIORS,
% NRITERS)
%
% INPUT
% X Data matrix
% COVTYPE Type of covariance matrix used
% MEANS Means of the MoG
% INVCOVS (Inverse of) covariance mat... |
github | SenticNet/one-class-svm-master | mog_extend.m | .m | one-class-svm-master/dd_tools/mog_extend.m | 1,482 | utf_8 | 43dc366a141ed453b908370e67ad8c44 | %MOG_EXTEND Extend a MoG with one cluster
%
% W = MOG_EXTEND(W,X,[],MAXITER)
% W = MOG_UPDATE(W,X,N,MAXITER)
%
% INPUT
% W Mixture model
% X One-class dataset
% N Indicator where to add a cluster (default = [1 0])
% MAXITER Number EM training updates to make (default = 25)
... |
github | SenticNet/one-class-svm-master | dd_error.m | .m | one-class-svm-master/dd_tools/dd_error.m | 3,214 | utf_8 | 32a4c0be260364a68efff586949a73d5 | %DD_ERROR compute false negative and false positive rate for oc_classifier
%
% E = DD_ERROR(X,W)
% E = DD_ERROR(X*W)
% E = X*W*DD_ERROR
% [E,F,G] = DD_ERROR(X,W)
%
% INPUT
% X One-class dataset
% W One-class classifier
%
% OUTPUT
% E False positive and false negative rates
% F Precision ... |
github | SenticNet/one-class-svm-master | lpdist.m | .m | one-class-svm-master/dd_tools/lpdist.m | 923 | utf_8 | f50be890e68ed474dd00da3c4b72ae87 | %LPDIST Fast L_p distance
%
% D = LPDIST(A,B,P,W)
%
% INPUT
% A,B Dataset
% P Degree P (default = 2)
% W Feature weights (default = [])
%
% OUTPUT
% D Distance matrix
%
% DESCRIPTION
% Compute the L_p^p distance between data A and B in a fast(er) way than
% using dd_proxm.m using p=P. The fea... |
github | SenticNet/one-class-svm-master | volsphere.m | .m | one-class-svm-master/dd_tools/volsphere.m | 849 | utf_8 | 818df4ec9ea705c0ead045d71cd249f9 | %VOLSPHERE Compute the volume of a hypersphere
%
% V = VOLSPHERE(D,R,TAKELOG)
%
% INPUT
% D Dimensionality
% R Radius (default = 1)
% TAKELOG Flag indicating the use of log(volume) (default = 0)
%
% OUTPUT
% V Volume of the hypersphere
%
% DESCRIPTION
% Compute the volume of a hypersp... |
github | SenticNet/one-class-svm-master | roc_hull.m | .m | one-class-svm-master/dd_tools/roc_hull.m | 1,213 | utf_8 | 1a84902d93b3f416f8b4b8bf5d1b5767 | %ROC_HULL Convex hull of an ROC curve
%
% OUT = ROC_HULL(R)
%
% INPUT
% R ROC curve
%
% OUTPUT
% OUT ROC curve
%
% DESCRIPTION
% Computes the convex hull of ROC curve R. It just returns the relevant
% operating points on the hull, and the rest is removed.
%
% SEE ALSO
% dd_roc, dd_costc
% Copyright: D.... |
github | SenticNet/one-class-svm-master | kwhiten.m | .m | one-class-svm-master/dd_tools/kwhiten.m | 3,496 | utf_8 | c6c536b063853fcb6dc531e97043798e | %KWHITEN Whiten the data in kernel space.
%
% W = KWHITEN(A,DIM,KTYPE,KPAR,REG)
% W = A*KWHITEN([],DIM,KTYPE,KPAR,REG)
% W = A*KWHITEN(DIM,KTYPE,KPAR,REG)
%
% INPUT
% A Dataset
% DIM Dimensionality, or fraction of explained variance
% (default = 0.95)
% KTYPE Kernel ty... |
github | SenticNet/one-class-svm-master | mog_P.m | .m | one-class-svm-master/dd_tools/mog_P.m | 1,828 | utf_8 | 559ac935947e3cb0511f0a2b3445fbf1 | %MOG_P Compute the probability density of a Mixture of Gaussians
%
% P = MOG_P(X,COVTYPE,MEANS,INVCOVS,PRIORS)
%
% INPUT
% X Data matrix
% COVTYPE Type of covariance matrix used
% MEANS Means of the MoG
% INVCOVS (Inverse of) covariance matrices of MoG
% PRIORS Cluster priors
%
% OUTPUT
% ... |
github | SenticNet/one-class-svm-master | getfeattype.m | .m | one-class-svm-master/dd_tools/getfeattype.m | 1,324 | utf_8 | 1647e87126d0a0064a156fb92bd141e2 | %GETFEATTYPE Return the feature type (cont. or nominal)
%
% [TYPE,RANGE] = GETFEATTYPE(X)
%
% INPUT
% X Prtools dataset
%
% OUTPUT
% TYPE Binary vector indicating continuous or nominal
% RANGE Range of the feature values
%
% DESCRIPTION
% Get the feature types (continuous or nominal, value 0 or 1
% res... |
github | SenticNet/one-class-svm-master | gendatkriegel.m | .m | one-class-svm-master/dd_tools/gendatkriegel.m | 1,038 | utf_8 | 552f801fbb568172cf8f7a4866828a43 | %GENDATKRIEGEL
%
% X = GENDATKRIEGEL(N,DIM,K)
%
% INPUT
% N Number of target and outlier objects (default = [500 500])
% DIM Number of features (default = 25)
% K Number of clusters (default = 5)
%
% OUTPUT
% X Dataset
%
% DESCRIPTION
% Generate target data from a 5-cluster Mixture of... |
github | SenticNet/one-class-svm-master | stump_dd.m | .m | one-class-svm-master/dd_tools/stump_dd.m | 2,565 | utf_8 | c3e53cb4fe912ca2b1b307740dfadd4a | %STUMP_DD Threshold one dim. one-class classifier
%
% W = STUMP_DD(A,FRACREJ,DIM)
%
% INPUT
% A One-class dataset
% FRACREJ Error on the target class (default = 0.1)
% DIM Feature number (default = 1)
%
% OUTPUT
% W Decision stump
%
% DESCRIPTION
% Put a threshold on one of the f... |
github | SenticNet/one-class-svm-master | lociplot.m | .m | one-class-svm-master/dd_tools/lociplot.m | 933 | utf_8 | 707dd26fba64261c5e106904a46ddb5c | %LOCIPLOT Local Correlation Integral plot
%
% W = LOCIPLOT(W)
%
% Plots a LOCI plot of LOCI mapping W.
% The algorithm is taken from:
%
% Papadimitriou, S. and Kitagawa, H. and Gibbons, P.B. and Faloutsos, C.,
% "LOCI: fast outlier detection using the local correlation integral", in
% Proceedings of the 19th Inter... |
github | SenticNet/one-class-svm-master | gendatouts.m | .m | one-class-svm-master/dd_tools/gendatouts.m | 2,409 | utf_8 | 947770d243433dc2c6f910979e1fe875 | %GENDATOUTS Generate uniform outliers in a subspace
%
% Z = GENDATOUTS(X,N,DIM,DR)
% Z = X*GENDATOUTS([],N,DIM,DR)
% Z = X*GENDATOUTS(N,DIM,DR)
% Z = GENDATOUTS(X,N,FRAC,DR)
% Z = X*GENDATOUTS([],N,FRAC,DR)
% Z = X*GENDATOUTS(N,FRAC,DR)
%
% INPUT
% X One-clas... |
github | SenticNet/one-class-svm-master | getoclab.m | .m | one-class-svm-master/dd_tools/getoclab.m | 649 | utf_8 | 3141e18bbeb875489f418f14c4ec3b65 | %GETOCLAB Get numeric labels from an OC set
%
% LAB = GETOCLAB(X)
%
% INPUT
% X One-class dataset
%
% OUTPUT
% LAB Numeric labels, +1/-1
%
% DESCRIPTION
% Returns numeric labels of the objects X according to:
% 'target' : +1
% 'outlier' : -1
% If X is not an OC-set, an error is generated.
%
% SEE ALS... |
github | SenticNet/one-class-svm-master | som_dd.m | .m | one-class-svm-master/dd_tools/som_dd.m | 2,561 | utf_8 | eeb5a30a52669553fb6735046895966f | %SOM_DD Self-Organizing Map data description
%
% W = SOM_DD(X,FRACREJ,K,NRRUNS,ETA,H)
% W = X*SOM_DD([],FRACREJ,K,NRRUNS,ETA,H)
% W = X*SOM_DD(FRACREJ,K,NRRUNS,ETA,H)
%
% INPUT
% X One-class dataset
% FRACREJ Error on the target class (default = 0.1)
% K ... |
github | SenticNet/one-class-svm-master | rocsqueeze.m | .m | one-class-svm-master/dd_tools/rocsqueeze.m | 803 | utf_8 | c5975c670b8e5852e3c25132b98f71d9 | %ROCSQUEEZE Remove redundant points in a ROC curve
%
% S = ROCSQUEEZE(R)
%
% INPUT
% R ROC curve obtained from DD_ROC
%
% OUTPUT
% S Reduced ROC curve
%
% DESCRIPTION
% Reduce the number of points in a ROC curve by removing identical
% points.
%
% SEE ALSO
% dd_roc, plotcosts, simpleroc
% Copyright: ... |
github | SenticNet/one-class-svm-master | nndist.m | .m | one-class-svm-master/dd_tools/nndist.m | 1,138 | utf_8 | 12788c9ed8bbeb50f875b2048ca1438f | %NNDIST (Average) nearest neighbor distance
%
% D = NNDIST(A,K)
% D = NNDIST(A,K,N)
%
% INPUT
% A Dataset
% K Number of neighbors (default = 5)
% N Number of subsampled objects (default = 500)
%
% OUTPUT
% D Averaged k-nearest neighbor distance
%
% DESCRIPTION
% Compute the averaged K-... |
github | SenticNet/one-class-svm-master | svdd_optrbf.m | .m | one-class-svm-master/dd_tools/svdd_optrbf.m | 2,752 | utf_8 | c2430c1ba5a476b9b9200abf0b07c404 | %SVDD_OPTRBF Quadratic optimizer for the SVDD
%
% [ALF,R2,DX,I] = SVDD_OPTRBF(SIGMA,X,LABX,C)
%
% INPUT
% SIGMA Width parameter in RBF kernel
% X Data matrix
% LABX Labels +-1
% C Tradeoff parameter
%
% OUTPUT
% ALF Optimal Lagrange multipliers
% R2 Squared radius
%... |
github | SenticNet/one-class-svm-master | knn_optk.m | .m | one-class-svm-master/dd_tools/knn_optk.m | 1,256 | utf_8 | 7301a08e500f2dab8f121f5970f5b840 | %KNN_OPTK Optimization of k for the knndd
%
% K = KNN_OPTK(D,DIM)
%
% INPUT
% D Distance matrix
% DIM Dimensionality of the feature space
%
% OUTPUT
% K Optimal number of neighbors
%
% DESCRIPTION
% Optimize the K for the knndd using leave-one-out density estimation on
% the data. D is the distance m... |
github | SenticNet/one-class-svm-master | makegriddat.m | .m | one-class-svm-master/dd_tools/makegriddat.m | 1,594 | utf_8 | 74a9e7e2ff0bae474dce8036f9d6dbd5 | %MAKEGRIDDAT Make uniform 2D grid.
%
% [GRIDDAT,X,Y] = MAKEGRIDDAT(MINX,MAXX,MINY,MAXY,NRSTEPX,NRSTEPY)
%
% INPUT
% MINX,MAXX Minimum and maximum value for X
% MINY,MAXY Minimum and maximum value for Y
% NRSTEPX,
% NRSTEPY Number of steps in X and Y
%
% OUTPUT
% GRIDDAT Data matrix
% X ... |
github | SenticNet/one-class-svm-master | checkprversion.m | .m | one-class-svm-master/dd_tools/checkprversion.m | 970 | utf_8 | 8d1ac855b6804a89967185cae1ea037b | %
% OUT = CHECKPRVERSION
%
% Check the version of Prtools, and see if it is good enough for
% dd_tools. If you pass the test, OUT=1, otherwise OUT=0.
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands
function out = checkprve... |
github | SenticNet/one-class-svm-master | gendatgrid.m | .m | one-class-svm-master/dd_tools/gendatgrid.m | 1,910 | utf_8 | f38df7a2e41c88b93d73c81d60eed71f | % GENDATGRID make grid dataset around a 2D dataset
%
% GRIDDAT = GENDATGRID(A,NRSTEPS)
% GRIDDAT = GENDATGRID([],NRSTEPS,MINVAL,MAXVAL);
% GRIDDAT = GENDATGRID;
%
% INPUT
% A One-class dataset
% NRSTEPS Size of the grid (default = [gridsize gridsize])
% MINVAL Vector with minimum... |
github | SenticNet/one-class-svm-master | isocc.m | .m | one-class-svm-master/dd_tools/isocc.m | 515 | utf_8 | 0af43c0cbeed9988f0b35e299ce6ab0c | %IS_OCC Test for one-class classifiers
%
% N = ISOCC(W)
%
% INPUT
% W Classifier
%
% OUTPUT
% N 0/1 if W isn't/is a one-class classifier
%
% DESCRIPTION
% This is exactly the same as IS_OCC, but I made this because I always
% forget if there is an understore or not...
%
% SEE ALSO
% is_occ
... |
github | SenticNet/one-class-svm-master | multic.m | .m | one-class-svm-master/dd_tools/multic.m | 5,793 | utf_8 | b90f327e8cb7eef919c4560dd250d7d1 | %MULTIC Make a multi-class classifier
%
% W = MULTIC(A,V)
% W = MULTIC(A,{V1 V2 ... VK})
% W = MULTIC(A,V,V_ADD)
%
% INPUT
% A Dataset
% V,V1,... Untrained one-class classifier
% V_ADD Untrained one-class classifier
%
% OUTPUT
% W Multi-class classifier
%
% DESCRIPTION
% Train the (unt... |
github | SenticNet/one-class-svm-master | createA.m | .m | one-class-svm-master/dd_tools/createA.m | 5,314 | utf_8 | f7dd1489d959694c402349e814739cc5 | %CREATEA Auxiliary function for auclpm
%
% [A,Nxi,A2] = CREATEA(X,Y,RTYPE,PAR,SEED)
%
% Create the data matrix containing all pairwise difference vectors in
% data matrix X (with their corresponding labels Y, -1/+1).
% Because the size of this data matrix can become huge (ALL pairwise
% difference vectors is a lot!),... |
github | SenticNet/one-class-svm-master | mog_init.m | .m | one-class-svm-master/dd_tools/mog_init.m | 4,357 | utf_8 | 2313f7b99b2c22cab3b276a7a1d2d9f5 | %MOG_INIT Initialize a MoG
%
% [MEANS,INVCOVS,PRIORS] = MOG_INIT(X,K,COVTYPE)
% [MEANS,INVCOVS,PRIORS] = MOG_INIT(X,K,CTYPE,DATASIGMA)
%
% INPUT
% X One-class dataset
% K Number of clusters
% COVTYPE Covariance type (see below)
% DATASIGMA Covariance matrix of background
% OUTPUT... |
github | SenticNet/one-class-svm-master | mahaldist.m | .m | one-class-svm-master/dd_tools/mahaldist.m | 1,379 | utf_8 | 8e7dc844ff62dc14a1d873de17859c53 | %MAHALDIST Mahalanobis distance
%
% Y = MAHALDIST(X,MU,SIGMA,LAMBDA)
%
% INPUT
% X Data matrix
% MU Mean vector (default = 0)
% SIGMA Covariance matrix (default = 1)
% LAMBDA Regularization (default = [])
%
% OUTPUT
% Y Mahalanobis distance
%
% DESCRIPTION
% For dataset X, the Maha... |
github | SenticNet/one-class-svm-master | dd_roc.m | .m | one-class-svm-master/dd_tools/dd_roc.m | 4,856 | utf_8 | 700843666241b31d0e28af944efc337f | %DD_ROC Receiver Operating Characteristic curve
%
% E = DD_ROC(A,W)
% E = DD_ROC(A*W)
% E = A*W*DD_ROC
%
% INPUT
% A One-class dataset
% W One-class classifier
%
% OUTPUT
% E ROC curve
%
% DESCRIPTION
% Find for a (data description) method W the Receiver Operating
% Characteristi... |
github | SenticNet/one-class-svm-master | locidd.m | .m | one-class-svm-master/dd_tools/locidd.m | 12,436 | utf_8 | fd09bfe5b721d8758a78f5cd283a44ed | %LOCIDD Local Correlation Integral data description
%
% W = LOCIDD(A,FRACREJ,ALPHA,THR,MIN_N)
% W = A*LOCIDD([],FRACREJ,ALPHA,THR,MIN_N)
% W = A*LOCIDD(FRACREJ,ALPHA,THR,MIN_N)
%
% INPUT
% A Dataset
% FRACREJ Error on the target class (default = 0.1)
% ALPHA ... (default = 0.5)
% THR F... |
github | SenticNet/one-class-svm-master | relabel.m | .m | one-class-svm-master/dd_tools/relabel.m | 1,521 | utf_8 | 0dcd9c247f35a0beceb659407a14a592 | %RELABEL Relabel classes in a dataset
%
% B = RELABEL(A,NEWLAB,SORT)
%
% INPUT
% A Dataset
% NEWLAB New label list
% SORT Flag indicating if classes should be sorted
%
% OUTPUT
% B Dataset
%
% DESCRIPTION
% Rename the labels in the labellist of dataset A to NEWLAB. Of course,
% the le... |
github | SenticNet/one-class-svm-master | ocmcc.m | .m | one-class-svm-master/dd_tools/ocmcc.m | 2,901 | utf_8 | 5b7b49a972b95bbfb01960cebb995b2b | %OCMCC One-class and multi-class class sequential classifier
%
% V = OCMCC(A,WOCC,W)
% V = A*OCMCC([],WOCC,W)
% V = A*OCMCC(WOCC,W)
%
% INPUT
% A Multi-class dataset
% WOCC Untrained one-class classifier (default = gauss_dd)
% W Untrained multi-class classifier (default = ldc)
%
% OUTPUT
% V ... |
github | SenticNet/one-class-svm-master | inc_store.m | .m | one-class-svm-master/dd_tools/inc_store.m | 647 | utf_8 | 6c7a84dce93ddfbd1df7fa4b5e845287 | %INC_STORE Pack the results of INC_ADD in a mapping
%
% V = INC_STORE(W)
%
% INPUT
% W Support vector structure
%
% OUTPUT
% V PRtools mapping
%
% DESCRIPTION
% Store the data structure W obtained from inc_add into a Prtools
% mapping V.
function w = inc_store(W)
setSV = [W.setS; W.setE];
dat.ktype = W.... |
github | SenticNet/one-class-svm-master | mogEMupdate.m | .m | one-class-svm-master/dd_tools/mogEMupdate.m | 4,048 | utf_8 | d7997dfffc392b8623fd5035ac5b9420 | %MOGEMUPDATE Apply EM to a MoG
%
% [MEANS,INVCOVS,PRIORS] = MOGEMUPDATE(X,COVTYPE,MEANS,INVCOVS,PRIORS,...
% NRITERS,FIXEDCL,REG)
%
% INPUT
% X Data matrix
% COVTYPE Type of covariance matrix used
% MEANS Means of the MoG
% INVCOVS (Inverse of) covariance matrices of M... |
github | SenticNet/one-class-svm-master | mykmeans.m | .m | one-class-svm-master/dd_tools/mykmeans.m | 1,309 | utf_8 | d002e1dded2d65097a36ad977389352b | %MYKMEANS K-means clustering
%
% [LABS,MEANS] = MYKMEANS(X,K)
%
% INPUT
% X Data matrix
% K Number of clusters
% TOL Error tolerance (default = 1e-5)
%
% OUTPUT
% LABS Cluster label for each object in X
% MEANS Cluster means
%
% DESCRIPTION
% Very light-weight implementation of the K... |
github | SenticNet/one-class-svm-master | ksvdd.m | .m | one-class-svm-master/dd_tools/ksvdd.m | 7,786 | utf_8 | 750af149ea0033544514fe28cd52dba0 | %KSVDD Support Vector Data Description on general kernel matrix
%
% W = KSVDD(X,FRACERR,WK)
% W = X*KSVDD([],FRACERR,WK)
% W = KSVDD(K,FRACERR)
% W = K*KSVDD(FRACERR)
% W = X*WK*KSVDD(FRACERR)
%
% INPUT
% X Dataset
% FRACREJ Error on the target class (default = 0.1)
% WK ... |
github | SenticNet/one-class-svm-master | gower.m | .m | one-class-svm-master/dd_tools/gower.m | 2,169 | utf_8 | 6664c70638e5a09f0cbe19ee82544f1e | %GOWER Gower dissimilarity
%
% S = GOWER(X,Y,FEATTYPE,FEATRANGE)
%
% INPUT
% X D-dimensional feature vector
% Y D-dimensional feature vector
% FEATTYPE Indicator for nominal feature
% FEATRANGE Min and max value per feature
%
% OUTPUT
% S Gower similarity
%
% DESCRIPTION
% Com... |
github | SenticNet/one-class-svm-master | scale_range.m | .m | one-class-svm-master/dd_tools/scale_range.m | 1,519 | utf_8 | 7d6fa185b40ae738b68ba4038ced8a01 | %SCALE_RANGE Give a vector of scales
%
% SIG = SCALE_RANGE(X,NR,NMAX)
%
% INPUT
% X Data matrix or dataset
% NR Number of scales (default = 20)
% NMAX Number of (random) points to consider (default = 500)
%
% OUTPUT
% SIG Vector of scale values
%
% DESCRIPTION
% Give a reasonable range of scal... |
github | SenticNet/one-class-svm-master | mcd_gauss_dd.m | .m | one-class-svm-master/dd_tools/mcd_gauss_dd.m | 2,216 | utf_8 | 5c3cd5e6bbbeb42417985a3ca0a6b1d2 | %MCD_GAUSS_DD Minimum Covariance Determinant Robust Gaussian data description.
%
% W = MCD_GAUSS_DD(A,FRACREJ)
% W = A*MCD_GAUSS_DD([],FRACREJ)
% W = A*MCD_GAUSS_DD(FRACREJ)
%
% INPUT
% A Dataset
% FRACREJ Error on target class (default = 0.1)
%
% OUTPUT
% W Minimum covariance de... |
github | SenticNet/one-class-svm-master | sqeucldistm.m | .m | one-class-svm-master/dd_tools/sqeucldistm.m | 817 | utf_8 | 1db300eb5ab5d8017e2642b3cb84e75a | %SQEUCLDISTM Square Euclidean distance matrix
%
% D = SQEUCLDISTM(A,B)
%
% INPUT
% A,B Data matrices
%
% OUTPUT
% D Distance matrix
%
% DESCRIPTION
% A specialized function for computing the squared Euclidean distance D
% between datasets A and B. This is mainly for computational speed, so
% it is ligh... |
github | SenticNet/one-class-svm-master | incsvc.m | .m | one-class-svm-master/dd_tools/incsvc.m | 2,786 | utf_8 | 9db3ba2e782a25638f761f5b57fcf821 | %INCSVC Incremental support vector classifier
%
% W = INCSVC(A,KTYPE,KPAR,C)
% W = A*INCSVC([],KTYPE,KPAR,C)
% W = A*INCSVC(KTYPE,KPAR,C)
%
% INPUT
% A Dataset
% KTYPE Kernel type (default = 'p')
% KPAR Kernel parameter (default = 1)
% C Tradeoff parameter (default = 1)
%
% OUTPUT
%... |
github | SenticNet/one-class-svm-master | mst_dd.m | .m | one-class-svm-master/dd_tools/mst_dd.m | 4,848 | utf_8 | 2be61bdaf19191e2dcafddbee42670b7 | %MST_DD Minimum Spanning Tree Data Description.
%
% [W,TREE,A] = MST_DD(A,FRACREJ,N)
%
% INPUT
% A one-class dataset
% FRACREJ fraction rejection [0,1]; (default 0.1)
% N complexity parameter equals a number of
% paths of max length; (default 0, entire mst)
%
% OUTPUT
% W ... |
github | SenticNet/one-class-svm-master | optim_auc.m | .m | one-class-svm-master/dd_tools/optim_auc.m | 4,327 | utf_8 | e9662794746f9f7d6cc98721e011346c | %OPTIM_AUC Optimize hyperparameters for an OCC
%
% W = OPTIM_AUC(X,WNAME,FRACREJ,RANGE,NRFOLDS,VARARGIN)
% W = X*OPTIM_AUC([],WNAME,FRACREJ,RANGE,NRFOLDS,VARARGIN)
% W = X*OPTIM_AUC(WNAME,FRACREJ,RANGE,NRFOLDS,VARARGIN)
%
% INPUT
% X One-class dataset
% WNAME Classifier name (string) (default =... |
github | SenticNet/one-class-svm-master | oc_set.m | .m | one-class-svm-master/dd_tools/oc_set.m | 6,001 | utf_8 | 6daaede2ca669f2dd9c20d7fc02e5366 | % OC_SET makes an one-class dataset
%
% [B,I] = OC_SET(A,CLNR)
% [B,I] = OC_SET(A,LABEL)
%
% INPUT
% A Dataset
% CLNR Class number
% LABEL Class label
%
% OUTPUT
% B One-class dataset
% I Index vector for target or outlier
%
% DESCRIPTION
% Change a normal dataset A into an ... |
github | SenticNet/one-class-svm-master | is_ocset.m | .m | one-class-svm-master/dd_tools/is_ocset.m | 971 | utf_8 | 6fcb3a4398a80b2ab0a01bff794cdfc6 | %IS_OCSET True for one-class datasets
%
% N = IS_OCSET(A)
%
% INPUT
% A Dataset
%
% OUTPUT
% N 0/1 if A isn't/is a one-class dataset
%
% DESCRIPTION
% IS_OCSET(A) returns true if the dataset a is a one-class dataset,
% containing only classes 'target' and/or 'outlier'.
%
% SEE ALSO
% is... |
github | SenticNet/one-class-svm-master | is_occ.m | .m | one-class-svm-master/dd_tools/is_occ.m | 1,444 | utf_8 | 7ff4b4674436a956f3e1d02d455cb722 | %IS_OCC Test for one-class classifiers
%
% N = IS_OCC(W)
%
% INPUT
% W Classifier
%
% OUTPUT
% N 0/1 if W isn't/is a one-class classifier
%
% DESCRIPTION
% IS_OCC(W) returns true if the classifier W is a one-class classifier,
% outputting only classes 'target' and/or 'outlier' and having a
% s... |
github | SenticNet/one-class-svm-master | plotw.m | .m | one-class-svm-master/dd_tools/plotw.m | 1,410 | utf_8 | 2765e3e62e546794907eb4b4336ee784 | %PLOTW Plot the classifier w.
%
% H = PLOTW(W,NRC)
%
% INPUT
% W Trained classifier
% NRC Number of contour levels
%
% OUTPUT
% H Figure handle
%
% DESCRIPTION
% Plot the (real-valued) output of classifier W in the current figure.
% The resulting contour plot has a color depending on the value of the... |
github | SenticNet/one-class-svm-master | plot_mst.m | .m | one-class-svm-master/dd_tools/plot_mst.m | 1,171 | utf_8 | 0e389f5c0898d9e98fb2b8e3c58cfbe0 | %PLOT_MST Plot minimum spanning tree
%
% PLOT_MST(A,TREE,STR,LWIDTH)
%
% INPUT
% A dataset
% TREE list of edges
% STR color (default = 'k')
% LWIDTH linewidth (default = 1)
%
% DESCRIPTION
% Plots the edges of a minimum spanning tree, defined by the nodes A and
% TREE. The tree will be plo... |
github | SenticNet/one-class-svm-master | inc_setup.m | .m | one-class-svm-master/dd_tools/inc_setup.m | 2,777 | utf_8 | 15a62b1e4fb4e7ea19d1276565d38a13 | %INC_SETUP Startup incremental optimization
%
% W = INC_SETUP(ITYPE,KTYPE,KPAR,C,X,Y)
%
% INPUT
% ITYPE Type of model
% KTYPE Kernel type
% KPAR Kernel parameter
% C Tradeoff parameter
% X Data matrix
% Y Labels
%
% OUTPUT
% W Support vector structure
%
% DES... |
github | SenticNet/one-class-svm-master | roc2prc.m | .m | one-class-svm-master/dd_tools/roc2prc.m | 1,199 | utf_8 | 2f79198df128e79de50b4bf5941280d4 | %ROC2PRC Conversion ROC to precision-recall graph
%
% P = ROC2PRC(R,N)
%
% INPUT
% R ROC curve
% N Number of objects in each class
%
% OUTPUT
% P Precision-recall graph
%
% DESCRIPTION
% Convert ROC curve R into a Precision-Recall graph P.
% This is only possible when you supply the number of positiv... |
github | SenticNet/one-class-svm-master | dist2dens.m | .m | one-class-svm-master/dd_tools/dist2dens.m | 626 | utf_8 | 4d778e3417a6de1563b1c882609ba664 | %DENS_EST map a distance to a posterior probability
%
% OUT = DIST2DENS(IN,SIGM)
%
% INPUT
% IN Matrix or dataset
% SIGM Scaling factor (default = mean(IN))
%
% OUTPUT
% OUT Matrix or dataset
%
% DESCRIPTION
% Map the output of a reconstruction method to a posterior
% probability:
% ou... |
github | SenticNet/one-class-svm-master | dissim.m | .m | one-class-svm-master/dd_tools/dissim.m | 2,424 | utf_8 | d34131b6ad57f321ff4ddba3465491d4 | %DISSIM Dissimilarity transformations
%
% B = DISSIM(A,TTYPE,PAR)
% W = DISSIM([],TTYPE,PAR)
%
% INPUT
% A Dataset
% TTYPE Dissimilarity type (default = 'd2s')
% PAR Additional parameters for dissimilarity (default = 1)
%
% OUTPUT
% B Dissimilarity dataset
% W Dissimilarity mappi... |
github | SenticNet/one-class-svm-master | getrocw.m | .m | one-class-svm-master/dd_tools/getrocw.m | 657 | utf_8 | 9b1167c5719470685e42d053b0c3fd17 | %GETROCW Retrieve mapping from an ROC plot
%
% W = GETROCW(H)
%
% INPUT
% H Figure handle
%
% OUTPUT
% W Trained mapping
%
% DESCRIPTION
% Retrieve the mapping that was changed using PLOTROC from the figure.
% The figure handle H should be supplied.
%
% SEE ALSO
% dd_roc, plotroc, dd_setfn
function ... |
github | SenticNet/one-class-svm-master | dlpdd.m | .m | one-class-svm-master/dd_tools/dlpdd.m | 4,624 | utf_8 | c8cadba10c75fa6e1cf6a44f3b551d6b | %DLPDD Distance Linear Programming Data Description
%
% W = DLPDD(D,NU)
%
% INPUT
% D Dissimilarity matrix
% NU Error on the target class (default = 0.1)
%
% OUTPUT
% W Distance Linear Programming data description
%
% DESCRIPTION
% This one-class classifier works directly on the distance (dissimilar... |
github | SenticNet/one-class-svm-master | pd_check.m | .m | one-class-svm-master/dd_tools/pd_check.m | 707 | utf_8 | ff78cfb49ccde45afea5d634450cc379 | %PD_CHECK Check if the matrix is positive (semi-) definite
%
% POSDEF = PD_CHECK(A)
%
% Check for a symmetric matrix A if it is positive definite.
% POSDEF = 1 if A is safely pos.def, i.e. each diagonal element is
% > tol in the Chol.factorization.
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delf... |
github | SenticNet/one-class-svm-master | simpleroc.m | .m | one-class-svm-master/dd_tools/simpleroc.m | 2,572 | utf_8 | b9f166dc2463b0d0a7a9aa36f32170c4 | %SIMPLEROC Basic receiver-operating characteristic curve
%
% F = SIMPLEROC(PRED,TRUELAB)
%
% INPUT
% PRED Prediction of a classifier
% TRUELAB True labels
%
% OUTPUT
% F ROC graph
%
% DESCRIPTION
% Compute the ROC curve for the network output PRED, given the true
% labels TRUELAB. TRUELAB shou... |
github | SenticNet/one-class-svm-master | dd_auc.m | .m | one-class-svm-master/dd_tools/dd_auc.m | 4,245 | utf_8 | f45be52eaed02b172e0318b0d4020f72 | % DD_AUC integrated error under the ROC curve
%
% PERF = DD_AUC(R,BND)
% PERF = DD_AUC(A*W,BND)
% PERF = A*W*DD_AUC([],BND)
% PERF = A*W*DD_AUC(BND)
%
% INPUT
% R ROC curve (obtained from DD_ROC)
% BND lower and upper bound for integration (default = [0 1])
% A One-class dataset
% W On... |
github | SenticNet/one-class-svm-master | mpm_dd.m | .m | one-class-svm-master/dd_tools/mpm_dd.m | 3,501 | utf_8 | 1acc7bb7b48c105bf5b59683501a145a | %MPM_DD Minimax prob. machine.
%
% W = MPM_DD(X,FRACREJ,SIGMA,LAMBDA,NU,RHO)
% W = X*MPM_DD([],FRACREJ,SIGMA,LAMBDA,NU,RHO)
% W = X*MPM_DD(FRACREJ,SIGMA,LAMBDA,NU,RHO)
%
% INPUT
% X One-class dataset
% FRACREJ Error on the target class (default = 0.1)
% SIGMA Width param. in the RB... |
github | SenticNet/one-class-svm-master | plotcostc.m | .m | one-class-svm-master/dd_tools/plotcostc.m | 2,176 | utf_8 | a22eaf841c5f8dcd1d9408e2c30582d3 | %PLOTCOSTC Draw the cost curve
%
% H = PLOTCOSTC(W,A)
% H = PLOTCOSTC(E)
%
% INPUT
% W One-class classifier
% A Dataset
% E Cost curve
%
% OUTPUT
% H Handle to figure
%
% DESCRIPTION
% Plot the cost curve of E.
%
% SEE ALSO
% dd_costc, dd_roc, plotroc
% Copyright: D.M.J. Tax, ... |
github | SenticNet/one-class-svm-master | plotg.m | .m | one-class-svm-master/dd_tools/plotg.m | 1,609 | utf_8 | b715317cf09b4855506530c08daf22a0 | %PLOTG Plot the function values z on a 2D grid
%
% H = PLOTG(GRID,Z,CLRS)
%
% INPUT
% GRID Dataset with grid points
% Z Value per grid point
% CLRS Number of colors to use (default = 10)
%
% OUTPUT
% H Handle to figure
%
% DESCRIPTION
% Plot the function values given in Z on the 2D grid. Th... |
github | SenticNet/one-class-svm-master | inc_remove.m | .m | one-class-svm-master/dd_tools/inc_remove.m | 10,270 | utf_8 | cfb12558bf7b263820a167dc7af26957 | %INC_REMOVE Remove an object from the incsvdd
%
% W = INC_REMOVE(W,N)
%
% INPUT
% W Support vector structure
% N Object index
%
% OUTPUT
% W Support vector structure
%
% DESCRIPTION
% Remove object number N from structure W (see inc_startup). N should be
% the index of the object defined in the da... |
github | SenticNet/one-class-svm-master | randsph.m | .m | one-class-svm-master/dd_tools/randsph.m | 931 | utf_8 | fd9d2096423264ad206bef1edd613e09 | %RANDSPH generate objects in hypersphere
%
% X = RANDSPH(N,D)
%
% INPUT
% N Number of objects
% D Dimensionality
%
% OUTPUT
% X Data matrix
%
% DESCRIPTION
% Generate N data objects uniformly drawn from a D-dimensional hypersphere
% with zero mean and unit radius.
%
% SEE ALSO
% ge... |
github | SenticNet/one-class-svm-master | gendatoutg.m | .m | one-class-svm-master/dd_tools/gendatoutg.m | 1,576 | utf_8 | 9f3635dd5f21fe766430a6e90ec8fd30 | %GENDATOUTG Generate Gaussian distr. outlier objects
%
% Z = GENDATOUTG(A,N,SCALE)
% Z = A*GENDATOUTG([],N,SCALE)
% Z = A*GENDATOUTG(N,SCALE)
%
% INPUT
% A One-class dataset
% N Number of objects (default = 100)
% SCALE Scaling factor of covariance matrix (default = 1.5)
%
% OUTPUT... |
github | SenticNet/one-class-svm-master | svddpath.m | .m | one-class-svm-master/dd_tools/svddpath.m | 3,103 | utf_8 | 3abd585996eca6986630940f69f55b07 | %SVDDPATH SVDD for different lambda/C
%
% W = SVDDPATH(A,FRACREJ,KTYPE,KPAR,UB)
%
% INPUT
% A One-class dataset
% FRACREJ Error on the target class
% KTYPE Kernel type
% KPAR Kernel parameter
% UB Upper bound on each individual object
%
% OUTPUT
% W SVDD
%
... |
github | SenticNet/one-class-svm-master | gendatout.m | .m | one-class-svm-master/dd_tools/gendatout.m | 2,638 | utf_8 | 81008ebf7d02ceb652b02b81f6ec2af4 | %GENDATOUT Generate outlier objects
%
% [Z,R] = GENDATOUT(A,N,DR,KEEPDATA)
% [Z,R] = A*GENDATOUT([],N,DR,KEEPDATA)
% [Z,R] = A*GENDATOUT(N,DR,KEEPDATA)
%
% INPUT
% A One-class dataset
% N Number of objects (default = 100)
% DR Factor rescaling of sphere radius (default = 1... |
github | SenticNet/one-class-svm-master | change_R.m | .m | one-class-svm-master/dd_tools/change_R.m | 1,737 | utf_8 | 838a5f9a5aee57b86526d623fa9cdf00 | %CHANGE_R Auxiliary function for incSVDD
%
% R = CHANGE_R(R,C,BETA,GAMMAC)
%
% Auxiliary function for the incremental SVDD. For more info, see
% INCSVDD.
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands
function R = chang... |
github | SenticNet/one-class-svm-master | nndd.m | .m | one-class-svm-master/dd_tools/nndd.m | 2,140 | utf_8 | 742e50de879f5dab04670ddad1fec94f | %NNDD Nearest neighbour data description
%
% W = NNDD(A,FRACREJ)
% W = A*NNDD([],FRACREJ)
% W = A*NNDD(FRACREJ)
%
% INPUT
% A One-class dataset
% FRACREJ Error on the target class (default = 0.1)
%
% OUTPUT
% W Nearest neighbor description
%
% DESCRIPTION
% Calculates the Nea... |
github | SenticNet/one-class-svm-master | askerplot.m | .m | one-class-svm-master/dd_tools/askerplot.m | 2,116 | utf_8 | 5c20ba2cb0c98f4d743cbe742334269e | %ASKERPLOT Plot FP and FN
%
% ASKERPLOT(E)
% ASKERPLOT(W,A)
%
% INPUT
% E ROC curve obtained from E = A*W*DD_ROC
% W Trained one-class classifier
% A Dataset
%
% DESCRIPTION
% Plot the false positive and false negative rate as function of the
% thresholds on the output of the classifier W. Inpu... |
github | SenticNet/one-class-svm-master | fastmcd.m | .m | one-class-svm-master/dd_tools/fastmcd.m | 66,673 | utf_8 | b5dee7eeb237192d0675a754a6b8cf30 | function [res,raw]=fastmcd(data,options);
% version 22/12/2000, revised 19/01/2001, new reweighted correction factors and old cutoff 9/07/2001
%
% FASTMCD computes the MCD estimator of a multivariate data set. This
% estimator is given by the subset of h observations with smallest covariance
% determinant. T... |
github | SenticNet/one-class-svm-master | gendatblockout.m | .m | one-class-svm-master/dd_tools/gendatblockout.m | 3,148 | utf_8 | 81fbd87a6468dba8f18bdbebc558c18c | % GENDATBLOCKOUT Generate data is a block
%
% [B,BLCK] = GENDATBLOCKOUT(A,N,SCALE)
% [B,BLCK] = A*GENDATBLOCKOUT([],N,SCALE)
% [B,BLCK] = A*GENDATBLOCKOUT(N,SCALE)
% B = GENDATBLOCKOUT(A,N,BLCK)
% B = A*GENDATBLOCKOUT([],N,BLCK)
% B = A*GENDATBLOCKOUT(N,BLCK)
%
% INPUT
% A One-class dataset
% N ... |
github | SenticNet/one-class-svm-master | target_class.m | .m | one-class-svm-master/dd_tools/target_class.m | 1,673 | utf_8 | c2b42480b238643bbe3ce8732c81cd51 | % TARGET_CLASS extracts the target class from an one-class dataset
%
% [B,C] = TARGET_CLASS(A,CLNR)
%
% INPUT
% A One-class dataset
% CLNR Class number or class label (default = 'target')
%
% OUTPUT
% B Dataset with only target class
% C Dataset with remaining objects
%
% DESCRIPTION
% Extr... |
github | marcobrianti1989/Forni_Replication-master | myols.m | .m | Forni_Replication-master/myols.m | 1,040 | utf_8 | 4c8ffbb72234f239aa6c9666c1e91733 | % A=myols(y,x), where y is a vector, x is a matrix, performs ols
% estimates of the regression of y on the columns of x.
% A is a 2 x (k+1) matrix, where k is the number of
% columns of x, having the parameter estimates on the first
% line and the standard errors on the second.
% In the last column, the first ele... |
github | marcobrianti1989/Forni_Replication-master | VAR_str.m | .m | Forni_Replication-master/VAR_str.m | 400 | utf_8 | d3821d07b014b152913068a2692a5c03 | %Creates matrices for VAR(k)
function [yy,x] = VAR_str(y,c,k)
s=size(y);
T=s(1); N=s(2);
for i=1:N,
yy(:,i)=y(k+1:T,i);
for j=1:k,
xx(:,k*(i-1)+j)=y(k+1-j:T-j,i);
end; end;
if c==0,xx=xx;
elseif c==1,xx=[ones(T-k,1) xx];
elseif c==2,xx=[ones(T-k,1) (1:T-k)' xx];
end
z(:,1)=xx(:,1);
for ij = 1:k
zz(:,(ij-1)*N+1:N*ij... |
github | marcobrianti1989/Forni_Replication-master | invertepolynomialmatrix.m | .m | Forni_Replication-master/invertepolynomialmatrix.m | 561 | utf_8 | 5feaa1c6eb97bdeab7ba961b923d8ff4 | % inversion of a matrix of polynomials in the lag operator
%
function inverse = invertepolynomialmatrix(poly,nlags)
n = size(poly,1);
k = size(poly,3) - 1;
polyzero = poly(:,:,1);
invpolyzero =inv(polyzero);
for s = 1:k+1,
newpoly(:,:,s) = invpolyzero*poly(:,:,s);
end;
polynomialmatrix = - newpoly(:,:,2:k+1);
A = ze... |
github | marcobrianti1989/Forni_Replication-master | principalcomponents.m | .m | Forni_Replication-master/principalcomponents.m | 294 | utf_8 | 233c1eb61849f76a64d9a11aa079cbf4 | %
% pc = principalcomponents(x , npc) computes the first npc ordinary principal
% components of x, a matrix having series on the
% columns.
%
function [pc,R,D,chi] = principalcomponents(x , npc)
S = cov(x);
opts.disp = 0;
[ R, D ] = eigs(S,npc,'LM',opts);
pc = x*R;
chi = x*R*R';
end |
github | marcobrianti1989/Forni_Replication-master | myvar.m | .m | Forni_Replication-master/myvar.m | 503 | utf_8 | 21d6e374c8b7d571309c6066e11e6ee7 | % [reg,u]=myvar(y,k,c)
% var multivariato con k lags;
% identificazione Wold; reg=parametri con st.err.; u=residui.
% c=0: ne' costante ne' trend; c=1: costante; c=2: costante e trend.
function [reg,u]=myvar(y,k,c);
if nargin==2, c=1; end
s=size(y);
T=s(1); N=s(2);
for i=1:N,
yy(:,i)=y(k+1:T,i);
for j=1:k,
xx(:,k*(i-1)... |
github | marcobrianti1989/Forni_Replication-master | FAVARRaw.m | .m | Forni_Replication-master/FAVARRaw.m | 322 | utf_8 | f98f46f680a22fd4a06153c2f0899f18 | %
function [B, chi, rsh] = FAVARRaw(X, Z, k, h)
N = size(X, 2);
T = size(X, 1);
W = [ones(T,1) Z];
AA = (W'*W)\W'*X;
chi = W*AA;
A = AA(2:end,:);
[BB, epsilon, coeff] = woldimpulse(Z, k, h + 1);
Sigma = cov(epsilon);
C = chol(Sigma)';
for lag = 1 : h + 1
B(:, :, lag) = A'*BB(:, :, lag)*C;
end
rsh = epsilon/C';
e... |
github | marcobrianti1989/Forni_Replication-master | FAVARCholBoot.m | .m | Forni_Replication-master/FAVARCholBoot.m | 479 | utf_8 | 531931b6291ed20b95502ac953990135 | %
%
%
%
function B = FAVARCholBoot(Data, Z,variables,k,h,nrepli)
[T N] = size(Data);
r = size(Z, 2);
B = zeros( N, r, h + 1,nrepli);
[VarPa C X u] = VarParameters(Z,k,1);
W = [ones(T,1) Z];
AA = inv(W'*W)*W'*Data;
chi = W*AA;
Idio = Data - chi;
for j=1:nrepli
Z_boot = GenerateNewSeries(VarPa,C,X,u,k);
W_boo... |
github | marcobrianti1989/Forni_Replication-master | companion.m | .m | Forni_Replication-master/companion.m | 431 | utf_8 | d624d9e0cc2728dbee6973cb528f79bd | % Construct the companion representation of a state space model
% with state vector theta p lags in the VAR representation and
% n variables and c=1 constant c=0 no constant.
function C = companion(theta,p,n,c)
if c == 1
np = (n*p+1);
elseif c == 0
np = (n*p);
end
theta = theta';
for i = 1:n
M(i,1:np) ... |
github | sxs4337/superframes-master | summe_scoreSuperframes.m | .m | superframes-master/superframes_v01/summe_scoreSuperframes.m | 3,067 | utf_8 | fd5174afa9f44b689595d2e4ad0290cb | function [ score,score_Add_left,score_Rem_left, score_Add_right,score_Rem_right ] = summe_scoreSuperframes( superFrames,movementScore,FPS, delta, Params )
%summe_scoreSuperframes function scoring boundary movements
nbOfSuperFrames=size(superFrames,1);
score=zeros(nbOfSuperFrames,1);
score_Add_left=zeros(nbO... |
github | sxs4337/superframes-master | summe_computeMotion.m | .m | superframes-master/superframes_v01/summe_computeMotion.m | 6,288 | utf_8 | d71e9950df159551a6e10fbb697ac515 | function [ motion_magnitude,motion_magnitude_back,Contrast,Saturation,Sharpness,FaceImpact ] = summe_computeMotion(imageList,frameRange,FPS,Params, Models, option )
%summe_computeMotion Computes the motion magnitude over a range of frames
fprintf('Compute forward motion\n');
frames=imageList(frameRange(... |
github | sxs4337/superframes-master | realtime_tracking.m | .m | superframes-master/FacialFeatureDetection&Tracking_v1.4/realtime_tracking.m | 3,891 | utf_8 | be912f74db0de836bd0b59eebffc62a0 | % Signature:
% realtime_tracking
%
% Usage:
% This function demonstrates how to use xx_track_detect in realtime demo.
% The image frame is captured from a camera.
%
% Params:
% cameraID - select which camera to use, default 0
%
% Return: None
%
% Author:
% Xuehan Xiong, xiong828@gmail.com
%
... |
github | sxs4337/superframes-master | detect_image.m | .m | superframes-master/FacialFeatureDetection&Tracking_v1.4/detect_image.m | 3,637 | utf_8 | 606ae460c534e575519535086a2f6aff | % Signature:
% detect_image(mode)
%
% Usage:
% This function demonstrates how to use xx_track_detect in detecting
% facial landmarks in one image. There are two modes for this function.
%
% For 'auto' mode, OpenCV face detector is used to find the largest face
% in the image and then perform face a... |
github | sxs4337/superframes-master | track_video.m | .m | superframes-master/FacialFeatureDetection&Tracking_v1.4/track_video.m | 4,495 | utf_8 | f2e63b7e710a084c221947ab5a30370b | % Signature:
% track_video(input)
%
% Usage:
% This function demonstrates how to use xx_track_detect in tracking a
% video. The code looks lengthy but the actual tracking part contains
% only 2 lines [32,85]. All other lines are related to displaying
% the output.
%
% For some video formats, OpenCV Video... |
github | sxs4337/superframes-master | xx_initialize.m | .m | superframes-master/FacialFeatureDetection&Tracking_v1.4/xx_initialize.m | 1,744 | utf_8 | 014615a4c59682e6173048de848b5af1 | % Signature:
% xx_initialize
%
% Dependence:
% OpenCV2.4 above, mexopencv
% mexopencv can be downloaded here:
% http://www.cs.stonybrook.edu/~kyamagu/mexopencv/
%
% You do not need the above two packages unless you want to build OpenCV
% on yourself or re-compile mexopencv. All DLLs and mex functions are
%... |
github | mortezamg63/Adaptive-Median-Filter-master | Adaptive_Median_filter.m | .m | Adaptive-Median-Filter-master/Adaptive_Median_filter.m | 3,126 | utf_8 | 4ea83f95f5788c93ad77d037b49828a8 | function AdaptiveFilter(image,MaxSizeFilter)
% AdaptiveFilter(image,MaxSizeFilter)
% remove noise by changing the size of filter
% image : tasvir noisy
% MaxSizeFilter : maximum size of filter
%
% AdaptiveFilter start from 3*3 filter
% ... |
github | ferlandlab/BranchAnalysis2D-3D-master | Miji.m | .m | BranchAnalysis2D-3D-master/Fiji.app/scripts/Miji.m | 3,279 | utf_8 | 2b8c27c0db167729fb70300f2500d7bc | function [mij] = Miji(open_imagej)
%% This script sets up the classpath to Fiji and optionally starts MIJ
% Author: Jacques Pecreaux, Johannes Schindelin, Jean-Yves Tinevez
% GNU Octave compatibility added by Eric Barnhill, Jul 2016
if nargin < 1
open_imagej = true;
end
%% Get the... |
github | ferlandlab/BranchAnalysis2D-3D-master | bfopen.m | .m | BranchAnalysis2D-3D-master/Fiji.app/scripts/bfopen.m | 10,040 | utf_8 | 083c9e818055469f652e7e3a05858669 | function [result] = bfopen(id)
% A script for opening microscopy images in MATLAB using Bio-Formats.
%
% The function returns a list of image series; i.e., a cell array of cell
% arrays of (matrix, label) pairs, with each matrix representing a single
% image plane, and each inner list of matrices representing an image
... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | tgear.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/tools/F16 Model/F16Sim V1 FG/Used Functions/tgear.m | 535 | utf_8 | f0c3d6ed53bf5e044ed13e3251d92c3b | %=====================================================
% tgear.m
%
% Author : Ying Huo
%
% power command vs. thtl. relationship used
% in F-16 model ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | trimfun.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/tools/F16 Model/F16Sim V1 FG/Used Functions/trimfun.m | 4,041 | utf_8 | 908902ca2678a4efb48b714eddeca553 | %=====================================================
% F16 nonlinear model trim cost function
% for longitudinal motion, steady level flight
% (cost = sum of weighted squared state derivatives)
%
% Author: T. Keviczky
% Date: April 29, 2002
%
% Added addtional functionality.
% This trim function ca... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | tgear.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/tools/F16 Model/F16Sim V1 Joystick/Used Functions/tgear.m | 535 | utf_8 | f0c3d6ed53bf5e044ed13e3251d92c3b | %=====================================================
% tgear.m
%
% Author : Ying Huo
%
% power command vs. thtl. relationship used
% in F-16 model ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | trimfun.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/tools/F16 Model/F16Sim V1 Joystick/Used Functions/trimfun.m | 4,041 | utf_8 | 908902ca2678a4efb48b714eddeca553 | %=====================================================
% F16 nonlinear model trim cost function
% for longitudinal motion, steady level flight
% (cost = sum of weighted squared state derivatives)
%
% Author: T. Keviczky
% Date: April 29, 2002
%
% Added addtional functionality.
% This trim function ca... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Control Optimo/LQR/Comparacion Planta Lineal/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
github | DavidTorresOcana/Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master | setup_hover_configuration.m | .m | Adaptive_and_Fault_Tolerant_Flight_Control_Systems-master/docs/Control Theory/Control Optimo/LQR/Comparacion Planta NO lineal/setup_hover_configuration.m | 1,251 | utf_8 | 64adcf1fe19761bf7637c5f4ced7cb21 | % SETUP_HOVER_CONFIGURATION
%
% SETUP_HOVER_CONFIGURATION sets and returns the model model parameters
% of the Quanser 3 DOF Hover plant.
%
%
% Copyright (C) 2010 Quanser Consulting Inc.
% Quanser Consulting Inc.
%
%
function [ Ktn, Ktc, Kf, l, Jy, Jp, Jr, g ] = setup_hover_configuration( )
%
% Gravitational Constant ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.