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 | epfl-lasa/ML_toolbox-master | ml_plot_cv_grid_states_regression.m | .m | ML_toolbox-master/functions/plot_functions/states_plot/ml_plot_cv_grid_states_regression.m | 9,171 | utf_8 | 82270b0e949e690b5f7979b911d97107 | function [ handle,handle_test,handle_train] = ml_plot_cv_grid_states_regression(stats,parameterse,options)
%ML_PLOT_CV_GRID_STATES_REGRESSION Plots the results of grid search
% K-fold Cross Validation on regression functions
%
% input -----------------------------------------------------------------
%
% o stat... |
github | epfl-lasa/ML_toolbox-master | ml_plot_class_boundary.m | .m | ML_toolbox-master/functions/plot_functions/classification_plot/ml_plot_class_boundary.m | 7,031 | utf_8 | 55d4726131a4f06c46b4142f8f566a32 | function handle = ml_plot_class_boundary(X,options)
%ML_PLOT_DECISION_BOUNDARY Plot the boundary of the classes
%
%
% input -----------------------------------------------------------------
%
% o X : (N x D), original data
%
% o options : structure
%
% options.method_name = 'kme... |
github | epfl-lasa/ML_toolbox-master | ml_plot_class_boundary_2.m | .m | ML_toolbox-master/functions/plot_functions/classification_plot/ml_plot_class_boundary_2.m | 1,504 | utf_8 | d1240690c1c6a4ea2cc7b27cf9868af4 | function handle = ml_plot_class_boundary_2(X,f,options)
%ML_PLOT_DECISION_BOUNDARY Plot the boundary of the classes
%
%
% input -----------------------------------------------------------------
%
% o X : (N x D), original data
%
% o f : function handle, classifier, f.
% ... |
github | epfl-lasa/ML_toolbox-master | kmeansRnd.m | .m | ML_toolbox-master/methods/clustering/knkmeans/kmeansRnd.m | 1,283 | utf_8 | df83cc894a37e52f6cb37f07e148bd15 | function [X, z, mu] = kmeansRnd(d, k, n)
% Generate samples from a Gaussian mixture distribution with common variances (kmeans model).
% Input:
% d: dimension of data
% k: number of components
% n: number of data
% Output:
% X: d x n data matrix
% z: 1 x n response variable
% mu: d x k centers of c... |
github | epfl-lasa/ML_toolbox-master | ssign.m | .m | ML_toolbox-master/methods/ensemble/boosting_toolbox/boosting_demo/ssign.m | 323 | utf_8 | cbf6fcfec139ae2802d76261c3d0e0e8 | %Does a few useful mappings:
%ssign(true) = 1
%ssign(false) = -1
%ssign(-0.1) = -1
%ssign(0.1) = 1
%ssign(0) = -1
%So map from logical to polar {0, 1} -> {-1, 1}
%Or use as a sign function with an arbitrary sign at 0: ssign(x) (- {-1, 1}
%instead of ssign(x) (- {-1, 0, 1}
function y = ssign(x)
y = ((x > 0) * 2) - 1;
... |
github | epfl-lasa/ML_toolbox-master | matlab2tikzInputParser.m | .m | ML_toolbox-master/methods/regression/gp/sgp/matlab2tikzInputParser.m | 5,646 | utf_8 | a414b30c3c96ca056ab74b7336906a31 | % =========================================================================
function parser = matlab2tikzInputParser ()
% Initialize the structure.
parser = struct ();
% Public Properties
parser.Results = {};
% Enabel/disable parameters case sensitivity.
parser.CaseSensitive = false;
% Enable/disable erro... |
github | epfl-lasa/ML_toolbox-master | matlab2tikz.m | .m | ML_toolbox-master/methods/regression/gp/sgp/matlab2tikz.m | 202,167 | utf_8 | 6c558d11b306ca01c9fb258609955ecd | function matlab2tikz( varargin )
%MATLAB2TIKZ Save figure in native LaTeX (TikZ/Pgfplots).
% MATLAB2TIKZ() saves the current figure as LaTeX file.
% MATLAB2TIKZ comes with several options that can be combined at will.
%
% MATLAB2TIKZ(FILENAME,...) or MATLAB2TIKZ('filename',FILENAME,...)
% stores the LaTeX co... |
github | epfl-lasa/ML_toolbox-master | lwr.m | .m | ML_toolbox-master/methods/regression/lwr/vijakuma/lwr.m | 2,722 | utf_8 | 7ed6e9c59b7ed88b65e4a8cd09164c5f | % function [beta,yq,P,w,r2,dof] = lwr(X,Y,D,xq,ridgecoef,const)
%
% Locally Weighted Regression: The function performs locally
% weighted regression as explained in the reference below.
% Some simple statistical values are also computed on demand.
%
% Inputs: (pass [] to obtain default value)
%
% X - input data ma... |
github | epfl-lasa/ML_toolbox-master | lwpr.m | .m | ML_toolbox-master/methods/regression/lwpr/lwpr.m | 24,534 | utf_8 | a1bbebe91a1e4a1d30c712dba3345886 | function [varargout] = lwpr(action,varargin)
% lwpr implements the LWPR algorithm as suggested in
% Vijayakumar, S. & Schaal, S. (2003). Incremental Online Learning
% in High Dimensions. submitted.
% Depending on the keyword in the input argument "action", a certain
% number of inputs arguments will be parsed from "var... |
github | epfl-lasa/ML_toolbox-master | jdqr.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/jdqr.m | 73,068 | utf_8 | b45810ddb5b2767c9289909175d1dc04 | function varargout=jdqr(varargin)
%JDQR computes a partial Schur decomposition of a square matrix or operator.
% Lambda = JDQR(A) returns the absolute largest eigenvalues in a K vector
% Lambda. Here K=min(5,N) (unless K has been specified), where N=size(A,1).
% JDQR(A) (without output argument) displays the K eige... |
github | epfl-lasa/ML_toolbox-master | lmnn.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/lmnn.m | 5,421 | utf_8 | 8d5b80dee8cf8730a96c0c415c5876fc | function [M, L, Y, C] = lmnn(X, labels)
%LMNN Learns a metric using large-margin nearest neighbor metric learning
%
% [M, L, Y, C] = lmnn(X, labels)
%
% The function uses large-margin nearest neighbor (LMNN) metric learning to
% learn a metric on the data set specified by the NxD matrix X and the
% corresponding Nx1 ... |
github | epfl-lasa/ML_toolbox-master | d2p.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/d2p.m | 3,487 | utf_8 | 0c7024a8039ea16b937d283585883fc3 | function [P, beta] = d2p(D, u, tol)
%D2P Identifies appropriate sigma's to get kk NNs up to some tolerance
%
% [P, beta] = d2p(D, kk, tol)
%
% Identifies the required precision (= 1 / variance^2) to obtain a Gaussian
% kernel with a certain uncertainty for every datapoint. The desired
% uncertainty can be specified... |
github | epfl-lasa/ML_toolbox-master | cg_update.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/cg_update.m | 3,715 | utf_8 | 1556078ae7c31950ec738949384cf180 | % Version 1.000
%
% Code provided by Ruslan Salakhutdinov and Geoff Hinton
%
% Permission is granted for anyone to copy, use, modify, or distribute this
% program and accompanying programs and documents for any purpose, provided
% this copyright notice is retained and prominently displayed, along with
% a note saying t... |
github | epfl-lasa/ML_toolbox-master | lmvu.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/lmvu.m | 8,540 | utf_8 | c8003ed7ff0fd0e226776c42c72ad385 | function [mappedX, mapping] = lmvu(X, no_dims, K, LL)
%LMVU Performs Landmark MVU on dataset X
%
% [mappedX, mapping] = lmvu(X, no_dims, k1, k2)
%
% The function performs Landmark MVU on the DxN dataset X. The value of k1
% represents the number of nearest neighbors that is employed in the MVU
% constraints. The val... |
github | epfl-lasa/ML_toolbox-master | cca.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/cca.m | 14,846 | utf_8 | 935e971ffe825a64e0eb80c535d71ebb | function [Z, ccaEigen, ccaDetails] = cca(X, Y, EDGES, OPTS)
%
% Function [Z, CCAEIGEN, CCADETAILS] = CCA(X, Y, EDGES, OPTS) computes a low
% dimensional embedding Z in R^d that maximally preserves angles among input
% data X that lives in R^D, with the algorithm Conformal Component Analysis.
%
% The embedding Z is co... |
github | epfl-lasa/ML_toolbox-master | x2p.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/x2p.m | 3,597 | utf_8 | 4a102e94922f4af38e36c374dccbc5a2 | function [P, beta] = x2p(X, u, tol)
%X2P Identifies appropriate sigma's to get kk NNs up to some tolerance
%
% [P, beta] = x2p(xx, kk, tol)
%
% Identifies the required precision (= 1 / variance^2) to obtain a Gaussian
% kernel with a certain uncertainty for every datapoint. The desired
% uncertainty can be specifie... |
github | epfl-lasa/ML_toolbox-master | sammon.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/sammon.m | 7,108 | utf_8 | 8a1fccbea9525bbebae4039127005ea6 | function [y, E] = sammon(x, n, opts)
%SAMMON Performs Sammon's MDS mapping on dataset X
%
% Y = SAMMON(X) applies Sammon's nonlinear mapping procedure on
% multivariate data X, where each row represents a pattern and each column
% represents a feature. On completion, Y contains the corresponding
% co-ordin... |
github | epfl-lasa/ML_toolbox-master | sdecca2.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/sdecca2.m | 7,185 | utf_8 | e53979561adda6a23883da0e72af5bf6 | function [P, newY, L, newV, idx]= sdecca2(Y, snn, regularizer, relative)
% doing semidefinitve embedding/MVU with output being parameterized by graph
% laplacian's eigenfunctions..
%
% the algorithm is same as conformal component analysis except that the scaling
% factor there is set as 1
%
%
% function [P, newY, Y] ... |
github | epfl-lasa/ML_toolbox-master | sparse_nn.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/sparse_nn.m | 972 | utf_8 | df5da172f954ec2f53125a04787cf2d3 | %SPARSE_NN
%
% This file is part of the Matlab Toolbox for Dimensionality Reduction.
% The toolbox can be obtained from http://homepage.tudelft.nl/19j49
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of ... |
github | epfl-lasa/ML_toolbox-master | jdqz.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/techniques/jdqz.m | 78,986 | utf_8 | be67a038982588a6ac9cbc2d36f009e8 | function varargout=jdqz(varargin)
%JDQZ computes a partial generalized Schur decomposition (or QZ
% decomposition) of a pair of square matrices or operators.
%
% LAMBDA=JDQZ(A,B) and JDQZ(A,B) return K eigenvalues of the matrix pair
% (A,B), where K=min(5,N) and N=size(A,1) if K has not been specified.
%
% [X,J... |
github | epfl-lasa/ML_toolbox-master | lnst.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/lnst.m | 891 | utf_8 | 93ca6136f90181897631256d58517558 | % This file is part of the Matlab Toolbox for Dimensionality Reduction v0.7.2b.
% The toolbox can be obtained from http://homepage.tudelft.nl/19j49
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of th... |
github | epfl-lasa/ML_toolbox-master | scatter12n.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/scatter12n.m | 1,348 | utf_8 | 65c091a54cbbe59f0a7ddef27fcc2c3f | % This file is part of the Matlab Toolbox for Dimensionality Reduction v0.7.2b.
% The toolbox can be obtained from http://homepage.tudelft.nl/19j49
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of th... |
github | epfl-lasa/ML_toolbox-master | not_calculated.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/not_calculated.m | 7,818 | utf_8 | 07c7ebdd2ecb821df6d1b4ccd5f47662 | function varargout = not_calculated(varargin)
% NOT_CALCULATED M-file for not_calculated.fig
% NOT_CALCULATED by itself, creates a new NOT_CALCULATED or raises the
% existing singleton*.
%
% H = NOT_CALCULATED returns the handle to a new NOT_CALCULATED or the handle to
% the existing singleton... |
github | epfl-lasa/ML_toolbox-master | choose_method.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/choose_method.m | 5,483 | utf_8 | 7fcb2ff0eb7f662fc75d652d9c440d65 | function varargout = choose_method(varargin)
% CHOOSE_METHOD M-file for choose_method.fig
% CHOOSE_METHOD, by itself, creates a new CHOOSE_METHOD or raises the existing
% singleton*.
%
% H = CHOOSE_METHOD returns the handle to a new CHOOSE_METHOD or the handle to
% the existing singleton*.
%
... |
github | epfl-lasa/ML_toolbox-master | load_data_1_var.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/load_data_1_var.m | 4,902 | utf_8 | 5b70e8dd70f9e4386ea769372ed55ffe | function varargout = load_data_1_var(varargin)
% LOAD_DATA_1_VAR M-file for load_data_1_var.fig
% LOAD_DATA_1_VAR, by itself, creates a new LOAD_DATA_1_VAR or raises the existing
% singleton*.
%
% H = LOAD_DATA_1_VAR returns the handle to a new LOAD_DATA_1_VAR or the handle to
% the existing s... |
github | epfl-lasa/ML_toolbox-master | plotn.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/plotn.m | 4,103 | utf_8 | e9c0840dca614923d10952e9b37f06c5 | % This file is part of the Matlab Toolbox for Dimensionality Reduction v0.7.2b.
% The toolbox can be obtained from http://homepage.tudelft.nl/19j49
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of th... |
github | epfl-lasa/ML_toolbox-master | scattern.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/scattern.m | 3,651 | utf_8 | bf506a19215a7e0b4cb62da12fa09d16 | % This file is part of the Matlab Toolbox for Dimensionality Reduction v0.7.2b.
% The toolbox can be obtained from http://homepage.tudelft.nl/19j49
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of th... |
github | epfl-lasa/ML_toolbox-master | no_history.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/no_history.m | 7,508 | utf_8 | d5c85b897eeca97b3e37ea41551de2b1 | function varargout = no_history(varargin)
% NO_HISTORY M-file for no_history.fig
% NO_HISTORY by itself, creates a new NO_HISTORY or raises the
% existing singleton*.
%
% H = NO_HISTORY returns the handle to a new NO_HISTORY or the handle to
% the existing singleton*.
%
% NO_HISTORY('CALLBACK',... |
github | epfl-lasa/ML_toolbox-master | load_data_vars.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/load_data_vars.m | 7,943 | utf_8 | 3e892de48b2b883da0e7121eb6b7cfbc | function varargout = load_data_vars(varargin)
% LOAD_DATA_VARS M-file for load_data_vars.fig
% LOAD_DATA_VARS, by itself, creates a new LOAD_DATA_VARS or raises the existing
% singleton*.
%
% H = LOAD_DATA_VARS returns the handle to a new LOAD_DATA_VARS or the handle to
% the existing singleto... |
github | epfl-lasa/ML_toolbox-master | mapping_parameters.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/mapping_parameters.m | 24,066 | utf_8 | ddb259e8821b5440a07fc05910595864 | function varargout = mapping_parameters(varargin)
% MAPPING_PARAMETERS M-file for mapping_parameters.fig
% MAPPING_PARAMETERS, by itself, creates a new MAPPING_PARAMETERS or raises the existing
% singleton*.
%
% H = MAPPING_PARAMETERS returns the handle to a new MAPPING_PARAMETERS or the handle to
... |
github | epfl-lasa/ML_toolbox-master | load_xls.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/load_xls.m | 4,845 | utf_8 | 98f040ec0685b024ddf99d454fea770d | function varargout = load_xls(varargin)
% LOAD_XLS M-file for load_xls.fig
% LOAD_XLS, by itself, creates a new LOAD_XLS or raises the existing
% singleton*.
%
% H = LOAD_XLS returns the handle to a new LOAD_XLS or the handle to
% the existing singleton*.
%
% LOAD_XLS('CALLBACK',hObject,eventDa... |
github | epfl-lasa/ML_toolbox-master | drtool.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/drtool.m | 53,877 | utf_8 | 25abf1c6522b90b00b1c29d7d4f4c091 | function varargout = drtool(varargin)
% DRTOOL M-file for drtool.fig
% DRTOOL, by itself, creates a new DRTOOL or raises the existing
% singleton*.
%
% H = DRTOOL returns the handle to a new DRTOOL or the handle to
% the existing singleton*.
%
% DRTOOL('CALLBACK',hObject,eventData,handl... |
github | epfl-lasa/ML_toolbox-master | plot12n.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/plot12n.m | 1,356 | utf_8 | 8a16c46e9b838f4602a5af8fc8a857a8 | % This file is part of the Matlab Toolbox for Dimensionality Reduction v0.7.2b.
% The toolbox can be obtained from http://homepage.tudelft.nl/19j49
% You are free to use, change, or redistribute this code in any way you
% want for non-commercial purposes. However, it is appreciated if you
% maintain the name of th... |
github | epfl-lasa/ML_toolbox-master | not_loaded.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/not_loaded.m | 7,728 | utf_8 | a754380baacab27eac13658ea4cc21a3 | function varargout = not_loaded(varargin)
% NOT_LOADED M-file for not_loaded.fig
% NOT_LOADED by itself, creates a new NOT_LOADED or raises the
% existing singleton*.
%
% H = NOT_LOADED returns the handle to a new NOT_LOADED or the handle to
% the existing singleton*.
%
% NOT_LOADED('CA... |
github | epfl-lasa/ML_toolbox-master | load_data.m | .m | ML_toolbox-master/methods/toolboxes/drtoolbox/gui/load_data.m | 6,534 | utf_8 | ade0538cbeeb79ed3c72aea5743a2424 | function varargout = load_data(varargin)
% LOAD_DATA M-file for load_data.fig
% LOAD_DATA, by itself, creates a new LOAD_DATA or raises the existing
% singleton*.
%
% H = LOAD_DATA returns the handle to a new LOAD_DATA or the handle to
% the existing singleton*.
%
% LOAD_DATA('CALLBACK'... |
github | epfl-lasa/ML_toolbox-master | make.m | .m | ML_toolbox-master/methods/toolboxes/libsvm/matlab/make.m | 1,285 | utf_8 | 753d6b2151254b94d9dfb09c21029037 | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if (exist ('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c
% This part is fo... |
github | epfl-lasa/ML_toolbox-master | likBeta.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likBeta.m | 4,830 | utf_8 | f017713f081b23ae468146232a0e8cf1 | function [varargout] = likBeta(link, hyp, y, mu, s2, inf, i)
% likBeta - Beta likelihood function for interval data y from [0,1].
% The expression for the likelihood is
% likBeta(f) = 1/Z * y^(mu*phi-1) * (1-y)^((1-mu)*phi-1) with
% mean=mu and variance=mu*(1-mu)/(1+phi) where mu = g(f) is the Beta intensity,
% f ... |
github | epfl-lasa/ML_toolbox-master | likT.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likT.m | 4,775 | utf_8 | d551e9ce7f259d8929a9a9d9f10f90b2 | function [varargout] = likT(hyp, y, mu, s2, inf, i)
% likT - Student's t likelihood function for regression.
% The expression for the likelihood is
% likT(t) = Z * ( 1 + (t-y)^2/(nu*sn^2) ).^(-(nu+1)/2),
% where Z = gamma((nu+1)/2) / (gamma(nu/2)*sqrt(nu*pi)*sn)
% and y is the mean (for nu>1) and nu*sn^2/(nu-2) is ... |
github | epfl-lasa/ML_toolbox-master | likLaplace.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likLaplace.m | 6,922 | iso_8859_13 | 7f5fd5418abdf573e28f68fff76fec84 | function [varargout] = likLaplace(hyp, y, mu, s2, inf, i)
% likLaplace - Laplacian likelihood function for regression.
% The expression for the likelihood is
% likLaplace(t) = exp(-|t-y|/b)/(2*b) with b = sn/sqrt(2),
% where y is the mean and sn^2 is the variance.
%
% The hyperparameters are:
%
% hyp = [ log(sn) ... |
github | epfl-lasa/ML_toolbox-master | likGaussWarp.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likGaussWarp.m | 9,109 | utf_8 | db71c7f4569eb37a505d530f36c01284 | function [varargout] = likGaussWarp(warp, hyp, y, mu, varargin)
% likGaussWarp - Warped Gaussian likelihood for regression.
% The expression for the likelihood is
% likGaussWarp( y | t ) = likGauss( g(y) | t ) * g'(y),
% where likGauss is the Gaussian likelihood and g is the warping function.
%
% The hyperparamete... |
github | epfl-lasa/ML_toolbox-master | likNegBinom.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likNegBinom.m | 4,709 | utf_8 | 0c9a80f26afbd6d14934d10c1592d19d | function [varargout] = likNegBinom(link, hyp, y, mu, s2, inf, i)
% likNegBinom - Negative binomial likelihood function for count data y.
% The expression for the likelihood is
% likNegBinom(f) = 1/Z * mu^y / (r+mu)^(r+y), Z = r^r*G(y+r)/(G(y+1)*G(r))
% with G(t)=gamma(t)=(t-1)!, mean=mu and variance=mu*(mu+r)/r, wh... |
github | epfl-lasa/ML_toolbox-master | likWeibull.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likWeibull.m | 4,548 | utf_8 | 7c08c821ff3a643993b664273410e13f | function [varargout] = likWeibull(link, hyp, y, mu, s2, inf, i)
% likWeibull - Weibull likelihood function for strictly positive data y. The
% expression for the likelihood is
% likWeibull(f) = g1*ka/mu * (g1*y/mu)^(ka-1) * exp(-(g1*y/mu)^ka) with
% gj = gamma(1+j/ka), mean=mu and variance=mu^2*(g2/g1^2-1) where mu... |
github | epfl-lasa/ML_toolbox-master | likGamma.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likGamma.m | 4,573 | utf_8 | c2695ecf87b97ec76b59b691427b4a2f | function [varargout] = likGamma(link, hyp, y, mu, s2, inf, i)
% likGamma - Gamma likelihood function for strictly positive data y. The
% expression for the likelihood is
% likGamma(f) = al^al*y^(al-1)/gamma(al) * exp(-y*al/mu) / mu^al with
% mean=mu and variance=mu^2/al where mu = g(f) is the Gamma intensity, f is... |
github | epfl-lasa/ML_toolbox-master | likInvGauss.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likInvGauss.m | 4,679 | utf_8 | 9ecb3222b78164d8b602356da3a48adc | function [varargout] = likInvGauss(link, hyp, y, mu, s2, inf, i)
% likInvGauss - Inverse Gaussian likelihood function for strictly positive data
% y. The expression for the likelihood is
% likInvGauss(f) = sqrt(lam/(2*pi*y^3))*exp(-lam*(mu-y)^2/(2*mu^2*y)) with
% mean=mu and variance=mu^3/lam where mu = g(f) is th... |
github | epfl-lasa/ML_toolbox-master | likPoisson.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likPoisson.m | 4,178 | utf_8 | 2d975f2bcb10e17f253ce4d36bd3ca78 | function [varargout] = likPoisson(link, hyp, y, mu, s2, inf, i)
% likPoisson - Poisson likelihood function for count data y. The expression for
% the likelihood is
% likPoisson(f) = mu^y * exp(-mu) / y! with mean=variance=mu
% where mu = g(f) is the Poisson intensity, f is a
% Gaussian process, y is the non-negativ... |
github | epfl-lasa/ML_toolbox-master | likLogistic.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likLogistic.m | 6,137 | utf_8 | 527e5959fbb8bae3f9980e898ada4956 | function [varargout] = likLogistic(hyp, y, mu, s2, inf, i)
% likLogistic - logistic function for binary classification or logit regression.
% The expression for the likelihood is
% likLogistic(t) = 1./(1+exp(-t)).
%
% Several modes are provided, for computing likelihoods, derivatives and moments
% respectively, see... |
github | epfl-lasa/ML_toolbox-master | likSech2.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likSech2.m | 8,514 | utf_8 | 669db149fc7157ab5834a447ecfdc501 | function [varargout] = likSech2(hyp, y, mu, s2, inf, i)
% likSech2 - sech-square likelihood function for regression. Often, the sech-
% square distribution is also referred to as the logistic distribution not to be
% confused with the logistic function for classification. The expression for the
% likelihood is
% li... |
github | epfl-lasa/ML_toolbox-master | likGumbel.m | .m | ML_toolbox-master/methods/toolboxes/gpml/lik/likGumbel.m | 3,976 | utf_8 | 3ac9c17ecc01a2a501fb5eb5bafeea6c | function [varargout] = likGumbel(sign, hyp, y, mu, s2, inf, i)
% likGumbel - Gumbel likelihood function for extremal value regression.
% The expression for the likelihood is
% likGumbel(t) = exp(-z-exp(-z))/be, z = ga+s*(y-t)/be, be = sn*sqrt(6)/pi
% where s={+1,-1} is a sign switching between left and right skewed... |
github | epfl-lasa/ML_toolbox-master | priorSmoothBox1.m | .m | ML_toolbox-master/methods/toolboxes/gpml/prior/priorSmoothBox1.m | 1,771 | utf_8 | 4fc9d6491b923568cc0b19a1894509a5 | function [lp,dlp] = priorSmoothBox1(a,b,eta,x)
% Univariate smoothed box prior distribution with linear decay in the log domain
% and infinite support over the whole real axis.
% Compute log-likelihood and its derivative or draw a random sample.
% The prior distribution is parameterized as:
%
% p(x) = 1/w*sigm... |
github | epfl-lasa/ML_toolbox-master | logphi.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/logphi.m | 2,261 | utf_8 | 69fbcfc9d9913da15644d5f0a0368d5f | % Safe computation of logphi(z) = log(normcdf(z)) and its derivatives
% dlogphi(z) = normpdf(x)/normcdf(x).
% The function is based on index 5725 in Hart et al. and gsl_sf_log_erfc_e.
%
% Copyright (c) by Carl Edward Rasmussen and Hannes Nickisch, 2013-11-13.
function [lp,dlp,d2lp,d3lp] = logphi(z)
... |
github | epfl-lasa/ML_toolbox-master | gauher.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/gauher.m | 2,245 | utf_8 | 441ef6c145fe66f1b7ca9da6207f6003 | % compute abscissas and weight factors for Gaussian-Hermite quadrature
%
% CALL: [x,w] = gauher(N)
%
% x = base points (abscissas)
% w = weight factors
% N = number of base points (abscissas) (integrates an up to (2N-1)th order
% polynomial exactly)
%
% p(x)=exp(-x^2/2)/sqrt(2*pi), a =-Inf, b = Inf
%
% Th... |
github | epfl-lasa/ML_toolbox-master | elsympol.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/elsympol.m | 699 | utf_8 | 33e751b982c07eb890d26629bf71f595 | % Evaluate the order R elementary symmetric polynomial Newton's identity aka
% the Newton–Girard formulae: http://en.wikipedia.org/wiki/Newton's_identities
%
% Copyright (c) by Carl Edward Rasmussen and Hannes Nickisch, 2010-01-10.
function E = elsympol(Z,R)
% evaluate 'power sums' of the individual terms in Z
sz = si... |
github | epfl-lasa/ML_toolbox-master | minimize.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/minimize.m | 11,191 | utf_8 | 69603a3c319cf5374483af20b033f10e | function [X, fX, i] = minimize(X, f, length, varargin)
% Minimize a differentiable multivariate function using conjugate gradients.
%
% Usage: [X, fX, i] = minimize(X, f, length, P1, P2, P3, ... )
%
% X initial guess; may be of any type, including struct and cell array
% f the name or pointer to the funct... |
github | epfl-lasa/ML_toolbox-master | minimize_v2.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/minimize_v2.m | 11,952 | utf_8 | d8aad9cf50639371a892fbcc202eed7c | % minimize.m - minimize a smooth differentiable multivariate function using
% LBFGS (Limited memory LBFGS) or CG (Conjugate Gradients)
% Usage: [X, fX, i] = minimize(X, F, p, other, ... )
% where
% X is an initial guess (any type: vector, matrix, cell array, struct)
% F is the objective function (function poi... |
github | epfl-lasa/ML_toolbox-master | sq_dist.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/sq_dist.m | 1,967 | utf_8 | 75b906d47729b33d7567f1353ced2f83 | % sq_dist - a function to compute a matrix of all pairwise squared distances
% between two sets of vectors, stored in the columns of the two matrices, a
% (of size D by n) and b (of size D by m). If only a single argument is given
% or the second matrix is empty, the missing matrix is taken to be identical
% to the fir... |
github | epfl-lasa/ML_toolbox-master | cov_deriv_sq_dist.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/cov_deriv_sq_dist.m | 1,906 | utf_8 | 625e697b220630f920d967bce06884e7 | % Compute derivative k'(x^p,x^q) of a stationary covariance k(d2) (ard or iso)
% w.r.t. to squared distance d2 = (x^p - x^q)'*inv(P)*(x^p - x^q) measure. Here
% P is either diagonal with ARD parameters ell_1^2,...,ell_D^2 where D is the
% dimension of the input space or ell^2 times the unit matrix for isotropic
% covar... |
github | epfl-lasa/ML_toolbox-master | unwrap.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/unwrap.m | 651 | utf_8 | 47d4deafec9cfdde0a4c291b3825c401 | % Extract the numerical values from "s" into the column vector "v". The
% variable "s" can be of any type, including struct and cell array.
% Non-numerical elements are ignored. See also the reverse rewrap.m.
function v = unwrap(s)
v = [];
if isnumeric(s)
v = s(:); % numeric values are re... |
github | epfl-lasa/ML_toolbox-master | glm_invlink_expexp.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/glm_invlink_expexp.m | 427 | utf_8 | 99a5cdb9880a947109671401c7398199 | % Compute the log intensity for the inverse link function g(f) = exp(-exp(-f)).
%
% The function is used in GLM likelihoods such as likPoisson, likGamma, likBeta
% and likInvGauss.
%
% Copyright (c) by Hannes Nickisch, 2013-10-16.
function [lg,dlg,d2lg,d3lg] = glm_invlink_expexp(f)
lg = -exp(-f);
if nargout>1
... |
github | epfl-lasa/ML_toolbox-master | glm_invlink_logistic.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/glm_invlink_logistic.m | 686 | utf_8 | b21f086f037b6560c290e0044e0beef5 | % Compute the log intensity for the inverse link function g(f) = log(1+exp(f))).
%
% The function is used in GLM likelihoods such as likPoisson, likGamma, likBeta
% and likInvGauss.
%
% Copyright (c) by Hannes Nickisch, 2013-10-16.
function [lg,dlg,d2lg,d3lg] = glm_invlink_logistic(f)
l1pef = max(0,f) + log(1+exp(-a... |
github | epfl-lasa/ML_toolbox-master | minimize_v1.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/minimize_v1.m | 11,202 | utf_8 | cd58ba0b83b1121423ed9a53b33562a1 | function [X, fX, i] = minimize_old(X, f, length, varargin)
% Minimize a differentiable multivariate function using conjugate gradients.
%
% Usage: [X, fX, i] = minimize(X, f, length, P1, P2, P3, ... )
%
% X initial guess; may be of any type, including struct and cell array
% f the name or pointer to the f... |
github | epfl-lasa/ML_toolbox-master | rewrap.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/rewrap.m | 1,014 | utf_8 | 64b6d7c0f51a8c77ddd012370a288b20 | % Map the numerical elements in the vector "v" onto the variables "s" which can
% be of any type. The number of numerical elements must match; on exit "v"
% should be empty. Non-numerical entries are just copied. See also unwrap.m.
function [s v] = rewrap(s, v)
if isnumeric(s)
if numel(v) < numel(s)
error('The ... |
github | epfl-lasa/ML_toolbox-master | solve_chol.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/solve_chol.m | 994 | utf_8 | f4d6cd4b9e7b0a955c2c8709a4894dd3 | % solve_chol - solve linear equations from the Cholesky factorization.
% Solve A*X = B for X, where A is square, symmetric, positive definite. The
% input to the function is R the Cholesky decomposition of A and the matrix B.
% Example: X = solve_chol(chol(A),B);
%
% NOTE: The program code is written in the C language ... |
github | epfl-lasa/ML_toolbox-master | glm_invlink_logit.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/glm_invlink_logit.m | 786 | utf_8 | b2fc9a03b835c7f6643f37b29eac8c0b | % Compute the log intensity for the inverse link function g(f) = 1/(1+exp(-f)).
%
% The function is used in GLM likelihoods such as likPoisson, likGamma, likBeta
% and likInvGauss.
%
% Copyright (c) by Hannes Nickisch, 2013-10-16.
function varargout = glm_invlink_logit(f)
varargout = cell(nargout, 1); % allocate th... |
github | epfl-lasa/ML_toolbox-master | minimize_lbfgsb_gradfun.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/minimize_lbfgsb_gradfun.m | 2,390 | utf_8 | 0eca58fc12d068780d735fd5a83ebdfa | function G = minimize_lbfgsb_gradfun(X,varargin)
% extract input arguments
varargin = varargin{1}; strctX = varargin{2}; f = varargin{1};
% global variables serve as communication interface between calls
global minimize_lbfgsb_iteration_number
global minimize_lbfgsb_objective
global minimize_lbfgsb_gradie... |
github | epfl-lasa/ML_toolbox-master | minimize_lbfgsb.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/minimize_lbfgsb.m | 4,476 | utf_8 | 10c2d1fef0bdc071cd35d3904c88f0ed | function [X, fX, i] = minimize_lbfgsb(X, f, length, varargin)
% Minimize a differentiable multivariate function using quasi Newton.
%
% Usage: [X, fX, i] = minimize_lbfgsb(X, f, length, P1, P2, P3, ... )
%
% X initial guess; may be of any type, including struct and cell array
% f the name or pointer to th... |
github | epfl-lasa/ML_toolbox-master | minimize_lbfgsb_objfun.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/minimize_lbfgsb_objfun.m | 2,695 | utf_8 | d9bbd3614b193a06603c12f33f877104 | function y = minimize_lbfgsb_objfun(X,varargin)
% extract input arguments
varargin = varargin{1}; strctX = varargin{2}; f = varargin{1};
% global variables serve as communication interface between calls
global minimize_lbfgsb_iteration_number
global minimize_lbfgsb_objective
global minimize_lbfgsb_gradien... |
github | epfl-lasa/ML_toolbox-master | logsumexp2.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/logsumexp2.m | 454 | utf_8 | aa7e4f12a67c8f2e12bc5d9113b9abd0 | % Compute y = log( sum(exp(x),2) ), the softmax in a numerically safe way by
% subtracting the row maximum to avoid cancelation after taking the exp
% the sum is done along the rows.
%
% Copyright (c) by Hannes Nickisch, 2013-10-16.
function [y,x] = logsumexp2(logx)
N = size(logx,2); max_logx = max(logx,[],2);
%... |
github | epfl-lasa/ML_toolbox-master | lik_epquad.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/lik_epquad.m | 1,622 | utf_8 | 9f92aef26b02e08fcee8f74617ebd05d | % Compute infEP part of a likelihood function based on the infLaplace part using
% Gaussian-Hermite quadrature.
%
% The function is used in GLM likelihoods such as likPoisson, likGamma, likBeta
% and likInvGauss.
%
% Copyright (c) by Hannes Nickisch, 2013-10-16.
function varargout = lik_epquad(lik,hyp,y,mu,s2)
n = m... |
github | epfl-lasa/ML_toolbox-master | glm_invlink_exp.m | .m | ML_toolbox-master/methods/toolboxes/gpml/util/glm_invlink_exp.m | 443 | utf_8 | af4bb74d42054f7b470ed8aecfcf4607 | % Compute the log intensity for the inverse link function g(f) = exp(f).
%
% The function is used in GLM likelihoods such as likPoisson, likGamma, likBeta
% and likInvGauss.
%
% Copyright (c) by Hannes Nickisch, 2013-10-16.
function [lg,dlg,d2lg,d3lg] = glm_invlink_exp(f)
lg = f;
if nargout>1
dlg = ones(size(f... |
github | epfl-lasa/ML_toolbox-master | covPeriodicNoDC.m | .m | ML_toolbox-master/methods/toolboxes/gpml/cov/covPeriodicNoDC.m | 3,630 | utf_8 | 32d02bd08932f22fe8302ce97b797d39 | function K = covPeriodicNoDC(hyp, x, z, i)
% Stationary covariance function for a smooth periodic function, with period p:
%
% k(x,x') = sf^2 * [k0(pi*(x-x')/p) - f(ell)] / [1 - f(ell)]
% with k0(t) = exp( -2*sin^2(t)/ell^2 ) and f(ell) = \int 0..pi k0(t) dt.
%
% The constant (DC component) has been removed and... |
github | epfl-lasa/ML_toolbox-master | covGrid.m | .m | ML_toolbox-master/methods/toolboxes/gpml/cov/covGrid.m | 10,069 | utf_8 | b869a274c1f4bc4a09e77a8424a1c57a | function [K,Mx,xe] = covGrid(cov, xg, hyp, x, z, i)
% covGrid - Kronecker covariance function based on a grid.
%
% The grid g is represented by its p axes xg = {x1,x2,..xp}. An axis xi is of
% size (ni,di) and the grid g has size (n1,n2,..,np,D), where D=d1+d2+..+dp.
% Hence, the grid contains N=n1*n2*..*np data point... |
github | epfl-lasa/ML_toolbox-master | covPERiso.m | .m | ML_toolbox-master/methods/toolboxes/gpml/cov/covPERiso.m | 3,145 | utf_8 | 7308c3f2001744df0d77cd5dc190c637 | function K = covPERiso(cov, hyp, x, z, i)
% Stationary periodic covariance function for an isotropic stationary covariance
% function k0 such as covMaterniso, covPPiso, covRQiso and covSEiso.
% Isotropic stationary means that the covariance function k0(x,z) depends on the
% data points x,z only through the squared dis... |
github | epfl-lasa/ML_toolbox-master | covADD.m | .m | ML_toolbox-master/methods/toolboxes/gpml/cov/covADD.m | 3,632 | utf_8 | 45875a6c0e52c3f98448f40f6b6fc599 | function K = covADD(cov, hyp, x, z, i)
% Additive covariance function using a 1d base covariance function
% cov(x^p,x^q;hyp) with individual hyperparameters hyp.
%
% k(x^p,x^q) = \sum_{r \in R} sf_r \sum_{|I|=r}
% \prod_{i \in I} cov(x^p_i,x^q_i;hyp_i)
%
% hyp = [ hyp_1
% hyp_2
% ...
... |
github | epfl-lasa/ML_toolbox-master | covPERard.m | .m | ML_toolbox-master/methods/toolboxes/gpml/cov/covPERard.m | 3,588 | utf_8 | 47dfb8b9857ef5e9bc3693bb6e5c0aa9 | function K = covPERard(cov, hyp, x, z, i)
% Stationary periodic covariance function for a stationary covariance function
% k0 such as covMaternard, covPPard, covRQard and covSEard.
% Stationary means that the covariance function k0(x,z) depends on the
% data points x,z only through the squared distance
% dxz = (x-z)'*... |
github | epfl-lasa/ML_toolbox-master | infMCMC.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infMCMC.m | 10,673 | utf_8 | 346201720f95a22a681c50bd2535b84c | function [post nlZ dnlZ] = infMCMC(hyp, mean, cov, lik, x, y, par)
% Markov Chain Monte Carlo (MCMC) sampling from posterior and
% Annealed Importance Sampling (AIS) for marginal likelihood estimation.
%
% The algorithms are not to be used as a black box, since the acceptance rate
% of the samplers need to be careful... |
github | epfl-lasa/ML_toolbox-master | infKL.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infKL.m | 10,289 | utf_8 | ee84ea1fcf907fdd2798ef8dbc3f756d | function [post nlZ dnlZ] = infKL(hyp, mean, cov, lik, x, y)
% Approximation to the posterior Gaussian Process by minimization of the
% KL-divergence. The function is structurally very similar to infEP; the
% only difference being the local divergence measure minimised.
% In infEP, one minimises KL(p,q) whereas in inf... |
github | epfl-lasa/ML_toolbox-master | infFITC_EP.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infFITC_EP.m | 12,117 | utf_8 | a2c1fccebe29502421d32ed7ab5fcd14 | function [post nlZ dnlZ] = infFITC_EP(hyp, mean, cov, lik, x, y)
% FITC-EP approximation to the posterior Gaussian process. The function is
% equivalent to infEP with the covariance function:
% Kt = Q + G; G = diag(g); g = diag(K-Q); Q = Ku'*inv(Kuu + snu2*eye(nu))*Ku;
% where Ku and Kuu are covariances w.r.t.... |
github | epfl-lasa/ML_toolbox-master | infFITC_Laplace.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infFITC_Laplace.m | 11,371 | utf_8 | 4e61736cbd55afa355817d83a67a5929 | function [post nlZ dnlZ] = infFITC_Laplace(hyp, mean, cov, lik, x, y)
% FITC-Laplace approximation to the posterior Gaussian process. The function is
% equivalent to infLaplace with the covariance function:
% Kt = Q + G; G = diag(g); g = diag(K-Q); Q = Ku'*inv(Kuu + snu2*eye(nu))*Ku;
% where Ku and Kuu are covarian... |
github | epfl-lasa/ML_toolbox-master | infGrid.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infGrid.m | 7,789 | utf_8 | c2914da2b9b077868f34920e50e778e7 | function [post nlZ dnlZ] = infGrid(hyp, mean, cov, lik, x, y, opt)
% Inference for a GP with Gaussian likelihood and covGrid covariance.
% The (Kronecker) covariance matrix used is given by:
% K = kron( kron(...,K{2}), K{1} ) = K_p x .. x K_2 x K_1.
%
% Compute a parametrization of the posterior, the negative log ma... |
github | epfl-lasa/ML_toolbox-master | infEP.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infEP.m | 6,048 | utf_8 | 3f4172f21efbd130a1740a8ea07848ae | function [post nlZ dnlZ] = infEP(hyp, mean, cov, lik, x, y)
% Expectation Propagation approximation to the posterior Gaussian Process.
% The function takes a specified covariance function (see covFunctions.m) and
% likelihood function (see likFunctions.m), and is designed to be used with
% gp.m. See also infMethods.m.... |
github | epfl-lasa/ML_toolbox-master | infVB.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infVB.m | 6,186 | utf_8 | 5a94d05020f0b3621de4ffc3561fb047 | function [post, nlZ, dnlZ] = infVB(hyp, mean, cov, lik, x, y, opt)
% Variational approximation to the posterior Gaussian process.
% The function takes a specified covariance function (see covFunctions.m) and
% likelihood function (see likFunctions.m), and is designed to be used with
% gp.m. See also infMethods.m.
%
% ... |
github | epfl-lasa/ML_toolbox-master | infLaplace.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infLaplace.m | 7,948 | utf_8 | f67d900c253de6908511e37d2c482c56 | function [post nlZ dnlZ] = infLaplace(hyp, mean, cov, lik, x, y, opt)
% Laplace approximation to the posterior Gaussian process.
% The function takes a specified covariance function (see covFunctions.m) and
% likelihood function (see likFunctions.m), and is designed to be used with
% gp.m. See also infMethods.m.
%
% C... |
github | epfl-lasa/ML_toolbox-master | infGrid_Laplace.m | .m | ML_toolbox-master/methods/toolboxes/gpml/inf/infGrid_Laplace.m | 13,627 | utf_8 | f3648192f78c2bc1e561e6fc692f2f3f | function [post nlZ dnlZ] = infGrid_Laplace(hyp, mean, cov, lik, x, y, opt)
% Laplace approximation to the posterior Gaussian process with covGrid
% covariance and (possibly) non-Gaussian likelihood.
% The (Kronecker) covariance matrix used is given by:
% K = kron( kron(...,K{2}), K{1} ) = K_p x .. x K_2 x K_1.
%
% T... |
github | epfl-lasa/ML_toolbox-master | patchline.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/GMMfunctions/Extra_functions/patchline.m | 3,812 | utf_8 | eb106a55c884f31c460bacfead7472aa | function p = patchline(xs,ys,varargin)
% Plot lines as patches (efficiently)
%
% SYNTAX:
% patchline(xs,ys)
% patchline(xs,ys,zs,...)
% patchline(xs,ys,zs,'PropertyName',propertyvalue,...)
% p = patchline(...)
%
% PROPERTIES:
% Accepts all parameter-values accepted by PATCH.
%
% DESCRI... |
github | epfl-lasa/ML_toolbox-master | rescale.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/GMMfunctions/Extra_functions/rescale.m | 151 | utf_8 | 4ea3615e62c350c9b3e1f4a6e91c8bd0 | % Rescale x to run from c to d when its values run from a to b:
function z = rescale(x,a,b,c,d)
z = -(-b*c + a*d)/(-a + b) + (-c + d)*x/(-a + b);
end
|
github | epfl-lasa/ML_toolbox-master | merge_gmm_components2.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/GMMfunctions/MergeGMMs/merge_gmm_components2.m | 2,756 | utf_8 | 512c7061be766429b072d6d6dcb1e78a | function [gmm] = merge_gmm_components2(gmm_model,X,threashold,options)
%MERGE_GMM_COMPONENTS
%
% input ------------------------------------------------------------
%
% o gmm_mode, struct
%
% o X: (N x D), Training data
%
% o threashold: (1 x 1) \in [0,1], distance threashold to consider
% ... |
github | epfl-lasa/ML_toolbox-master | plot_gmm_contour.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/GMMfunctions/plotGaussians/plot_gmm_contour.m | 1,577 | utf_8 | ccc5bf164769f8f9075ecba390afce70 | function handle = plot_gmm_contour(haxes,Priors,Mu,Sigma,color,STD,handle)
%PLOT_GMM_CONTOUR Summary of this function goes here
% Detailed explanation goes here
K = size(Priors,2);
if ~exist('STD','var'), STD=1;end
if ~exist('color','var'), color=repmat([0 0 1],K,1);end
if size(color,1) ~= K
color = repmat(colo... |
github | epfl-lasa/ML_toolbox-master | plot_gaussian_ellipsoid.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/GMMfunctions/plotGaussians/plot_gaussian_ellipsoid.m | 4,816 | utf_8 | 9f3605dd3cd604910f87962c0479b36d | function h = plot_gaussian_ellipsoid(m, C, sdwidth, npts, axh,alphaChannel,color)
% PLOT_GAUSSIAN_ELLIPSOIDS plots 2-d and 3-d Gaussian distributions
%
% H = PLOT_GAUSSIAN_ELLIPSOIDS(M, C) plots the distribution specified by
% mean M and covariance C. The distribution is plotted as an ellipse (in
% 2-d) or an ... |
github | epfl-lasa/ML_toolbox-master | draw_gmms.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/GMMfunctions/plotGaussians/plot_2d_gaussian/draw_gmms.m | 1,761 | utf_8 | 7ba6836243e42e55466c0ff9a3c13af8 | function [X,Y,I] = draw_gmms(GMMs,colormaps,x_range,y_range,spacing )
% DRAW_GMMS Draws the scales likelihood of a set of GMMs with different
% colormaps
%
% input ----------------------------------------------------------------
%
%
%
nbGMMs = size(GMMs,1);
disp(['number of GMMs: ' num2str(nbGMMs)]);
xs=lins... |
github | epfl-lasa/ML_toolbox-master | patchline.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/Extra_functions/patchline.m | 3,812 | utf_8 | eb106a55c884f31c460bacfead7472aa | function p = patchline(xs,ys,varargin)
% Plot lines as patches (efficiently)
%
% SYNTAX:
% patchline(xs,ys)
% patchline(xs,ys,zs,...)
% patchline(xs,ys,zs,'PropertyName',propertyvalue,...)
% p = patchline(...)
%
% PROPERTIES:
% Accepts all parameter-values accepted by PATCH.
%
% DESCRI... |
github | epfl-lasa/ML_toolbox-master | rescale.m | .m | ML_toolbox-master/methods/toolboxes/gmmbox/Extra_functions/rescale.m | 151 | utf_8 | 4ea3615e62c350c9b3e1f4a6e91c8bd0 | % Rescale x to run from c to d when its values run from a to b:
function z = rescale(x,a,b,c,d)
z = -(-b*c + a*d)/(-a + b) + (-c + d)*x/(-a + b);
end
|
github | epfl-lasa/ML_toolbox-master | km_fbkrls.m | .m | ML_toolbox-master/methods/toolboxes/kmbox/lib/km_fbkrls.m | 3,642 | utf_8 | abf2692a4719204fa7ae70bc3237bc01 | function out = km_fbkrls(vars,pars,x,y)
% KM_FBKRLS implements the basic iteration of the fixed-budget kernel
% recursive least-squares (FB-KRLS) algorithm.
% Input: - vars: structure containing the used variables
% - pars: structure containing kernel and algorithm parameters
% - x: matrix containing input vectors... |
github | epfl-lasa/ML_toolbox-master | km_swkrls.m | .m | ML_toolbox-master/methods/toolboxes/kmbox/lib/km_swkrls.m | 3,060 | utf_8 | 6140ea6f093150c9a92e688025fdcb1b | function out = km_swkrls(vars,pars,x,y)
% KM_SWKRLS implements the basic iteration of the sliding-window kernel
% recursive least-squares (SW-KRLS) algorithm.
% Input: - vars: structure containing the used variables
% - pars: structure containing kernel and algorithm parameters
% - x: matrix containing input vecto... |
github | epfl-lasa/ML_toolbox-master | km_akcca.m | .m | ML_toolbox-master/methods/toolboxes/kmbox/lib/km_akcca.m | 14,989 | utf_8 | 3e823b158d629187e4a128ad78689051 | function [vars,eval] = km_akcca(pars,data)
% KM_AKCCA performs Alternating Kernel Canonical Correlation Analysis to
% blindly identify and equalize a single-input multiple-output Wiener.
%
% Input: - pars: structure containing parameters of the alternating KCCA
% algorithm
% - data: structure containing t... |
github | epfl-lasa/ML_toolbox-master | SB1_KernelFunction.m | .m | ML_toolbox-master/methods/toolboxes/rvmbox/SB1_KernelFunction.m | 2,594 | utf_8 | b7370f5b3bc2ab39555ca06a3457d87c | % SB1_KERNELFUNCTION Compute kernel functions for the RVM model
%
% K = SB1_KERNELFUNCTION(X1,X2,KERNEL,LENGTH)
%
% OUTPUT ARGUMENTS:
%
% K N1 x N2 kernel matrix.
%
% INPUT ARGUMENTS:
%
% X1 N1 x d data matrix
% X2 N2 x d data matrix
% KERNEL Kernel type: c... |
github | epfl-lasa/ML_toolbox-master | SB1_Diagnostic.m | .m | ML_toolbox-master/methods/toolboxes/rvmbox/SB1_Diagnostic.m | 535 | utf_8 | 97415e30f346945c88be6f535f86471a | % SB1_DIAGNOSTIC Output neat diagnostic info with verbosity control
%
%
% Copyright 2009 :: Michael E. Tipping
%
% This file is part of the SPARSEBAYES baseline implementation (V1.10)
%
% Contact the author: m a i l [at] m i k e t i p p i n g . c o m
%
function SB1_Diagnostic(level, message_, varargin)
Diag... |
github | epfl-lasa/ML_toolbox-master | SB1_Estimate.m | .m | ML_toolbox-master/methods/toolboxes/rvmbox/SB1_Estimate.m | 5,586 | utf_8 | 730deb45d2830345f8f3484ae0090d19 | % SB1_ESTIMATE Estimate parameters in a sparse Bayesian model
%
% [W,USED,ML,A,B,G] = SB1_ESTIMATE(PHI,T,A,B,MAXITS,MONITS)
%
% OUTPUT ARGUMENTS:
%
% W Estimated weights (subset of full model)
% USED Indices of relevant basis vectors
% ML Marginal likelihood of final model... |
github | epfl-lasa/ML_toolbox-master | setEnvironment.m | .m | ML_toolbox-master/methods/toolboxes/rvmbox/setEnvironment.m | 895 | utf_8 | 389a783c5400cec72055913ea1f7b44e | % SETENVIRONMENT Set value of "global" variable
%
%
% Copyright 2009 :: Michael E. Tipping
%
% This file is part of the SPARSEBAYES baseline implementation (V1.10)
%
% Contact the author: m a i l [at] m i k e t i p p i n g . c o m
%
function setEnvironment(varargin)
switch nargin
%
case 0,
% Initial... |
github | epfl-lasa/ML_toolbox-master | SB1_ExampleClassify.m | .m | ML_toolbox-master/methods/toolboxes/rvmbox/SB1_ExampleClassify.m | 4,203 | utf_8 | d2c024ff291810ca7529afb1729ec89e | % SB1_EXAMPLECLASSIFY Example of Sparse Bayes Classification
%
% SB1_EXAMPLECLASSIFY(N,KERNEL,WIDTH,MAXITS)
%
% INPUT ARGUMENTS:
%
% N Number of training points (up to 250)
% KERNEL Kernel function to use (see SB1_KERNELFUNCTION)
% WIDTH Kernel length scale parameter
% MAXITS... |
github | epfl-lasa/ML_toolbox-master | SB1_PosteriorMode.m | .m | ML_toolbox-master/methods/toolboxes/rvmbox/SB1_PosteriorMode.m | 4,157 | utf_8 | 3867817e1e122635ee08bc303a3265e4 | % SB1_POSTERIORMODE Find mode of posterior distribution (Bernoulli case)
%
% [W, UI, LMODE] = SB1_POSTERIORMODE(PHI,T,W,ALPHA,ITS)
%
% OUTPUT ARGUMENTS:
%
% W Parameter values at mode
% UI Inverse Cholesky factor of Hessian
% LMODE Log likelihood of data at mode
%
% I... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.