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 | huangym310/image_deblur-master | fast_deconv_bregman.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/11_BlindDeconvolutionUsingaNormalizedSparsityMeasure_Fergus/fast_deconv_bregman.m | 3,048 | utf_8 | 973e7fd7c8d796ae3710cba343daae82 | function [g] = fast_deconv_bregman(f, k, lambda, alpha)
%
% fast solver for the non-blind deconvolution problem: min_g \lambda/2 |g \oplus k
% - f|^2. We use a splitting trick as
% follows: introduce a (vector) variable w, and rewrite the original
% problem as: min_{g,w,b} \lambda/2 |g \oplus k - g|^2 + \beta/2 |w -
%... |
github | huangym310/image_deblur-master | ms_blind_deconv.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/11_BlindDeconvolutionUsingaNormalizedSparsityMeasure_Fergus/ms_blind_deconv.m | 5,929 | utf_8 | 793fd5f74ca896a989f662169792335c | function [yorig, deblur, kernel, opts] = ms_blind_deconv(fn, opts)
%
% Do multi-scale blind deconvolution given input file name and options
% structure opts. Returns a double deblurred image along with estimated
% kernel. Following the kernel estimation, a non-blind deconvolution is run.
%
% Copyright (2011): Dilip K... |
github | huangym310/image_deblur-master | solve_image_bregman.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/11_BlindDeconvolutionUsingaNormalizedSparsityMeasure_Fergus/solve_image_bregman.m | 6,074 | utf_8 | 53ce7248ff591aab751e8787cbd2cdb7 | function [w] = solve_image_bregman(v, beta, alpha)
%
% solve the following component-wise separable problem
% min maskk .* |w|^\alpha + \frac{\beta}{2} (w - v).^2
%
% A LUT is used to solve the problem; when the function is first called
% for a new value of beta or alpha, a LUT is built for that beta/alpha
% combin... |
github | huangym310/image_deblur-master | pcg_kernel_irls_conv.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/11_BlindDeconvolutionUsingaNormalizedSparsityMeasure_Fergus/pcg_kernel_irls_conv.m | 2,194 | utf_8 | 69320b59f1de28b4f4213c839c8e8eea | function k_out = pcg_kernel_irls_conv(k_init, X, Y, opts)
%
% Use Iterative Re-weighted Least Squares to solve l_1 regularized kernel
% update with sum to 1 and nonnegativity constraints. The problem that is
% being minimized is:
%
% min 1/2\|Xk - Y\|^2 + \lambda \|k\|_1
%
% Inputs:
% k_init = initial kernel, or s... |
github | huangym310/image_deblur-master | plot_nonuni_kernel_write.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/10_nonuniform_v0.2.1_Whyte/code/plot_nonuni_kernel_write.m | 2,280 | utf_8 | bd9498e31e0177a1f23196677a041449 | function plot_nonuni_kernel_write(K,theta_grid,file_name,varargin)
% plot_nonuni_kernel_write Plot a non-uniform kernel and save it to disk
% [] = plot_nonuni_kernel_write(K,theta_grid,file_name,varargin)
%
% Inputs:
% K blur kernel
% theta_grid 3 x 1 cell array, containing output of meshgrid
% f... |
github | huangym310/image_deblur-master | set_figure_font_size.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/10_nonuniform_v0.2.1_Whyte/code/set_figure_font_size.m | 1,122 | utf_8 | 822c95d3b39b775d88b2012b7a15fc03 | % function []=gg_set_figure_font_size(ffs,fsize)
%
% ffs ... figure handle
% fsize ... fontsize
%
function []=set_figure_font_size(ffs,fsize)
% set(H(i,jj).hsht,'linewidth',2,'markersize',5)
% set(ff(1))
% ffs = ff(1);
ffa = findobj(ffs,'type','axes');
set(findobj(ffs,'type','axes'),'fontsize',fsize);
%delete... |
github | huangym310/image_deblur-master | reconsEdge3.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/10_nonuniform_v0.2.1_Whyte/code/reconsEdge3.m | 1,243 | utf_8 | c3b7937a3dce9ef6d0b554a6804f9ff1 | function im = reconsEdge3(dx,dy)
% Author: Yair Weiss
% Version: 1.0, distribution code.
% Project: Removing Camera Shake from a Single Image, SIGGRAPH 2006 paper
% Copyright 2006, Massachusetts Institute of Technology
% Modified by Oliver Whyte for CVPR 2010 paper:
% "Non-uniform Deblurring for Shaken Images"
% by O... |
github | huangym310/image_deblur-master | create_greenspan_settings.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/06_deblur_code_Fergus/code/create_greenspan_settings.m | 2,527 | utf_8 | cfad68ce50fdb9d9dcc4b38e9b9c14fe | function S = create_greenspan_settings(varargin)
% Author: Bryan Russell
% Version: 1.0, distribution code.
% Project: Removing Camera Shake from a Single Image, SIGGRAPH 2006 paper
% Copyright 2006, Massachusetts Institute of Technology
% CREATE_GREENSPAN_SETTINGS - Creates a data structure containing the
% various ... |
github | huangym310/image_deblur-master | solve_image.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/09_fastdeconv_Fergus/fastdeconv/solve_image.m | 6,057 | utf_8 | d7844bb7b39e4553b66854ca11491937 | function [w] = solve_image(v, beta, alpha)
%
% solve the following component-wise separable problem
% min |w|^\alpha + \frac{\beta}{2} (w - v).^2
%
% A LUT is used to solve the problem; when the function is first called
% for a new value of beta or alpha, a LUT is built for that beta/alpha
% combination and for a r... |
github | huangym310/image_deblur-master | fast_deconv.m | .m | image_deblur-master/related_project/Deblur_Summary/Codes/09_fastdeconv_Fergus/fastdeconv/fast_deconv.m | 4,542 | utf_8 | 604f20406671f27b4a920df2cab7a1e3 | function [yout] = fast_deconv(yin, k, lambda, alpha, yout0)
%
%
% fast_deconv solves the deconvolution problem in the paper (see Equation (1))
% D. Krishnan, R. Fergus: "Fast Image Deconvolution using Hyper-Laplacian
% Priors", Proceedings of NIPS 2009.
%
% This paper and the code are related to the work and code of Wa... |
github | huangym310/image_deblur-master | solve_image.m | .m | image_deblur-master/related_project/deblurring/bdconv/solve_image.m | 6,059 | utf_8 | 258dc9c22dc29220d9cf980338078d81 | function [w] = solve_image(v, beta, alpha)
%
% solve the following component-wise separable problem
% min |w|^\alpha + \frac{\beta}{2} (w - v).^2
%
% A LUT is used to solve the problem; when the function is first called
% for a new value of beta or alpha, a LUT is built for that beta/alpha
% combination and for a r... |
github | huangym310/image_deblur-master | fast_deconv.m | .m | image_deblur-master/related_project/deblurring/bdconv/fast_deconv.m | 4,553 | utf_8 | 3ba30230b6419a1d69866899040b2a97 | function [yout] = fast_deconv(yin, k, lambda, alpha, yout0)
%
%
% fast_deconv solves the deconvolution problem in the paper (see Equation (1))
% D. Krishnan, R. Fergus: "Fast Image Deconvolution using Hyper-Laplacian
% Priors", Proceedings of NIPS 2009.
%
% This paper and the code are related to the work and code of Wa... |
github | huangym310/image_deblur-master | estimate_psf_gradient_mul.m | .m | image_deblur-master/related_project/l0/estimate_psf_gradient_mul.m | 1,357 | utf_8 | 2ebdee8424d0b1ee634729fef03356d9 | function [psf,opts] = estimate_psf_gradient_mul(B,L,opts,psf_old)
% The objective function:
% psf^* = argmin ||Lx*k - Bx||^2 +||Ly*k - By||^2+ weight |K|^2
psf_size = size(psf_old);
weight = opts.gamma;
% These values can be pre-computed at the beginning of each level
% FBx,FBy
dx = [-1 1; 0 0];
dy = [-1 0; 1 0];
Lx =... |
github | huangym310/image_deblur-master | wrap_boundary_liu.m | .m | image_deblur-master/related_project/l0/cho_code/wrap_boundary_liu.m | 3,568 | utf_8 | 778eb4d6eeeb26991f536cb17154be69 | function ret = wrap_boundary_liu(img, img_size)
% wrap_boundary_liu.m
%
% pad image boundaries such that image boundaries are circularly smooth
%
% written by Sunghyun Cho (sodomau@postech.ac.kr)
%
% This is a variant of the method below:
% Reducing boundary artifacts in image deconvolution
% Renting Liu, J... |
github | huangym310/image_deblur-master | adjust_psf_center_mul.m | .m | image_deblur-master/related_project/l0/cho_code/adjust_psf_center_mul.m | 1,603 | utf_8 | 4ae2239ea9564205040af6f41543b2ef | function psf = adjust_psf_center_mul(psf)
for ii = 1:size(psf,3)
psf(:,:,ii) = adjust_psf_center(psf(:,:,ii));
end
end%function
function psf = adjust_psf_center(psf)
[X Y] = meshgrid(1:size(psf,2), 1:size(psf,1));
xc1 = sum2(psf .* X);
yc1 = sum2(psf .* Y);
xc2 = (size(psf,2)+1) / 2;
yc2 = (size(psf,1)+1) / 2;
... |
github | huangym310/image_deblur-master | resizeKer.m | .m | image_deblur-master/related_project/l0/mul/resizeKer.m | 1,119 | utf_8 | 6506283bde565c443da3e4f9cc073aa0 | %%
function k=resizeKer(k,ret,k1,k2)
%%
% levin's code
k=imresize(k,ret);
k=max(k,0);
k=fixsize(k,k1,k2);
if max(k(:))>0
k=k/sum(k(:));
end
end
%%
function nf=fixsize(f,nk1,nk2)
[k1,k2]=size(f);
while((k1~=nk1)|(k2~=nk2))
if (k1>nk1)
s=sum(f,2);
if (s(1)<s(end))
f=f(2:end,:);
... |
github | huangym310/image_deblur-master | update_kernel_armijo.m | .m | image_deblur-master/related_project/code_TVBD/CVPR2014_TVBD_armijo/update_kernel_armijo.m | 1,325 | utf_8 | c4077ad776fa687d85c9217a1ac9dd41 | function [K,eta_K] = update_kernel_armijo(B,K,L,gamma,eta_K)
% compute kernel prior
[Lx,Ly] = get_gradient(L);
filt = ones(5)/5^2;
Lx = conv2(Lx,filt,'same');
Ly = conv2(Ly,filt,'same');
G = sqrt(Lx.^2+Ly.^2);
PK = (K>0);
% update kernel using gradient descent with Armijo rule
n = size(B,3);
for ii = 1:n
[K(:,:,ii... |
github | huangym310/image_deblur-master | update_image_armijo.m | .m | image_deblur-master/related_project/code_TVBD/CVPR2014_TVBD_armijo/update_image_armijo.m | 1,032 | utf_8 | 8880674c7f510e88fe73abd2151ea495 | function [L,learning_rate] = update_image_armijo(B,K,L,eta,lambda,learning_rate)
% update image using gradient descent with Armijo rule
sigma = 0.1;
beta = 0.5;
obj = objective_fun(B,K,L,eta,lambda);
grad = gradient_fun(B,K,L,eta,lambda);
neg_grad = -grad;
obj_new = objective_fun(B,K,L+learning_rate*neg_grad,eta,... |
github | huangym310/image_deblur-master | registration.m | .m | image_deblur-master/related_project/tip2012/tip2012/registration.m | 4,378 | utf_8 | d548cf6c3f01e10b93f6c2c809e1c6a2 | function [R, H] = registration(G,blocks)
% Registration
% Images is divided into nonoverlapping windows and in each a shift by normalized
% correlation is estimated. Affine transform paramaters are calculated from
% the local shifts.
%
% [R,H] = registration(G,blocks)
%
% G ... input images (cell array)
% blocks ... n... |
github | huangym310/image_deblur-master | rpca_adm.m | .m | image_deblur-master/graduate-design/rpca_adm.m | 1,916 | utf_8 | b303a95d75a99cf38ce4b2b2f06590ea | function [A,E] = rpca_adm(D,lambda)
% Solves the robust PCA
% min ||A||_* + lambda||E||_1
% s.t. A+E = D
% by ADM algorithm.
% Inputs:
% D -- the data matrix, m x n.
% lambda -- magnitude of 1 norm term
% Outputs:
% A -- The estimated of A
% E -- The estimated of E
%initial... |
github | huangym310/image_deblur-master | wrap_boundary.m | .m | image_deblur-master/graduate-design/wrap_boundary.m | 3,564 | utf_8 | 05d9efd1b14b8b9f12ef514ef3d9c9a7 | function ret = wrap_boundary(img, img_size)
% wrap_boundary_liu.m
%
% pad image boundaries such that image boundaries are circularly smooth
%
% written by Sunghyun Cho (sodomau@postech.ac.kr)
%
% This is a variant of the method below:
% Reducing boundary artifacts in image deconvolution
% Renting Liu, Jiaya... |
github | wittawatj/l1lsmi-master | wlsmi_cont.m | .m | l1lsmi-master/wlsmi_cont.m | 4,067 | utf_8 | 79a815ff3e1afa27075ae55d56df7364 | function [SW] = wlsmi_cont( X, Y, options )
%
% LSMI in which Gaussian basis function of X has m widths where m is the
% number of features. l1-penalty is imposed on these widths to make them
% sparse for feature selection.
%
%
% Initialize W0
% For each (lambda, sigma_y) candidate:
% Optimize W until converged ... |
github | wittawatj/l1lsmi-master | wlsmi_dis.m | .m | l1lsmi-master/wlsmi_dis.m | 3,554 | utf_8 | eaddf78bc8cb555bb13b659445f5f7b6 | function [SW] = wlsmi_dis( X, Y, options )
%
% LSMI in which Gaussian basis function of X has m widths where m is the
% number of features. l1-penalty is imposed on these widths to make them
% sparse for feature selection.
%
%
% Initialize W0
% For each (lambda) candidate:
% Optimize W until converged using (lam... |
github | wittawatj/l1lsmi-master | demo_pglsmi.m | .m | l1lsmi-master/demo/demo_pglsmi.m | 1,551 | utf_8 | 7ab4f5dfe497809089f2041b7a838016 | function demo_pglsmi( )
%
% Demonstrate how to use pglsmi (L1-LSMI).
% pg is an internal code for 'Plain gradient'
%
rng(1);
%%%%% Generate a toy dataset
% X is #dim x #sample
% Y is 1 x #sample
[X Y] = gen_plus(400);
%%%%% Some settings
% Number of features to select. Necessary option.
o.k = 2;
% How many restarts ... |
github | wittawatj/l1lsmi-master | gen_andor.m | .m | l1lsmi-master/art/gen_andor.m | 913 | utf_8 | 87037bd4bb44c7420e91c8392cce67d5 | function [X,Y,D] = gen_andor(n, seed)
%
% And/or problem. Similar to the paper
% "Irrelevant features and the subset selection problem."
%
% Set the RandStream to use the seed
oldRs = RandStream.getGlobalStream();
rs = RandStream.create('mt19937ar','seed',seed);
RandStream.setGlobalStream(rs);
X1 = randi(... |
github | wittawatj/l1lsmi-master | ipdm.m | .m | l1lsmi-master/helper/ipdm.m | 38,831 | utf_8 | dff9a997561db408ab898c6597b8eca5 | function d = ipdm(data1,varargin)
% ipdm: Inter-Point Distance Matrix
% usage: d = ipdm(data1)
% usage: d = ipdm(data1,data2)
% usage: d = ipdm(data1,prop,value)
% usage: d = ipdm(data1,data2,prop,value)
%
% Arguments: (input)
% data1 - array of data points, each point is one row. p dimensional
% data will be... |
github | wittawatj/l1lsmi-master | applyhatch.m | .m | l1lsmi-master/helper/applyhatch.m | 3,381 | utf_8 | 333f7096a3588c355c7bffa8e990fd96 | function applyhatch(h,patterns,colorlist)
%APPLYHATCH Apply hatched patterns to a figure
% APPLYHATCH(H,PATTERNS) creates a new figure from the figure H by
% replacing distinct colors in H with the black and white
% patterns in PATTERNS. The format for PATTERNS can be
% a string of the characters '/', '\', '|', '... |
github | wittawatj/l1lsmi-master | myProcessOptions.m | .m | l1lsmi-master/helper/myProcessOptions.m | 674 | utf_8 | b94d252a960faa95a3074129247619e6 | function [varargout] = myProcessOptions(options,varargin)
% Similar to processOptions, but case insensitive and
% using a struct instead of a variable length list
options = toUpper(options);
for i = 1:2:length(varargin)
if isfield(options,upper(varargin{i}))
v = getfield(options,upper(varargin{i}));
... |
github | wittawatj/l1lsmi-master | quadprog2.m | .m | l1lsmi-master/helper/quadprog2.m | 36,223 | utf_8 | a47d83840de921b07bf67d44b993d50d | function [x,v,opt] = quadprog2(varargin)
% QUADPROG2 - Convex Quadratic Programming Solver
% Featuring the SOLVOPT freeware optimizer
%
% New for version 1.1: * Significant Speed Improvement
% * Geometric Preconditioning
% * Impr... |
github | wittawatj/l1lsmi-master | funObjNegLSMIy_cont.m | .m | l1lsmi-master/helper/dlsmihelper/funObjNegLSMIy_cont.m | 4,925 | utf_8 | bd2413339644c9413f4c62fb3c7eecfb | function [ nlsmi, DF] = funObjNegLSMIy_cont(W, X, Y, const, options, refInfo )
%
% Function object of DLSMI to be used with Mark Schmidt's optimizer.
% const = structure containing constants
% W = an m-dimensional column vector
%
[m n] = size(X);
if all(W==0)
nlsmi = inf;
DF = zeros(m,1);
return;
end
... |
github | wittawatj/l1lsmi-master | funObjNegLSMI_dis.m | .m | l1lsmi-master/helper/dlsmihelper/funObjNegLSMI_dis.m | 4,650 | utf_8 | 393172e2ba32491df8c9d861f4762958 | function [ nlsmi, DF] = funObjNegLSMI_dis(W, X, Y, const, options, refInfo )
%
% Function object of DLSMI to be used with Mark Schmidt's optimizer.
% const = structure containing constants
% W = an m-dimensional column vector
%
% Discrete output case. No model selection on Y. Assume delta kernel is
% used on Y.
%
[m... |
github | wittawatj/l1lsmi-master | funObjNegLSMI_cont.m | .m | l1lsmi-master/helper/dlsmihelper/funObjNegLSMI_cont.m | 4,609 | utf_8 | 6787792f91b5a1e125db58b8740973a6 | function [ nlsmi, DF] = funObjNegLSMI_cont(W, X, Y, const, options, refInfo )
%
% Function object of DLSMI to be used with Mark Schmidt's optimizer.
% const = structure containing constants
% W = an m-dimensional column vector
%
[m n] = size(X);
if all(W==0)
nlsmi = inf;
DF = zeros(m,1);
return;
end
... |
github | wittawatj/l1lsmi-master | deriveIByW.m | .m | l1lsmi-master/helper/dlsmihelper/deriveIByW.m | 2,587 | utf_8 | d25e226f26772ee86a12ecf762b87cda | function DF = deriveIByW(W, X, Xc, Alpha, Ky, Kz, sigmaz )
%
% Derivative of SMI (0.5h'\alpha - 0.5) with respect to diagonal W.
% Return an m-dimensional column vector DF
%
% Vectorization over m (dimensions) will not be done since m is assumed to
% be huge.
%
DF = ver1(W, X, Xc, Alpha, Ky, Kz, sigmaz );
% ... |
github | wittawatj/l1lsmi-master | vark_d.m | .m | l1lsmi-master/helper/vark/vark_d.m | 3,386 | utf_8 | 34e49436e7a86608dad9e7fb6583ab71 | function VK = vark_d(X, Y, options )
%
% General vark function for dlsmi and dhsic.
%
[m n] = size(X);
t0 = cputime;
tic;
seed = myProcessOptions(options,'seed', 1);
% Set the RandStream to use the seed
oldRs = RandStream.getDefaultStream();
rs = RandStream.create('mt19937ar','seed', seed);
RandStream.setDefaultStr... |
github | wittawatj/l1lsmi-master | vark_pg.m | .m | l1lsmi-master/helper/vark/vark_pg.m | 3,292 | utf_8 | 9488f65011f4ccfcae3635d5f52d2adf | function VK = vark_pg(X, Y, options )
%
% General vark function for pg functions.
% The main parameter to vary is z (l1 ball's radius).
%
[m n] = size(X);
t0 = cputime;
tic;
seed = myProcessOptions(options,'seed', 1);
% Set the RandStream to use the seed
oldRs = RandStream.getDefaultStream();
rs = RandStream.create... |
github | wittawatj/l1lsmi-master | batchPredictVark.m | .m | l1lsmi-master/helper/exp/batchPredictVark.m | 4,786 | utf_8 | 437cb991423fc73099d1173c42ee509e | function batchPredictVark( expnum, dataset, options )
%
% Evaluate the selected features by vark functions with SVM/SVR.
% For efficiency, for each dataset, an SVM/SVR evaluation result is kept
% for each feature subset found. This is written to a file called
% "<dataset>-svcsvr.mat"
%
% For each k-feature subset, an ... |
github | wittawatj/l1lsmi-master | batchPredictVarkKG.m | .m | l1lsmi-master/helper/exp/batchPredictVarkKG.m | 4,241 | utf_8 | cce6470c791c14d4835fc459312c8eeb | function batchPredictVarkKG( expnum, dataset )
%
% Evaluate the selected features by vark functions with Knn/Gaussian regression.
% For efficiency, for each dataset, an evaluation result is kept
% for each feature subset found. This is written to a file called
% "<dataset>-knngauss.mat"
%
% For each k-feature subset, ... |
github | wittawatj/l1lsmi-master | prettyPlot.m | .m | l1lsmi-master/3rdparty/L1General/misc/prettyPlot.m | 4,801 | utf_8 | de14a2c001b84082ad54033c8727f5fb | function [] = prettyPlot(xData,yData,legendStr,plotTitle,plotXlabel,plotYlabel,type,style,errors)
% prettyPlot(xData,yData,legendStr,plotTitle,plotXlabel,plotYlabel,type,style,errors)
%
% type 0: plot
% type 1: semilogx
%
% style -1: matlab style
% style 0: use line styles
% style 1: use markers
%
% Save as image:
% se... |
github | wittawatj/l1lsmi-master | myProcessOptions.m | .m | l1lsmi-master/3rdparty/L1General/misc/myProcessOptions.m | 674 | utf_8 | b94d252a960faa95a3074129247619e6 | function [varargout] = myProcessOptions(options,varargin)
% Similar to processOptions, but case insensitive and
% using a struct instead of a variable length list
options = toUpper(options);
for i = 1:2:length(varargin)
if isfield(options,upper(varargin{i}))
v = getfield(options,upper(varargin{i}));
... |
github | wittawatj/l1lsmi-master | nuke_PQN.m | .m | l1lsmi-master/3rdparty/L1General/minConf/nuke_PQN.m | 9,567 | utf_8 | 2162efd9283f6aecb5a30bddfe3f117e | function [x,f,funEvals,logs] = nuke_PQN(funObj,x,funProj,options, funFeedback)
% function [x,f] = minConf_PQN(funObj,funProj,x,options)
%
% Function for using a limited-memory projected quasi-Newton to solve problems of the form
% min funObj(x) s.t. x in C
%
% The projected quasi-Newton sub-problems are solved the sp... |
github | wittawatj/l1lsmi-master | minConf_PQN.m | .m | l1lsmi-master/3rdparty/L1General/minConf/minConf_PQN.m | 7,970 | utf_8 | b37fa579452c9766659190a6f1c93027 | function [x,f,funEvals] = minConf_PQN(funObj,x,funProj,options)
% function [x,f] = minConf_PQN(funObj,funProj,x,options)
%
% Function for using a limited-memory projected quasi-Newton to solve problems of the form
% min funObj(x) s.t. x in C
%
% The projected quasi-Newton sub-problems are solved the spectral projecte... |
github | wittawatj/l1lsmi-master | minConf_QNST.m | .m | l1lsmi-master/3rdparty/L1General/minConf/minConf_QNST.m | 5,262 | utf_8 | ca0854c6dc7fe16d90d5e6f1eece414f | function [x,f,funEvals] = minConf_QNST(funObj1,funObj2,x,funProj,options)
nVars = length(x);
if nargin < 5
options = [];
end
[verbose,numDiff,optTol,progTol,maxIter,maxProject,suffDec,corrections,adjustStep,bbInit,...
BBSToptTol,BBSTprogTol,BBSTiters,BBSTtestOpt] = ...
myProcessOptions(...
options,'v... |
github | wittawatj/l1lsmi-master | L1GeneralProjection_nuke.m | .m | l1lsmi-master/3rdparty/L1General/L1General/L1GeneralProjection_nuke.m | 6,192 | utf_8 | f5ef1aa1e3b6db2581edd6095d58aaea | function [w,fEvals,f] = L1GeneralProjection_nuke(gradFunc,w,lambda,params,refObj,varargin)
%
% computes argmin_w: gradFunc(w,varargin) + sum lambda.*abs(w)
%
% Method used:
% Two-Metric Projection method w/ non-negative variables
%
% Parameters
% gradFunc - function of the form gradFunc(w,varargin{:})
% w - initi... |
github | wittawatj/l1lsmi-master | L1GeneralProjection.m | .m | l1lsmi-master/3rdparty/L1General/L1General/L1GeneralProjection.m | 5,003 | utf_8 | ebe5a4682ef962bf487554d3f42c5af9 | function [w,fEvals,f] = L1GeneralProjection(gradFunc,w,lambda,params,varargin)
%
% computes argmin_w: gradFunc(w,varargin) + sum lambda.*abs(w)
%
% Method used:
% Two-Metric Projection method w/ non-negative variables
%
% Parameters
% gradFunc - function of the form gradFunc(w,varargin{:})
% w - initial guess
% ... |
github | wittawatj/l1lsmi-master | L1General2_PSSgb.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_PSSgb.m | 5,020 | utf_8 | 3d88a276f248897974563f0903d8a918 | function [w] = L1General2_PSSgb(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,corrections,Dtype,quadraticInit] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'corrections',100,'D... |
github | wittawatj/l1lsmi-master | L1General2_OWL.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_OWL.m | 4,843 | utf_8 | da7eab5c4f7463a123002992c34b511d | function [w] = L1General2_OWL(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,corrections,quadraticInit] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'corrections',100,'quadratic... |
github | wittawatj/l1lsmi-master | L1General2_BBST.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_BBST.m | 4,131 | utf_8 | 3f19d9730203a74dac1d754b152cc64a | function [w] = L1General2_SpaRSA(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,memory] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'memory',10);
if verbose
fprintf('%6s %... |
github | wittawatj/l1lsmi-master | L1General2_OPG.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_OPG.m | 3,265 | utf_8 | 433d1fadde169eb9b5d1353c1abc9fed | function [w] = L1General2_OPG(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,L] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'L',[]);
if verbose
fprintf('%6s %6s %12s %12s %12s %6s\n','Iter','fEv... |
github | wittawatj/l1lsmi-master | L1General2_PSSsp.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_PSSsp.m | 4,852 | utf_8 | 1dc20074567aabc22c2a0af2a148d759 | function [w] = L1General2_OWL(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,corrections,quadraticInit] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'corrections',100,'quadratic... |
github | wittawatj/l1lsmi-master | L1General2_SPG.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_SPG.m | 4,371 | utf_8 | 3fad5a684068e0d47a7fa598a3ce5ddb | function [w] = L1General2_SPG(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,memory] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'memory',10);
if verbose
fprintf('%6s %6s ... |
github | wittawatj/l1lsmi-master | L1General2_BBSG.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_BBSG.m | 4,386 | utf_8 | 58c0781330c045e0436b45b5ad199484 | function [w] = L1General2_OWL(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,memory] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'memory',10);
if verbose
fprintf('%6s %6s ... |
github | wittawatj/l1lsmi-master | L1General2_TMP.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_TMP.m | 4,547 | utf_8 | a1dde60fb1d7105ff79b6603a89a7e5a | function [w, f] = L1General2_TMP(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,corrections] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'corrections',100);
if verbose
fpr... |
github | wittawatj/l1lsmi-master | L1General2_AS.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_AS.m | 5,823 | utf_8 | 93d825ad0ef5b1f7e37bc5bd8452f521 | function [w] = L1General2_AS(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,corrections] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'corrections',100);
if verbose
fprintf... |
github | wittawatj/l1lsmi-master | L1General2_PSSas.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_PSSas.m | 6,149 | utf_8 | d699138c908d926f6ffbc6fa0418bcf4 | function [w] = L1General2_PSSas(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,corrections,K] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'corrections',100,'K',[]);
if verbose... |
github | wittawatj/l1lsmi-master | L1General2_DSST.m | .m | l1lsmi-master/3rdparty/L1General/L1General2/L1General2_DSST.m | 3,752 | utf_8 | 64f5b39ac6371db1e4b54b109770337a | function [w] = L1General2_DSST(funObj,w,lambda,options)
%% Process Options
if nargin < 4
options = [];
end
[verbose,optTol,progTol,maxIter,suffDec,quadraticInit] = ...
myProcessOptions(options,'verbose',1,'optTol',1e-5,'progTol',1e-9,...
'maxIter',500,'suffDec',1e-4,'quadraticInit',0);
if verbose
fpr... |
github | wittawatj/l1lsmi-master | drawGraph.m | .m | l1lsmi-master/3rdparty/L1General/KPM/drawGraph.m | 45,577 | utf_8 | cb2750ed351f50d702eb58a2d6bef202 | function drawGraph(adj, varargin)
% drawGraph Automatic graph layout: interface to Neato (see http://www.graphviz.org/)
%
% drawGraph(adjMat, ...) draws a graph in a matlab figure
%
% Optional arguments (string/value pair) [default in brackets]
%
% labels - labels{i} is a *string* for node i [1:n]
% removeSelfLoops - ... |
github | wittawatj/l1lsmi-master | UGM_makeCRFedgePotentials.m | .m | l1lsmi-master/3rdparty/L1General/UGM/UGM_makeCRFedgePotentials.m | 1,917 | utf_8 | d865300c2b61fd406d316826012368a4 | function [edgePot] = UGM_makeEdgePotentials(Xedge,v,edgeStruct,infoStruct)
% Makes pairwise class potentials for each node
%
% Xedge(1,feature,edge)
% v(feature,variable,variable) - edge weights
% nStates - number of States per node
%
% edgePot(class1,class2,edge)
if edgeStruct.useMex
% Mex Code
edgePot = UGM_ma... |
github | wittawatj/l1lsmi-master | UGM_makeCRFNodePotentials.m | .m | l1lsmi-master/3rdparty/L1General/UGM/UGM_makeCRFNodePotentials.m | 986 | utf_8 | 0e50c1dc27d7c8204c9b35f43c59beb9 | function [nodePot] = UGM_makeCRFnodePotentials(X,w,edgeStruct,infoStruct)
% Makes class potentials for each node
%
% X(1,feature,node)
% w(feature,variable,variable) - node weights
% nStates - number of states per node
%
% nodePot(node,class)
if edgeStruct.useMex
% Mex Code
nNodes = size(X,3);
nStates = edgeS... |
github | wittawatj/l1lsmi-master | UGM_initWeights.m | .m | l1lsmi-master/3rdparty/L1General/UGM/UGM_initWeights.m | 549 | utf_8 | 6ac6279135a318b1a54d8ad5d1b2adb6 | function [w,v,wLinInd,vLinInd] = UGM_initWeights(infoStruct,initType)
% Generates an initial weight vector
%
% X(instance,feature,node)
% Xedge(instance,feature,edge)
% infoStruct: structure containing nStates, tied, and ising
% type - 'random' or 'zero'
if strcmp(initType,'random')
initFunc = @randn;
elseif strcm... |
github | wittawatj/l1lsmi-master | UGM_MRFLoss.m | .m | l1lsmi-master/3rdparty/L1General/UGM/UGM_MRFLoss.m | 5,348 | utf_8 | 23a3516c53c625c2451571adbbe4d5e7 | function [f,g] = UGM_MRFLoss(wv,y,edgeStruct,infoStruct,inferFunc,varargin)
% wv(variable)
% X(instance,feature,node)
% Xedge(instance,feature,edge)
% y(instance,node)
% edgeStruct
% inferFunc
% varargin - additional parameters of inferFunc
nNodeFeatures = 1;
nEdgeFeatures = 1;
[nInstances,nNodes] = size(y);
nFeatures... |
github | wittawatj/l1lsmi-master | UGM_Sample_Exact.m | .m | l1lsmi-master/3rdparty/L1General/UGM/sample/UGM_Sample_Exact.m | 2,003 | utf_8 | a154b2b69704368d50fb3f106f13340b | function [samples] = UGM_Sample_Exact(nodePot,edgePot,edgeStruct)
% Exact sampling
assert(prod(edgeStruct.nStates) < 50000000,'Brute Force Exact Sampling not recommended for models with > 50 000 000 states');
[nNodes,maxState] = size(nodePot);
nEdges = size(edgePot,3);
edgeEnds = edgeStruct.edgeEnds;
nStates = edgeSt... |
github | wittawatj/l1lsmi-master | UGM_Infer_Exact.m | .m | l1lsmi-master/3rdparty/L1General/UGM/infer/UGM_Infer_Exact.m | 1,801 | utf_8 | cce5eee8fd03e062390e5b8c6ba94784 | function [nodeBel, edgeBel, logZ] = UGM_Infer_Exact(nodePot, edgePot, edgeStruct)
% INPUT
% nodePot(node,class)
% edgePot(class,class,edge) where e is referenced by V,E (must be the same
% between feature engine and inference engine)
%
% OUTPUT
% nodeBel(node,class) - marginal beliefs
% edgeBel(class,class,e) - pairwi... |
github | wittawatj/l1lsmi-master | isLegal.m | .m | l1lsmi-master/3rdparty/L1General/minFunc/isLegal.m | 111 | utf_8 | 201b5c177a5a05ba3a3322077c1acae1 |
function [legal] = isLegal(v)
legal = sum(any(imag(v(:))))==0 & sum(isnan(v(:)))==0 & sum(isinf(v(:)))==0;
end |
github | wittawatj/l1lsmi-master | WolfeLineSearch.m | .m | l1lsmi-master/3rdparty/L1General/minFunc/WolfeLineSearch.m | 11,132 | utf_8 | bbe46a7fa9b05110d6c9f2ecba335fd1 | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS,maxLS,tolX,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function value at starting lo... |
github | wittawatj/l1lsmi-master | minFunc_processInputOptions.m | .m | l1lsmi-master/3rdparty/L1General/minFunc/minFunc_processInputOptions.m | 3,252 | utf_8 | 72f66f58081120213a4f63f1bb4f42df |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,tolFun,tolX,method,...
corrections,c1,c2,LS_init,LS,cgSolve,SR1,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
DerivativeCheck,Damped,HvFunc,bbType,cycle,boundStepLength,...
HessianIter,outputFcn] = .... |
github | wittawatj/l1lsmi-master | cheby0.m | .m | l1lsmi-master/3rdparty/cvx/sdpt3/Examples/cheby0.m | 2,576 | utf_8 | a31e95ee5e80694cd1c3f2ceb594d369 | %%**********************************************************
%% cheby0:
%%
%% minimize || p(d) ||_infty
%% p = polynomial of degree <= m such that p(0) = 1.
%%
%% Here d = n-vector
%%----------------------------------------------------------
%% [blk,Avec,C,b,X0,y0,Z0,objval,p] = cheby0(d,m,solve);
%%
%% d ... |
github | wittawatj/l1lsmi-master | randmat.m | .m | l1lsmi-master/3rdparty/cvx/sdpt3/Solver/randmat.m | 731 | utf_8 | 8dd81b149ece99e621e47e5ea60fd114 | %%******************************************************
%% randmat: generate an mxn matrix using matlab's
%% rand or randn functions using state = k.
%%
%%******************************************************
function v = randmat(m,n,k,randtype)
try
s = rng;
rng(k);
if strcmp(randtype,'n')
... |
github | wittawatj/l1lsmi-master | make.m | .m | l1lsmi-master/3rdparty/cvx/examples/make.m | 22,776 | utf_8 | 8b9d0b0da199dd51502ba4c1befd4986 | function make( varargin )
%
% Determine the base path
%
odir = cd;
try
base = dbstack( '-completenames' );
base = base(1);
base = base.file;
catch
base = dbstack;
base = base(1);
base = base.name;
end
base = fileparts( base );
fclose all;
close all;
%
% Check the force and runonly flags
%
ar... |
github | wittawatj/l1lsmi-master | cantilever_beam_plot.m | .m | l1lsmi-master/3rdparty/cvx/examples/cvxbook/Ch04_cvx_opt_probs/cantilever_beam_plot.m | 1,050 | utf_8 | e8c8c9e1b601e4102f96e0436649d132 | % Plots a cantilever beam as a 3D figure.
% This is a helper function for the optimal cantilever beam example.
%
% Inputs:
% values: an array of heights and widths of each segment
% [h1 h2 ... hN w1 w2 ... wN]
%
% Almir Mutapcic 01/25/06
function cantilever_beam_plot(values)
N = length(values)/2;
for k ... |
github | wittawatj/l1lsmi-master | simple_step.m | .m | l1lsmi-master/3rdparty/cvx/examples/circuit_design/simple_step.m | 235 | utf_8 | b8043326fe5966f9432b69b584891e0f | % Computes the step response of a linear system
function X = simple_step(A,B,DT,N)
n = size(A,1);
Ad = expm( full( A * DT ) );
Bd = ( Ad - eye(n) ) * B;
Bd = A \ Bd;
X = zeros(n,N);
for k = 2 : N,
X(:,k) = Ad*X(:,k-1)+Bd;
end
|
github | wittawatj/l1lsmi-master | spectral_fact.m | .m | l1lsmi-master/3rdparty/cvx/examples/filter_design/spectral_fact.m | 1,292 | utf_8 | 014eebfa2dfbbd038c1383ff2ef97b0e | % Spectral factorization using Kolmogorov 1939 approach.
% (code follows pp. 232-233, Signal Analysis, by A. Papoulis)
%
% Computes the minimum-phase impulse response which satisfies
% given auto-correlation.
%
% Input:
% r: top-half of the auto-correlation coefficients
% starts from 0th element to end of the au... |
github | wittawatj/l1lsmi-master | polar_plot_ant.m | .m | l1lsmi-master/3rdparty/cvx/examples/antenna_array_design/polar_plot_ant.m | 1,149 | utf_8 | 34a08a3bc75c474d61e01ea58b16e54e | % Plot a polar plot of an antenna array sensitivity
% with lines denoting the target direction and beamwidth.
% This is a helper function used in the broadband antenna examples.
%
% Inputs:
% X: an array of abs(y(theta)) where y is the antenna array pattern
% theta0: target direction
% bw: total beamw... |
github | wittawatj/l1lsmi-master | spectral_fact.m | .m | l1lsmi-master/3rdparty/cvx/examples/antenna_array_design/spectral_fact.m | 1,385 | utf_8 | 570e7ae2165d19abd477494c52e609f8 | % Spectral factorization using Kolmogorov 1939 approach
% (code follows pp. 232-233, Signal Analysis, by A. Papoulis)
%
% Computes the minimum-phase impulse response which satisfies
% given auto-correlation.
%
% Input:
% r: top-half of the auto-correlation coefficients
% starts from 0th element to end of the aut... |
github | wittawatj/l1lsmi-master | plotgraph.m | .m | l1lsmi-master/3rdparty/cvx/examples/graph_laplacian/plotgraph.m | 3,172 | utf_8 | a46b1d761798c492e96a5b9504aea9aa | function plotgraph(A,xy,weights)
% Plots a graph with each edge width proportional to its weight.
%
% Edges with positive weights are drawn in blue; negative weights in red.
%
% Input parameters:
% A --- incidence matrix of the graph (size is n x m)
% (n is the number of nodes and m is the number of e... |
github | wittawatj/l1lsmi-master | disp.m | .m | l1lsmi-master/3rdparty/cvx/lib/@cvxprob/disp.m | 5,342 | utf_8 | c7d4f1798c1fe6afff368b38f460f115 | function disp( prob, prefix )
if nargin < 2, prefix = ''; end
global cvx___
p = cvx___.problems( index( prob ) );
if isempty( p.variables ),
nvars = 0;
else
nvars = length( fieldnames( p.variables ) );
end
if isempty( p.duals ),
nduls = 0;
else
nduls = length( fieldnames( p.duals ) );
end
neqns = ( l... |
github | wittawatj/l1lsmi-master | apply.m | .m | l1lsmi-master/3rdparty/cvx/lib/@cvxtuple/apply.m | 744 | utf_8 | f2da301079043e6e789dc429ca7d060b | function y = apply( func, x )
y = do_apply( func, x.value_ );
function y = do_apply( func, x )
global cvx___
switch class( x ),
case 'struct',
y = cell2struct( do_apply( func, struct2cell( x ) ), fieldnames( x ), 1 );
case 'cell',
if cvx___.hcellfun,
y = cellfun( func, x, 'UniformOu... |
github | wittawatj/l1lsmi-master | testall.m | .m | l1lsmi-master/3rdparty/cvx/lib/@cvxtuple/testall.m | 674 | utf_8 | 21ffb9bdf2b39de834fadf2074c36667 | function y = testall( func, x )
y = do_test( func, x.value_ );
function y = do_test( func, x )
global cvx___
switch class( x ),
case 'struct',
y = do_test( func, struct2cell( x ) );
case 'cell',
if cvx___.hcellfun,
y = all( cellfun( func, x ) );
else
y = true;
... |
github | wittawatj/l1lsmi-master | disp.m | .m | l1lsmi-master/3rdparty/cvx/lib/@cvxtuple/disp.m | 1,260 | utf_8 | 1eef0644949e0e9257e06d734492404e | function disp( x, prefix )
if nargin < 2,
prefix = '';
end
disp( [ prefix, 'cvx tuple object: ' ] );
prefix = [ prefix, ' ' ];
do_disp( x.value_, {}, prefix, prefix, '' );
function do_disp( x, f, fprefix, prefix, suffix )
switch class( x ),
case 'struct',
do_disp( struct2cell(x), fieldnames(x), fpref... |
github | wittawatj/l1lsmi-master | sparsify.m | .m | l1lsmi-master/3rdparty/cvx/lib/@cvx/sparsify.m | 4,056 | utf_8 | 57206a60ff65cce033f4c3a1245756c0 | function x = sparsify( x, mode )
global cvx___
error( nargchk( 2, 2, nargin ) );
persistent remap
%
% Check mode argument
%
if ~ischar( mode ) || size( mode, 1 ) ~= 1,
error( 'Second arugment must be a string.' );
end
isobj = strcmp( mode, 'objective' );
pr = cvx___.problems( end );
touch( pr.self, x );
bz = x.... |
github | wittawatj/l1lsmi-master | rotlorentz.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/rotlorentz.m | 1,689 | utf_8 | a62c3fb740f53474f5ddec5c0b427e4a | % c = rotlorentz(c,K)
% Rotates vectors from Qcone to Rcone or from Rcone into Qcone.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function c = rotlorentz(c,K)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CANA... |
github | wittawatj/l1lsmi-master | PopK.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/PopK.m | 2,004 | utf_8 | d538cca0b063c319f06b081fb630b693 | % [y, ddotx, Dx, xTy] = PopK(d,x,K,lpq)
% POPK Implements the quadratic operator for symmetric cones K.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [y, ddotx, Dx, xTy] = PopK(d,x,K,lpq)
%
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Rom... |
github | wittawatj/l1lsmi-master | updtransfo.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/updtransfo.m | 4,579 | utf_8 | 43632dc5a4d14a6ecae6a65ced31e9d8 | % [d,vfrm] = updtransfo(x,z,w, dIN,K)
% UPDTRANSFO Updated the Nesterov-Todd transformation using a
% numerically stable method.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [d,vfrm] = updtransfo(x,z,w, dIN,K)
%
% This file is part of SeDuM... |
github | wittawatj/l1lsmi-master | symbcholden.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/symbcholden.m | 2,500 | utf_8 | cc5a9a455c0e83c00738b400bc5da871 | % Lden = symbcholden(L,dense,DAt)
% SYMBCHOLDEN Creates Lden.{LAD, perm,dz, sign, first}
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi, dpr1fact
function Lden = symbcholden(L,dense,DAt)
%
% This file is part of SeDuMi 1.1 by Im... |
github | wittawatj/l1lsmi-master | eyeK.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/eyeK.m | 1,797 | utf_8 | 0252b95ec6217457c73f79e8d7fcf42c | % eyeK Identity w.r.t. symmetric cone.
% x = eyeK(K) produces the identity solution w.r.t. the symmetric cone,
% that is described by the structure K. This is the vector for which
% eigK(x) is the all-1 vector.
%
% See also eigK.
function x = eyeK(K) %#ok
% This file is part of SeDuMi 1.1 by Imre Polik an... |
github | wittawatj/l1lsmi-master | sparfwslv.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sparfwslv.m | 2,219 | utf_8 | 06e89169ef2854a6853160556843a207 | % SPARFWSLV Solves block sparse upper-triangular system.
% y = sparfwslv(L,b) yields the same result as
% y = L.L\b(L.perm,:)
% However, SPARFWSLV is faster than the built-in operator "\",
% because it uses dense linear algebra and loop-unrolling on
% supernodes.
%
% For sparse b, one should... |
github | wittawatj/l1lsmi-master | fwdpr1.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/fwdpr1.m | 1,841 | utf_8 | 0f9afe36b16be725a362b2c07ee757ad | % y = fwdpr1(Lden, b)
% FWDPR1 Solves "PROD_k L(pk,betak) * y = b", where
% where L(p,beta) = eye(n) + tril(p*beta',-1).
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi, dpr1fact, bwdpr1
function y = fwdpr1(Lden, b) %#ok
%
% This f... |
github | wittawatj/l1lsmi-master | sortnnz.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/sortnnz.m | 1,963 | utf_8 | 08ac82cfa8f3f46775a8bcab4c200c79 | % perm = sortnnz(At,Ajc1,Ajc2)
% SORTNNZ Sorts columns in At
% in increasing order of nnzs; only the nnzs between Ajc1 and Ajc2
% are considered for each column. If Ajc1 or Ajc2 is empty, we use
% the start or end of the columns in At.
%
% ******************** INTE... |
github | wittawatj/l1lsmi-master | loopPcg.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/loopPcg.m | 6,098 | utf_8 | 9ace09d37bb5be74ffa5c03914a6ff6d | % [y,k, DAy] = loopPcg(L,Lden,At,dense,d, DAt,K, b,p,ssqrNew,cgpars, restol)
%
% LOOPPCG Solve y from AP(d)A' * y = b
% using PCG-method and Cholesky L as conditioner.
% If L is sufficiently accurate, then only 1 CG-step is needed.
% It assumes that the previous step was p, with
% ssqrNew = bOld'*inv(L*THETA*L')*bOld, ... |
github | wittawatj/l1lsmi-master | finsymbden.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/finsymbden.m | 2,092 | utf_8 | 8cfe85fb1c2fd22a5aca5ca9338be414 | % Lden = finsymbden(LAD,perm,dz,firstq)
% FINSYMBDEN Updates perm and dz by inserting the
% last Lorentz trace columns (last columns of LAD). It creates the fields
% Lden.sign - +1 for "normal" columns, -1 for Lorentz trace columns
% Lden.first - First pivot column that will affec... |
github | wittawatj/l1lsmi-master | getDAtm.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/getDAtm.m | 1,959 | utf_8 | f378e638faeb4f3d673dca3c0cc6faa4 | % DAt = getDAtm(A,Ablkjc,dense,DAtdenq,d,K)
% GETDATM Computes d[k]'*Aj[k] for each lorentz block k and constraint j.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi, getada2.
function DAt = getDAtm(A,Ablkjc,dense,DAtdenq,d,K)
%
% Thi... |
github | wittawatj/l1lsmi-master | findblks.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/findblks.m | 2,000 | utf_8 | bd8835a2768ab06f1b1e3a58f0f4a46c | % Ablk = findblks(At,Ablkjc,blk0,blk1,blkstart)
% FINDBLKS Find nonzero blocks
% in A, with subscripts per column bounded bij Ablkjc([blk0,blk1]),
% block partitioned by blkstart.
% If blk0 < 1 (blk1 > size(Ablkjc,2)) then start (stop) searching at column
% start (end) of A.
%
% *******... |
github | wittawatj/l1lsmi-master | invcholfac.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/invcholfac.m | 1,822 | utf_8 | 3a547f6ac5536f25538c633e12f35fb5 | % y = invcholfac(u,K, perm)
% INVCHOLFAC Computes y(perm,perm) = u' * u, with u upper triangular.
%
% ******************** INTERNAL FUNCTION OF SEDUMI ********************
%
% See also sedumi, getada3
function y = invcholfac(u,K, perm) %#ok
%
% This file is part of Se... |
github | wittawatj/l1lsmi-master | qframeit.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/qframeit.m | 1,731 | utf_8 | 5fa5e8c33ccbf6235d2065a5da6e9cb1 | % x = qframeit(lab,frmq,K)
%
% *********************** INTERNAL FUNCTION OF SEDUMI *******************
%
% See also sedumi
% This file is part of SeDuMi 1.1 by Imre Polik and Oleksandr Romanko
% Copyright (C) 2005 McMaster University, Hamilton, CANADA (since 1.1)
%
% Copyright (C) 2001 Jos F. Sturm (up to 1.05R5)
%... |
github | wittawatj/l1lsmi-master | incorder.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/incorder.m | 2,148 | utf_8 | e4517f7e2abf908ef0c7b63dd9bda840 | % [perm, dz] = incorder(At [,Ajc1,ifirst])
% INCORDER
% perm sorts the columns of At greedily, by iteratively picking
% the 1st unprocessed column with the least number of nonzero
% subscripts THAT ARE NOT YET COVERED (hence incremental) by
% the previously processed columns.
% dz has t... |
github | wittawatj/l1lsmi-master | qreshape.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/qreshape.m | 1,964 | utf_8 | 367b50e8acb172515d8a40d54556900d | % y = qreshape(x,flag, K)
% QRESHAPE Reshuffles entries associated with Lorentz blocks.
% If flag = 0 then y = [x1 for each block; x2 for each block]
% If flag = 1 then y = [x block 1; x block 2; etc], etc
% Thus, x = qreshape(qreshape(x,0,K),1,K).
%
% ***************... |
github | wittawatj/l1lsmi-master | dpr1fact.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/dpr1fact.m | 2,087 | utf_8 | 61bcf331dc52ef7c5e531e8da99881eb | % [Lden,L.d] = dpr1fact(x, d, Lsym, smult, maxu)
% DPR1FACT Factor d[iag] p[lus] r[ank] 1:
% [Lden,L.d] = dpr1fact(x, d, Lsym, smult, maxu)
% Computes fi and d such that
% diag(d_IN) + x*diag(smult)*x' =
%(PI_{i=1}^n L(p_OUT^i,beta_i)) * diag(d_OUT) * (PI_{i=1}^n L(p_OUT^i,bet... |
github | wittawatj/l1lsmi-master | iswnbr.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/iswnbr.m | 4,342 | utf_8 | f741e1b252f52497df901bc7347aa5bb | % [delta,h,alpha] = iswnbr(vSQR,thetaSQR)
% ISWNBR Checks feasibility w.r.t. wide region/neighborhood of Sturm-Zhang.
% vTAR:= (1-alpha)*max(h,v) projection v onto theta-central region
% delta = (sqrt(n)/theta) * norm(vTAR - v) / norm(v)
%
% ********** INTERNAL FUNCTION OF SEDUMI ******... |
github | wittawatj/l1lsmi-master | fwblkslv.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/fwblkslv.m | 1,964 | utf_8 | bad9f508dbd7821eb7cc643c837cd992 | % FWBLKSLV Solves block sparse upper-triangular system.
% y = fwblkslv(L,b) yields the same result as
% y = L.L\b(L.perm,:)
% However, FWBLKSLV is faster than the built-in operator "\",
% because it uses dense linear algebra and loop-unrolling on
% supernodes.
%
% Typical use, with X sparse ... |
github | wittawatj/l1lsmi-master | trydif.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/trydif.m | 2,489 | utf_8 | 11997f7d1de309ae4f154ae656362f9d | % [t,wr,w] = trydif(t,wrIN,wIN, x,z, pars,K)
% TRYDIF Tries feasibility of differentiated step length w.r.t.
% wide region and its neighborhood.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi, stepdif
function [t,wr,w] = trydif(t,wrIN,wIN, x,z, pars,K)
%
% This file is p... |
github | wittawatj/l1lsmi-master | asmDxq.m | .m | l1lsmi-master/3rdparty/cvx/sedumi/asmDxq.m | 2,735 | utf_8 | 4021e5a1dc8a445ad7e30c2170dbf01a | % y = asmDxq(d, x, K [, ddotx])
% ASMDXQ Assemble y = D(d)x for x in Lorentz part of K.
% [y,t] = AasmDxq(d, x, K [, ddotx]) then y[k]+t(k)*d[k] = D(dk)xk.
%
% ********** INTERNAL FUNCTION OF SEDUMI **********
%
% See also sedumi
function [y,t] = asmDxq(d, x, K, ddotx)
%
% T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.