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 | timy/texmacs-master | isplot.m | .m | texmacs-master/plugins/octave/octave/tm/isplot.m | 694 | utf_8 | dde47566d9f45b2ac9d689317b65f2a6 |
###############################################################################
##
## MODULE : isplot.m
## DESCRIPTION : Determines if we should plot
## COPYRIGHT : (C) 2021 Darcy Shen
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHATSOE... |
github | timy/texmacs-master | tmrepl.m | .m | texmacs-master/plugins/octave/octave/tm/tmrepl.m | 2,091 | ibm852 | 5cf82cb66c7969c6fcd6b389cefbff9e |
###############################################################################
##
## MODULE : tmrepl.m
## DESCRIPTION : REPL loop
## COPYRIGHT : (C) 2004-2010 Joris van der Hoeven
## (C) 2014 François Poulain
## (C) 2020-2021 Darcy Shen
##
## This software falls under the GN... |
github | timy/texmacs-master | parse_complete.m | .m | texmacs-master/plugins/octave/octave/tm/parse_complete.m | 672 | utf_8 | 8422b13fafa71db78a9c6480f1597b57 |
###############################################################################
##
## MODULE : parse_complete.m
## DESCRIPTION : Parse Completion Command
## COPYRIGHT : (C) 2021 Darcy Shen
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHA... |
github | timy/texmacs-master | tmlasterr.m | .m | texmacs-master/plugins/octave/octave/tm/tmlasterr.m | 489 | utf_8 | d4156413169db97e3af0b715b67c7698 |
###############################################################################
##
## MODULE : tmlasterr.m
## COPYRIGHT : (C) 2004 Joris van der Hoeven
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICEN... |
github | timy/texmacs-master | isnewans.m | .m | texmacs-master/plugins/octave/octave/tm/isnewans.m | 881 | ibm852 | 1009ac2f17f3d134718f11eb2a895471 |
###############################################################################
##
## MODULE : isnewans.m
## DESCRIPTION : Determines if we should display an answer
## COPYRIGHT : (C) 2004 Joris van der Hoeven
## (C) 2014 François Poulain
## (C) 2020 Darcy Shen
##
## This... |
github | timy/texmacs-master | tmdisp.m | .m | texmacs-master/plugins/octave/octave/tm/tmdisp.m | 703 | utf_8 | 00d307554de35eaf72400782970e5d3c |
###############################################################################
##
## MODULE : tmdisp.m
## DESCRIPTION : Displays the Octave object via the TeXmacs interface
## COPYRIGHT : (C) 2002 Michael Graffam mikegraffam@yahoo.com
## 2004 Joris van der Hoeven
##
## This software falls u... |
github | timy/texmacs-master | unquote.m | .m | texmacs-master/plugins/octave/octave/kernel/unquote.m | 632 | utf_8 | 5bde94361111557fccfbdcc5a35f1c5a |
###############################################################################
##
## MODULE : unquote.m
## DESCRIPTION : unquote a string
## COPYRIGHT : (C) 2021 Darcy Shen
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHATSOEVER. For det... |
github | timy/texmacs-master | ends_with.m | .m | texmacs-master/plugins/octave/octave/kernel/ends_with.m | 530 | utf_8 | d0103259fb0f06664039dc1d6d329208 |
###############################################################################
##
## MODULE : ends_with.m
## DESCRIPTION : Test if a string ends with
## COPYRIGHT : (C) 2021 Darcy Shen
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHATSOEVE... |
github | timy/texmacs-master | starts_with.m | .m | texmacs-master/plugins/octave/octave/kernel/starts_with.m | 518 | utf_8 | 42fa5ba9b5759fc5bc78d263c519fbe2 |
###############################################################################
##
## MODULE : starts_with.m
## DESCRIPTION : Test if a string starts with
## COPYRIGHT : (C) 2021 Darcy Shen
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHATS... |
github | timy/texmacs-master | dquote.m | .m | texmacs-master/plugins/octave/octave/kernel/dquote.m | 491 | utf_8 | 67d306837b4fc39604325d9a21523ba0 |
###############################################################################
##
## MODULE : dquote.m
## DESCRIPTION : dquote a string
## COPYRIGHT : (C) 2020 Darcy Shen
##
## This software falls under the GNU general public license version 3 or later.
## It comes WITHOUT ANY WARRANTY WHATSOEVER. For detai... |
github | cszn/FFDNet-master | Cal_PSNRSSIM.m | .m | FFDNet-master/utilities/Cal_PSNRSSIM.m | 6,569 | utf_8 | c726759a14c4754004b2fbbec4ebbf36 | function [psnr_cur, ssim_cur] = Cal_PSNRSSIM(A,B,row,col)
[n,m,ch]=size(B);
A = A(row+1:n-row,col+1:m-col,:);
B = B(row+1:n-row,col+1:m-col,:);
A=double(A); % Ground-truth
B=double(B); %
e=A(:)-B(:);
mse=mean(e.^2);
psnr_cur=10*log10(255^2/mse);
if ch==1
[ssim_cur, ~] = ssim_index(A, B);
else
... |
github | cszn/FFDNet-master | model_init_FFDNet_gray.m | .m | FFDNet-master/TrainingCodes/FFDNet_TrainingCodes_v1.0/model_init_FFDNet_gray.m | 2,824 | utf_8 | f72ef6df0ddf9b9959ebba4d7ec8e9f5 |
function net = model_init_FFDNet_gray
lr11 = [1 1];
lr10 = [1 0];
weightDecay = [1 1];
nCh = 64; % number of channels
fSz = 3; % fize size
nNm = 1; % number of noise level map
useBnorm = 0; % if useBnorm = 0, you should also use adam.
nsubimage = 4; % 4 for grayscale image, 12 for color image
% Define networ... |
github | cszn/FFDNet-master | model_train.m | .m | FFDNet-master/TrainingCodes/FFDNet_TrainingCodes_v1.0/model_train.m | 9,175 | utf_8 | 614e813f6525a25d76e1b2cdd7b584cf | function [net, state] = model_train(net, varargin)
% simple code
% The function automatically restarts after each training epoch by
% checkpointing.
%
% The function supports training on CPU or on one or more GPUs
% (specify the list of GPU IDs in the `gpus` option).
% Copyright (C) 2014-16 Andrea Veda... |
github | cszn/FFDNet-master | Cal_PSNRSSIM.m | .m | FFDNet-master/TrainingCodes/FFDNet_TrainingCodes_v1.0/utilities/Cal_PSNRSSIM.m | 6,569 | utf_8 | c726759a14c4754004b2fbbec4ebbf36 | function [psnr_cur, ssim_cur] = Cal_PSNRSSIM(A,B,row,col)
[n,m,ch]=size(B);
A = A(row+1:n-row,col+1:m-col,:);
B = B(row+1:n-row,col+1:m-col,:);
A=double(A); % Ground-truth
B=double(B); %
e=A(:)-B(:);
mse=mean(e.^2);
psnr_cur=10*log10(255^2/mse);
if ch==1
[ssim_cur, ~] = ssim_index(A, B);
else
... |
github | lxmzb/Artificial-Bee-Colony-Algorithm1-master | GreedySelection.m | .m | Artificial-Bee-Colony-Algorithm1-master/GreedySelection.m | 1,109 | utf_8 | 01aee25215f23518c5b2fab80fc2c2bc |
function [Colony Obj Fit oBas]=GreedySelection(Colony1,Colony2,ObjEmp,ObjEmp2,FitEmp,FitEmp2,fbas,ABCOpts,i) % [Employed ObjEmp FitEmp Bas]=GreedySelection(Employed,Employed2,ObjEmp,ObjEmp2,FitEmp,FitEmp2,Bas,ABCOpts);
oBas=fbas;
Obj=ObjEmp;
Fit=FitEmp;
Colony=Colony1;
if (nargin==8) %Inside the body of a user-defi... |
github | copenhaver/trimmedlasso-master | tl_apx_envelope.m | .m | trimmedlasso-master/MATLAB/tl_apx_envelope.m | 863 | utf_8 | 2d6d3bb0651d8ffa7bb8f8bac283b54b | %%%
% A MATLAB implementation of algorithms from BCM17
% Written by Martin S. Copenhaver (www.mit.edu/~mcopen)
%%%
function [betar] = tl_apx_envelope(p,k,y,X,mu,lambda)
% throwbinding is considered an optional final argument
if nargin ~= 6
disp('Incorrect number of arguments provided. Halting executi... |
github | copenhaver/trimmedlasso-master | instance_creator.m | .m | trimmedlasso-master/MATLAB/instance_creator.m | 1,251 | utf_8 | a3138a062772c38f270fddadcab31552 | % Creates problem instances for use in the demo (demo.m)
% Written by Martin S. Copenhaver (www.mit.edu/~mcopen)
function [y, X, beta0] = instance_creator(n,p,k,SNR,egclass)
SS = eye(p,p);
beta0 = zeros(p,1);
%% based on class, develop special example
if egclass == 1
rho = 0.8;
ir... |
github | copenhaver/trimmedlasso-master | tl_exact_bigM.m | .m | trimmedlasso-master/MATLAB/tl_exact_bigM.m | 1,475 | utf_8 | 16965c1b541c07762d7f4dee27ac8cbc | %%%
% A MATLAB implementation of exact algorithm from BCM17
% for solving trimmed Lasso problem
% Written by Martin S. Copenhaver (www.mit.edu/~mcopen)
%%%
function [betar] = tl_exact_bigM(p,k,y,X,mu,lambda,bigM,throwbinding)
% throwbinding is an optional final argument
if nargin == 7
throwbinding = ... |
github | copenhaver/trimmedlasso-master | tl_apx_altmin.m | .m | trimmedlasso-master/MATLAB/tl_apx_altmin.m | 2,157 | utf_8 | 1201a883299460b70d6255e3db98964b | %%%
% A MATLAB implementation of Algorithm 1 from BCM17
% Written by Martin S. Copenhaver (www.mit.edu/~mcopen)
%%%
function [betar] = tl_apx_altmin(p,k,y,X,mu,lambda,tol,max_iters)
% check argument count (final two arguments, tol and max_iters, are optional)
if (nargin ~= 6) && (nargin ~=7) && (nargin ~= 8)... |
github | ridhomahesa/Brain-Tumor-Classification-master | brain_tumor_classify.m | .m | Brain-Tumor-Classification-master/brain_tumor_classify.m | 29,726 | utf_8 | 8e933ef90006a20e14adc422f774fb78 | function varargout = brain_tumor_classify(varargin)
% BRAIN_TUMOR_CLASSIFY MATLAB code for brain_tumor_classify.fig
% BRAIN_TUMOR_CLASSIFY, by itself, creates a new BRAIN_TUMOR_CLASSIFY or raises the existing
% singleton*.
%
% H = BRAIN_TUMOR_CLASSIFY returns the handle to a new BRAIN_TUMOR_CLASSIFY or t... |
github | HongtengXu/Quaternion-Sparse-Coding-master | Qmult.m | .m | Quaternion-Sparse-Coding-master/Quaternion dictionary training in KQSVD/Qmult.m | 612 | utf_8 | 4e983c570ce27c601be1085012e07d1b | % input a and b are quaternion matrices
% output y is also a quaternion matrix, which is the result of the
% multiplication of input a and b
function y = Qmult(a,b)
[ax, ay] = size(a(:,:,1));
[bx, by] = size(b(:,:,1));
y = zeros(ax, by, 4);
y(:,:,1) = a(:,:,1)*b(:,:,1) - a(:,:,2)*b(:,:,2) - a(:,:,3)*b(:,:,3) - a... |
github | HongtengXu/Quaternion-Sparse-Coding-master | Qmult.m | .m | Quaternion-Sparse-Coding-master/Color Image denoising using KQSVD/Qmult.m | 612 | utf_8 | 4e983c570ce27c601be1085012e07d1b | % input a and b are quaternion matrices
% output y is also a quaternion matrix, which is the result of the
% multiplication of input a and b
function y = Qmult(a,b)
[ax, ay] = size(a(:,:,1));
[bx, by] = size(b(:,:,1));
y = zeros(ax, by, 4);
y(:,:,1) = a(:,:,1)*b(:,:,1) - a(:,:,2)*b(:,:,2) - a(:,:,3)*b(:,:,3) - a... |
github | CU-UQ/BASE_PC-master | mcmc_sampler.m | .m | BASE_PC-master/base_pc_v1/sampler/mcmc_sampler.m | 4,322 | utf_8 | 3fed14a180a022ec214c0720e115a9ff | % generates samples via mcmc for sample initialization
% -----
% sample = mcmc_sampler(sample, basis, n_samps, sample_opt, eval_opt)
% -----
% Input
% -----
% sample = sample object
% basis = basis object
% n_samps = number of samples to generate
% samp_opt = options for sampling inputs
% eval_opt = options for evalua... |
github | CU-UQ/BASE_PC-master | sample_expand.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_expand.m | 4,990 | utf_8 | 6c3eac20ae823b7d8d26754c12d08018 | % applies correction sampling to sample_old
% -----
% sample_new = sample_expand(basis, sample_old, sample_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample_old = sample object
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% ... |
github | CU-UQ/BASE_PC-master | sample_adjust.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_adjust.m | 888 | utf_8 | 637cfdf3e5745bc2c3a5d6b903521cf6 | % adjusts sample for use with basis
% -----
% sample = sample_adjust(basis, sample, sample_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample_old = sample object
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% sample = sample ... |
github | CU-UQ/BASE_PC-master | rv_gen.m | .m | BASE_PC-master/base_pc_v1/sampler/rv_gen.m | 1,514 | utf_8 | e0291daf017d6ec6eccc149e4f94bcff | % Generates random variable from orthogonality distribution (no importance sampling)
% -----
% [rv, p] = rv_gen(opt)
% -----
% Input
% -----
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% rv = random vector
% p = probability of draw
function [rv,p] = rv_gen(eval_opt)
rv = zeros(1,eva... |
github | CU-UQ/BASE_PC-master | sample_init.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_init.m | 1,673 | utf_8 | 6ffeb22a5d108b87a783ff0add89fbc5 | % constructs sample opbject
% -----
% sample = sample_init(basis, sample_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% sample = sample object
function sample = sample_init(basis, sa... |
github | CU-UQ/BASE_PC-master | orth_sampler.m | .m | BASE_PC-master/base_pc_v1/sampler/orth_sampler.m | 1,330 | utf_8 | c2bebcfd3b01de5153e0939b11aa265b | % constructs sample object through sampling of orthogonality distribution
% -----
% sample = orth_sampler(basis, sample_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample_opt = options for sampling inputs
% sample_opt.n_workers = number of workers in pool
% sample_opt.initial_size = number of sa... |
github | CU-UQ/BASE_PC-master | mcmc_sampler_with_flag.m | .m | BASE_PC-master/base_pc_v1/sampler/mcmc_sampler_with_flag.m | 3,816 | utf_8 | f089dbb3b46950a0b9b1cbb4c1b436ac | % generates samples via mcmc with potential to flow flags in weight evaluation
% -----
% [sample,flag] = mcmc_sampler_with_flag(basis, n_samps, samp_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% n_samps = number of samples to generate
% sample_opt = options for sampling inputs
% eval_opt = options fo... |
github | CU-UQ/BASE_PC-master | sample_identify.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_identify.m | 796 | utf_8 | 8a8698b98d6d0ac74b07be10d0ab6f1f | % updates sample object
% -----
% sample = sample_identify(basis, sample, sample_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample = sample object
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% sample = sample object
functio... |
github | CU-UQ/BASE_PC-master | mcmc_correction_sampler.m | .m | BASE_PC-master/base_pc_v1/sampler/mcmc_correction_sampler.m | 4,763 | utf_8 | 01aa40ce88fad56dbfdc1ef9f3878e52 | % generates samples via mcmc for sample correction
% -----
% [sample, flag] = mcmc_sampler_basis_correction(sample, basis, n_samps, sample_opt, eval_opt)
% -----
% Input
% -----
% sample = sample object
% basis = basis object
% n_samps = number of samples to generate
% sample_opt = options for sampling inputs
% eval_o... |
github | CU-UQ/BASE_PC-master | proposal_sampler.m | .m | BASE_PC-master/base_pc_v1/sampler/proposal_sampler.m | 1,477 | utf_8 | 1efb3c649c639a4a8d4c1f2839ab15ba | % constructs sample object through sampling of specified distribution
% -----
% sample = proposal_sampler(basis, sample_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample_opt = options for sampling inputs
% sample_opt.n_workers = number of workers in pool
% sample_opt.initial_size = number of sa... |
github | CU-UQ/BASE_PC-master | orth_prop.m | .m | BASE_PC-master/base_pc_v1/sampler/proposals/orth_prop.m | 598 | utf_8 | 1b8faf0a6b676b9c97a772408bb10b0a | % proposal distribution based on orthogonality distribution
% -----
% [rv,p,p_rat] = orth_prop(sample_opt, eval_opt)
% -----
% Input
% -----
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% rv = sampled inputs
% p = probability of sample in orthog... |
github | CU-UQ/BASE_PC-master | asym_prop.m | .m | BASE_PC-master/base_pc_v1/sampler/proposals/asym_prop.m | 2,390 | utf_8 | 52af04e11e75008324d656c8426e27c8 | % proposal distribution based on asymptotically motivated distributions depending on inputs
% -----
% [rv,p,p_rat] = asym_prop(sample_opt, eval_opt)
% -----
% Input
% -----
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% rv = sampled inputs
% p =... |
github | CU-UQ/BASE_PC-master | herm_elliptic_prop.m | .m | BASE_PC-master/base_pc_v1/sampler/proposals/herm_elliptic_prop.m | 1,160 | utf_8 | ce3a24a1213c8bb0c2773d5f0bce2fd6 | % proposal distribution from ellipsoid for use with Hermite polynomials
% -----
% [rv,p,p_rat] = herm_elliptic_prop(sample_opt, eval_opt)
% -----
% Input
% -----
% sample_opt = options for sampling inputs
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% rv = sampled inputs
% p = probabilit... |
github | CU-UQ/BASE_PC-master | herm_sphere_prop.m | .m | BASE_PC-master/base_pc_v1/sampler/proposals/herm_sphere_prop.m | 1,059 | utf_8 | dc432bb7e96bed40675363720a2760f1 | % proposal distribution from sphere for use with Hermite polynomials
% -----
% [rv,p,p_rat] = herm_sphere_prop(sample_opt, eval_opt)
% -----
% Input
% -----
% sample_opt = options for sampling inputs
% sample_opt.order = order (total-order) of PCE used for determining radius
% sample_opt.r_dim = dimension of input
... |
github | CU-UQ/BASE_PC-master | linf_correction_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/linf_correction_w.m | 807 | utf_8 | d69e9fa4d43a1bd4d70cb4c0efa3b41a | % weight function for correction of l1 coherence-optimal sampling
% -----
% [w, t_c, flag] = linf_correction_w(lhs_new, lhs_old, sample_opt)
% -----
% Input
% -----
% lhs_new = vector to associate with weight, associated with a single input
% lhs_old = same input from old basis to be corrected from
% sample_opt = optio... |
github | CU-UQ/BASE_PC-master | one_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/one_w.m | 365 | utf_8 | 5636336170713c1fa6550cde8d8e5898 | % unit weight function, useful for draws from orthogonality distribution
% -----
% w = one_w(lhs,sample_opt)
% -----
% Input
% -----
% lhs = vector to associate with weight, associated with a single input
% sample_opt = options for sampling inputs
% ------
% Output
% ------
% w = weight value to be paired with lhs
func... |
github | CU-UQ/BASE_PC-master | l2_grad_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/l2_grad_w.m | 574 | utf_8 | 4e77258494c31b35e5ef9b4b251bbc11 | % weight function with l_2 norm for use with gradients
% -----
% w = l2_grad_w(lhs,sample_opt)
% -----
% Input
% -----
% lhs = vector to associate with weight, associated with a single input
% sample_opt = options for sampling inputs
% ------
% Output
% ------
% w = weight value to be paired with lhs
function w = l2_gr... |
github | CU-UQ/BASE_PC-master | p_rat_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/p_rat_w.m | 405 | utf_8 | d2994a8fae10fa0e804e04a994cf1e12 | % p_rat weight function, useful for draws from proposal distribution that
% are not passed through mcmc sampler
% -----
% w = p_rat_w(lhs,sample_opt) % Actually depends on rv not lhs
% -----
% Input
% -----
% p_rat = ratio of proposal distribution to orthogonality distribution
% ------
% Output
% ------
% w = weight va... |
github | CU-UQ/BASE_PC-master | l2_correction_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/l2_correction_w.m | 934 | utf_8 | 3fe063279480f447cf92beb37d4792e2 | % weight function for correction of l2 coherence-optimal sampling
% -----
% [w, t_c, flag] = l2_correction_w(lhs_new, lhs_old, sample_opt)
% -----
% Input
% -----
% lhs_new = vector to associate with weight, associated with a single input
% lhs_old = same input from old basis to be corrected from
% sample_opt = options... |
github | CU-UQ/BASE_PC-master | linf_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/linf_w.m | 392 | utf_8 | e5c2f9588ae8df6f460891e372ffbd74 | % weight function with l_infinity norm, useful for l1-coherence optimal sampling
% -----
% w = linf_w(lhs,sample_opt)
% -----
% Input
% -----
% lhs = vector to associate with weight, associated with a single input
% sample_opt = options for sampling inputs
% ------
% Output
% ------
% w = weight value to be paired with... |
github | CU-UQ/BASE_PC-master | l2_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/l2_w.m | 380 | utf_8 | 2face1df4de57be7d35858153ca1b89c | % weight function with l_2 norm, useful for l2-coherence optimal sampling
% -----
% w = l2_w(lhs,sample_opt)
% -----
% Input
% -----
% lhs = vector to associate with weight, associated with a single input
% sample_opt = options for sampling inputs
% ------
% Output
% ------
% w = weight value to be paired with lhs
func... |
github | CU-UQ/BASE_PC-master | linf_grad_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/linf_grad_w.m | 591 | utf_8 | 19109078114f45eac72c52758395356d | % weight function with l_inf norm for use with gradients
% -----
% w = linf_grad_w(lhs,sample_opt)
% -----
% Input
% -----
% lhs = vector to associate with weight, associated with a single input
% sample_opt = options for sampling inputs
% ------
% Output
% ------
% w = weight value to be paired with lhs
function w = l... |
github | CU-UQ/BASE_PC-master | one_correction_w.m | .m | BASE_PC-master/base_pc_v1/sampler/sample_weight_functions/one_correction_w.m | 506 | utf_8 | 39cd398b8f224b407f8d475a2f3521b3 | % weight function for correction of l2 coherence-optimal sampling
% -----
% [w, t_c, flag] = one_correction_w(lhs_new, lhs_old, sample_opt)
% -----
% Input
% -----
% No input for this function, but must meet params requirement
% ------
% Output
% ------
% w = weight value to be paired with lhs_new
% t_c = used for accu... |
github | CU-UQ/BASE_PC-master | sa_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/sa_eval.m | 909 | utf_8 | 6576dd5092817ac55152361d2dfa61e8 | % Generates QoI from surface adsoprtion problem
% -----
% output = sa_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = sa_eval(... |
github | CU-UQ/BASE_PC-master | basis_handle_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/basis_handle_eval.m | 438 | utf_8 | 7863d9d170956ae11e18864e1ba17cfb | % Generates QoI from predetermined basis and coefficients
% -----
% output = basis_handle_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = ba... |
github | CU-UQ/BASE_PC-master | sa_eval_forward_euler.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/sa_eval_forward_euler.m | 891 | utf_8 | 758988254277b5c69b8a6f98aa667710 | % Generates QoI from surface adsoprtion problem
% -----
% output = sa_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = sa_eval_... |
github | CU-UQ/BASE_PC-master | duffing_hermite_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/duffing_hermite_eval.m | 552 | utf_8 | 7d03205622daeff1b06b1b67b26d10a3 | function output = duffing_hermite_eval(inputs, eval_opt)
n_runs = size(inputs,1);
output = zeros(n_runs,1);
t0 = 0;
tend = 5;
tstep = 500;
for k = 1 : n_runs
[T,x] = ode45(@(t,y)le_duffing(t,y, inputs(k,:)),linspace(t0,tend,tstep),[1; 0]');
output(k) = interp1(T,x(:,1)... |
github | CU-UQ/BASE_PC-master | white_noise_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/white_noise_eval.m | 390 | utf_8 | 39155c30e21dc199dfb3d76bb1bf2a62 | % Generates QoI that is white noise
% -----
% output = white_noise_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = white_noise_eval(input,ev... |
github | CU-UQ/BASE_PC-master | high_order_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/high_order_eval.m | 499 | utf_8 | e86a249d333bd96ff2be2e73218ef25e | % Generates QoI evaluating a high order of sum of inputs
% -----
% output = high_order_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = hig... |
github | CU-UQ/BASE_PC-master | duffing_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/duffing_eval.m | 519 | utf_8 | 456e8017872a1caec7bd4286b1a6b5d2 | function output = duffing_eval(inputs, eval_opt)
n_runs = size(inputs,1);
output = zeros(n_runs,1);
t0 = 0;
tend = 5;
tstep = 500;
for k = 1 : n_runs
[T,x] = ode45(@(t,y)le_duffing(t,y, inputs(k,:)),linspace(t0,tend,tstep),[1; 0]');
output(k) = interp1(T,x(:,1),4);
... |
github | CU-UQ/BASE_PC-master | modulated_exp_sine_decay_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/modulated_exp_sine_decay_eval.m | 799 | utf_8 | f76c54d808823848e283b916c79900e7 | % Generates QoI having exponential decay with non-monotonic decay in dimension
% -----
% output = exp_sine_decay_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated Q... |
github | CU-UQ/BASE_PC-master | exp_decay_grad_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/exp_decay_grad_eval.m | 820 | utf_8 | 52747d73a0c8f45cfeeb1ffd4ef20416 | % Generates QoI having exponential decay with gradient information
% -----
% output = exp_decay_grad_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI and gradi... |
github | CU-UQ/BASE_PC-master | zero_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/zero_eval.m | 369 | utf_8 | b01d8632982c34b55f9588919581296e | % Generates QoI that is always zero
% -----
% output = zero_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = zero_eval(input,eval_opt) %#ok<... |
github | CU-UQ/BASE_PC-master | multi_basis_handle_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/multi_basis_handle_eval.m | 610 | utf_8 | 8127e57b3699c30ff2439f72612a835b | % Generates QoI from likelihood_eval (using PC approximation)
% -----
% output = multi_basis_handle_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function ... |
github | CU-UQ/BASE_PC-master | exp_sine_decay_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/exp_sine_decay_eval.m | 576 | utf_8 | ebf6c24373a56b2753b8efce3c5a4165 | % Generates QoI having exponential decay with non-monotonic decay in dimension
% -----
% output = exp_sine_decay_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated Q... |
github | CU-UQ/BASE_PC-master | exp_decay_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/exp_decay_eval.m | 519 | utf_8 | c4dbb979070b873669847b1ca305dde8 | % Generates QoI having exponential decay
% -----
% output = exp_decay_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = exp_decay_eval(input,e... |
github | CU-UQ/BASE_PC-master | franke_eval.m | .m | BASE_PC-master/base_pc_v1/qoi_evals/franke_eval.m | 624 | utf_8 | 92ae6f972def69ec23db8d0588f74c5d | % Generates QoI from Franke function
% -----
% output = franke_eval(input, eval_opt)
% -----
% Input
% -----
% input = points where QoI is evaluated. May be multiple rows
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% output = evaluated QoI
function output = franke_eval(inp... |
github | CU-UQ/BASE_PC-master | basis_order_bounds.m | .m | BASE_PC-master/base_pc_v1/basis/basis_order_bounds.m | 1,368 | utf_8 | eaa1e4aaa4495f0a46bd63207ae56b8e | % computes order bounds for high-dimensional problems (upper bound only)
% basis_opt = basis_order_bounds(basis_opt, eval_opt)
% -----
% Input
% -----
% basis_opt = options associated with basis
% eval_opt = options related to evaluation
% ------
% Output
% ------
% basis_opt = options associated with basis
function ba... |
github | CU-UQ/BASE_PC-master | basis_eval.m | .m | BASE_PC-master/base_pc_v1/basis/basis_eval.m | 4,601 | utf_8 | 3a40a84cad1287470b23a84817ca787d | % evaluates basis functions at input
% -----
% lhs = basis_eval(basis, input)
% -----
% Input
% -----
% basis = basis object
% input = input evaluated according to basis
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% lhs = matrix of basis functions evaluated at input
function lhs = basis... |
github | CU-UQ/BASE_PC-master | basis_identify.m | .m | BASE_PC-master/base_pc_v1/basis/basis_identify.m | 1,606 | utf_8 | e8698a1ab8fe805c2e9cbb27a5560075 | % updates basis object
% -----
% basis = basis_identify(basis_opt, eval_opt)
% -----
% Input
% -----
% basis = basis object
% sample = sample object
% sol = solution object
% basis_opt = options to identify basis
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% min_basis = basis object
% m... |
github | CU-UQ/BASE_PC-master | basis_init.m | .m | BASE_PC-master/base_pc_v1/basis/basis_init.m | 1,496 | utf_8 | ae7be19e925b1b2e66504de5f9be508f | % constructs initial basis opbject
% -----
% basis = basis_init(basis_opt, eval_opt)
% -----
% Input
% -----
% basis_opt = options to identify basis
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% basis = basis object
function basis = basis_init(basis_opt, eval_opt) % can be modified for ... |
github | CU-UQ/BASE_PC-master | jacobi_eval_gradient.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/jacobi_eval_gradient.m | 2,138 | utf_8 | 2d6b4b683e6a22b4437242bfc6ae54ae | % evaluates set of orthonormal Jacobi polynomials with derivative
% orthogonal with respect to 2*betarnd(b+1,a+1)-1;
% -----
% f_o = jacobi_eval_gradient(ord,f_i,a,b);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% a: jacobi alpha
% b: jacobi beta
% ------
%... |
github | CU-UQ/BASE_PC-master | jacobi_eval.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/jacobi_eval.m | 1,534 | utf_8 | 73b6420fb348e91d900e8b72be56c4a1 | % evaluates set of orthonormal Jacobi polynomials
% orthogonal with respect to 2*betarnd(b+1,a+1)-1;
% -----
% f_o = jacobi_eval(ord,f_i,a,b);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% a: jacobi alpha
% b: jacobi beta
% ------
% Output
% ------
% f: row... |
github | CU-UQ/BASE_PC-master | hermite_eval.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/hermite_eval.m | 841 | utf_8 | bded50e9e7aedf28fe4398b2535f0366 | % evaluates set of orthonormal Hermite polynomials (probabilist)
% orthogonal with respect to randn
% -----
% f_o = hermite_eval(ord,f_i);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% ------
% Output
% ------
% f: rows of function evaluations, column corres... |
github | CU-UQ/BASE_PC-master | legendre_eval.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/legendre_eval.m | 868 | utf_8 | 97d27d103af10f2af5d4e00efa95fddd | % Evaluates set of orthonormal Legendre polynomials
% orthogonal with respect to 2*rand-1
% -----
% f_o = legendre_eval(ord,f_i);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% ------
% Output
% ------
% f: rows of function evaluations, column cor... |
github | CU-UQ/BASE_PC-master | laguerre_eval.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/laguerre_eval.m | 1,046 | utf_8 | ce70c74c28f76cad29cf8e546875b098 | % evaluates set of orthonormal Laguerre polynomials
% orthogonal with respect to gamrnd(a+1,1)
% -----
% f_o = laguerre_eval(ord,f_i);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% a: Laguerre alpha
% ------
% Output
% ------
% f: rows of function evaluatio... |
github | CU-UQ/BASE_PC-master | legendre_eval_gradient.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/legendre_eval_gradient.m | 1,196 | utf_8 | 414a8ef101837cf945d5215c0455aad2 | % evaluates set of orthonormal Legendre polynomials
% orthogonal with respect to 2*rand-1
% -----
% f_o = legendre_eval(ord,f_i);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% ------
% Output
% ------
% f: rows of function evaluations, column cor... |
github | CU-UQ/BASE_PC-master | hermite_eval_gradient.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/hermite_eval_gradient.m | 1,023 | utf_8 | df2d1345099594a86cf1245845da90b0 | % evaluates set of orthonormal hermite polynomials (probabilist) with derivatives
% orthogonal with respect to randn
% -----
% [f, fp] = hermite_eval_gradient(ord,f_i)
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% Output
% ------
% f : rows of ... |
github | CU-UQ/BASE_PC-master | laguerre_eval_gradient.m | .m | BASE_PC-master/base_pc_v1/basis/poly_evals/laguerre_eval_gradient.m | 1,427 | utf_8 | a1d20060472ef9e955760bc62fcc26fb | % evaluates set of orthonormal Laguerre polynomials
% orthogonal with respect to gamrnd(a+1,1)
% -----
% f_o = laguerre_eval_gradient(ord,f_i);
% -----
% Input
% -----
% ord: maximum order of polynomial
% f_i: column vector of points being evaluated
% a: Laguerre alpha
% ------
% Output
% ------
% f: rows of function ... |
github | CU-UQ/BASE_PC-master | l2_nc.m | .m | BASE_PC-master/base_pc_v1/basis/explicit_normalizations/l2_nc.m | 289 | utf_8 | ed7d0c4a294bec162e9c465a0b364661 | % normalization constant for l2-coh-opt sampling
% -----------
% c = l2_nc(basis,o)
% -----------
% Input
% -----
% basis = basis_object
% o = option parameters, not used here
% ------
% Output
% ------
% c = normalizing constant
function c = l2_nc(basis,o)
c = sqrt(basis.n_elems);
end
|
github | CU-UQ/BASE_PC-master | basis_total_order.m | .m | BASE_PC-master/base_pc_v1/basis/order_definitions/basis_total_order.m | 2,558 | utf_8 | 93ed6759c96b975051dd1a4837b257cf | % returns total order basis object
% -----------
% basis = basis_total_order(basis_opt)
% -----------
% Input
% -----
% basis_opt = options to describe basis
% ------
% Output
% ------
% basis = basis object
function basis = basis_total_order(basis_opt) % Can be made more efficient through vectorization
... |
github | CU-UQ/BASE_PC-master | basis_anisotropic_hyperbolic_order.m | .m | BASE_PC-master/base_pc_v1/basis/order_definitions/basis_anisotropic_hyperbolic_order.m | 2,352 | utf_8 | 538b3c94dc1caf1705723033f6be1079 | % returns anisotropic, hyperbolic, total order basis object
% -----------
% basis = basis_anisotropic_hyperbolic_order(basis_opt)
% -----------
% Input
% -----
% basis_opt = options to describe basis
% ------
% Output
% ------
% basis = basis object
function basis = basis_anisotropic_hyperbolic_order(basis_opt)
% t... |
github | CU-UQ/BASE_PC-master | basis_anisotropic_total_order.m | .m | BASE_PC-master/base_pc_v1/basis/order_definitions/basis_anisotropic_total_order.m | 3,490 | utf_8 | 4b387e11cc6fd37f3ab786e1918b7a0a | % returns anisotropic total order basis object
% -----------
% basis = basis_anisotropic_total_order(basis_opt)
% -----------
% Input
% -----
% basis_opt = options to describe basis
% ------
% Output
% ------
% basis = basis object
function basis = basis_anisotropic_total_order(basis_opt)
% total order is somewhat ... |
github | CU-UQ/BASE_PC-master | basis_max_identify.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/basis_max_identify.m | 904 | utf_8 | b377a9a54b380e6fdb0969c0ac3ed5ab | % contracts basis set based on solution coefficients
% -----
% basis = basis_coord_max_identify(basis)
% -----
% Input
% -----
% basis = basis object
% ------
% Output
% ------
% basis = basis with corrected .max field
function basis = basis_max_identify(basis)
basis.max = zeros(1,basis.n_dim); % Must recompute maximu... |
github | CU-UQ/BASE_PC-master | basis_anisotropic_validate.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/adaptation/basis_anisotropic_validate.m | 9,033 | utf_8 | abe73ed43f91b6a4a8aecb370733972b | % validates new basis set from computed candidates
% -----
%[basis_new, basis_opt, sample_rate_adj] = basis_validate(basis_old, c, tol, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_old = old basis
% sample = current sample
% surrogate = surrogate information
% tol = tolerance in solution computation
% basis_opt... |
github | CU-UQ/BASE_PC-master | basis_adjust.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/adaptation/basis_adjust.m | 1,219 | utf_8 | dd9880be63df864abc92aa719f4dbb2a | % adjust basis set by contracting and expanding
% -----
% basis_new = basis_adjust(basis_old, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_old = old basis
% c = coefficients for solution
% tol = tolerance in solution computation
% basis_opt = options associated with basis
% eval_opt = options related to evaluat... |
github | CU-UQ/BASE_PC-master | basis_adjust_with_validation.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/adaptation/basis_adjust_with_validation.m | 5,782 | utf_8 | 5685b8998470529f8449cb60bfd2eb33 | % validates new basis set from computed candidates
% -----
%[basis_new, basis_opt, sample_rate_adj] = basis_validate(basis_old, c, tol, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_old = old basis
% sample = current sample
% surrogate = surrogate information
% tol = tolerance in solution computation
% basis_opt... |
github | CU-UQ/BASE_PC-master | basis_update.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/adaptation/basis_update.m | 2,851 | utf_8 | 073c79e6a349339bfb88bdaa37ddcbf5 | % adjust basis set by contracting and expanding
% -----
% basis_new = basis_adjust(basis_old, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_old = old basis
% c = coefficients for solution
% tol = tolerance in solution computation
% basis_opt = options associated with basis
% eval_opt = options related to evaluat... |
github | CU-UQ/BASE_PC-master | basis_validation_anisotropic_total_order.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/adaptation/basis_validation_anisotropic_total_order.m | 9,589 | utf_8 | a2edfa9f45653e532a3a1fd9c7568cb6 | % validates new basis set from computed candidates
% -----
%[basis_new, basis_opt, sample_rate_adj] = basis_validate(basis_old, c, tol, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_old = old basis
% sample = current sample
% surrogate = surrogate information
% tol = tolerance in solution computation
% basis_opt... |
github | CU-UQ/BASE_PC-master | basis_contract.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/contraction/basis_contract.m | 1,570 | utf_8 | 3516bb2a58e83897a5ff19bc140a87d8 | % contracts basis set based on solution coefficients
% -----
% basis = basis_contract(basis, c, tol, remove_perc)
% -----
% Input
% -----
% basis = basis object
% c = solution coefficients for corresponding basis
% tol = solution tolerance
% remove_perc = percentage of tolerance for discarding basis functions
% ------
... |
github | CU-UQ/BASE_PC-master | basis_contract_by_number.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/contraction/basis_contract_by_number.m | 1,286 | utf_8 | 3408b419b5c05beeb705e7f343e751fe | % contracts basis set by specific number
% -----
% basis = basis_contract_by_number(basis, c, number)
% -----
% Input
% -----
% basis = basis object
% c = solution coefficients for corresponding basis
% n_keep = approximate number of basis functions to keep
% ------
% Output
% ------
% basis = contracted basis object
... |
github | CU-UQ/BASE_PC-master | basis_expand_multiplicative.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/expansion/basis_expand_multiplicative.m | 1,456 | utf_8 | 8752ff719b0a7f31ccbaf7f03798c765 | % expands basis set using given parameters
% -----
% [basis_exp, basis_opt] = basis_expand(basis_c, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_c = contracted basis
% basis_opt = basis options
% eval_opt = options related to evaluation
% ------
% Output
% ------
% basis_exp = expanded basis object
% basis_opt ... |
github | CU-UQ/BASE_PC-master | basis_expand_opt_identify.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/expansion/basis_expand_opt_identify.m | 1,465 | utf_8 | 4fcaf2d6e1801af85a9bfcfd13444da9 | % finds new basis_opt if expand were used, without identifying basis itself
% -----
% [basis_exp, basis_opt] = basis_expand_opt_identify(basis_c, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_c = contracted basis
% basis_opt = basis options
% eval_opt = options related to evaluation
% ------
% Output
% ------
% ... |
github | CU-UQ/BASE_PC-master | basis_coord_expand.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/expansion/basis_coord_expand.m | 963 | utf_8 | 0e3398eb6d60a924f07e5dddf4b76646 | % expands basis set using given parameters
% -----
% [basis_exp, basis_opt] = basis_coord_expand(basis_c, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_c = contracted basis
% basis_opt = basis options
% eval_opt = options related to evaluation
% ------
% Output
% ------
% basis_exp = expanded basis object
% basi... |
github | CU-UQ/BASE_PC-master | basis_expand.m | .m | BASE_PC-master/base_pc_v1/basis/basis_adaptation/expansion/basis_expand.m | 1,407 | utf_8 | d9e2ebfe0b8c4e30a9e8dff7b061099b | % expands basis set using given parameters
% -----
% [basis_exp, basis_opt] = basis_expand(basis_c, basis_opt, eval_opt)
% -----
% Input
% -----
% basis_c = contracted basis
% basis_opt = basis options
% eval_opt = options related to evaluation
% ------
% Output
% ------
% basis_exp = expanded basis object
% basis_opt ... |
github | CU-UQ/BASE_PC-master | qoi_eval.m | .m | BASE_PC-master/base_pc_v1/other/qoi_eval.m | 1,329 | utf_8 | eb81164177fb68de7d8964f44520e6e7 | % call to evaluate qoi
% -----
% rhs = qoi_eval(input,eval_opt)
% -----
% Input
% -----
% input = point where qoi is evaluated
% eval_opt = options for evaluating input and QoI
% ------
% Output
% ------
% qoi = vector of qoi and derivative information if requested, indexed appropriately
function qoi = qoi_eval(input,e... |
github | CU-UQ/BASE_PC-master | order_by_coord.m | .m | BASE_PC-master/base_pc_v1/other/order_by_coord.m | 673 | utf_8 | 3a27a632c9285818dbd8a225d2151466 | % percentage of basis order in each coordinate
% -----
% v = order_by_coord(basis)
% -----
% Input
% -----
% basis = basis object
% ------
% Output
% ------
% v = fraction of basis order in each coordinate
function v = order_by_coord(basis)
v = zeros(1,basis.n_dim);
tot_v = 0;
for j = 1:basis.n_elems
... |
github | CU-UQ/BASE_PC-master | default_parameters.m | .m | BASE_PC-master/base_pc_v1/other/default_parameters.m | 4,354 | utf_8 | a526d506380d946c760b8a3a3e7ad11a | % generates default options from few problem/computer dependent options
% -----
% [basis_opt, eval_opt, sample_opt, solver_opt] = default_parameters(pool_data,dim,eval_type,qoi_handle)
% -----
% Input
% -----
% pool_data = grabs pool_data.NumWorkers for use
% dim = dimension of problem (scalar)
% eval_type = type of ra... |
github | CU-UQ/BASE_PC-master | variance_by_coord.m | .m | BASE_PC-master/base_pc_v1/other/variance_by_coord.m | 759 | utf_8 | a5849cef29b0e54def83848b298ddc8c | % decomposes variance by coordinate using pce coefficients
% -----
% v = variance_by_coord(basis,c)
% -----
% Input
% -----
% basis = basis object
% c = solution coefficients
% ------
% Output
% ------
% v = fraction of variance in each coordiante
function v = variance_by_coord(basis,c)
v = zeros(1,basis.n_dim);
... |
github | CU-UQ/BASE_PC-master | sobol_indices.m | .m | BASE_PC-master/base_pc_v1/other/sobol_indices.m | 789 | utf_8 | 2f8104543db7f6f8293f016fe23140e4 | % Computes Sobol Indices and estimate variance
% -----
% [sobol, dim_index var] = sobol_indices(c, basis)
% -----
% Input
% -----
% c = coefficients associated with basis
% basis = associated basis
% ------
% Output
% ------
% sobol = Sobol indices sorted in decreasing order
% dim_index = dimensions sorted in decreasin... |
github | CU-UQ/BASE_PC-master | apply_weights.m | .m | BASE_PC-master/base_pc_v1/other/apply_weights.m | 487 | utf_8 | 5cf49bd587e516750e2af5d120dbda48 | % applies weights to matrix
% -----
% mat = apply_weights(w,mat);
% -----
% Input
% -----
% w = weights
% mat = matrix to apply weights to
% ------
% Output
% ------
% mat = matrix with weights applied
function mat = apply_weights(w,mat)
n1 = size(w,1);
n2 = size(mat,1);
k = n2/n1;
if k == 1
mat... |
github | CU-UQ/BASE_PC-master | validate_coefficients.m | .m | BASE_PC-master/base_pc_v1/solver/validate_coefficients.m | 2,336 | utf_8 | 59f8cf05c6b7772ab2ef5b6d45c1ac33 | % Computes solution and error estimate without cross-validating tolerance (uses specified tolerance parameter)
% -----
% sol = validate_coefficients(sample,solver_opt)
% -----
% Input
% -----
% sample = sample object
% solver_opt = options for identifying solution
% ------
% Output
% ------
% sol = solution object
func... |
github | CU-UQ/BASE_PC-master | solution_identify.m | .m | BASE_PC-master/base_pc_v1/solver/solution_identify.m | 891 | utf_8 | 54fe7a337fd3c0288d11a490e5d9105c | % calls for a new solution to be computed from a sample
% -----
% sol = solution_identify(sample,solver_opt)
% -----
% Input
% -----
% sample = sample object
% solver_opt = options for identifying solution
% ------
% Output
% ------
% sol = solution object
function [sol, solver_opt] = solution_identify(sample,solver_op... |
github | CU-UQ/BASE_PC-master | folds_identify.m | .m | BASE_PC-master/base_pc_v1/solver/folds_identify.m | 555 | utf_8 | cd42e2fb07fb836b45827d2779431a69 | % identifies new validation folds when sample size is increased
% -----
% sol = folds_identify(sample,solver_opt)
% -----
% Input
% -----
% sample = sample object
% solver_opt = options for identifying solution
% ------
% Output
% ------
% sample = sample object
function sample = folds_identify(sample, solver_opt)
... |
github | CU-UQ/BASE_PC-master | cross_validate_coefficients.m | .m | BASE_PC-master/base_pc_v1/solver/cross_validate_coefficients.m | 3,693 | utf_8 | 14775fc02a0e02452f3085383e4888d1 | % Computes solution with cross-validated error
% -----
% sol = cross_validate_coefficients(sample,solver_opt)
% -----
% Input
% -----
% sample = sample object
% solver_opt = options for identifying solution
% ------
% Output
% ------
% sol = solution object
function sol = cross_validate_coefficients(sample,solver_opt)
... |
github | CU-UQ/BASE_PC-master | ell2solve.m | .m | BASE_PC-master/base_pc_v1/solver/solvers/ell2solve.m | 409 | utf_8 | b63c99d4e2ac788047ac0becefe7e682 | % Solves least squares, using mldivide
% -----
% x = ell2solve(A,b,inv_lambda)
% -----
% Input
% -----
% A = lhs matrix
% b = rhs vector
% lambda = Tikhonov regularization parameter that may be cross-validated
% ------
% Output
% ------
% x = solution coeffs
function x = ell2solve(A,b,lambda)
if lambda > 0
nCols = ... |
github | CU-UQ/BASE_PC-master | bpdn.m | .m | BASE_PC-master/base_pc_v1/solver/solvers/bpdn.m | 11,341 | utf_8 | 0f7579b0aeb67a1f38e0da0adf49d392 | % Solves BPDN
% code modified from spgl1 https://www.math.ucdavis.edu/~mpf/spgl1/
% -----
% x = bpdn(A, b, sigma)
% -----
% Input
% -----
% A = lhs matrix
% b = rhs vector
% sigma = regularization parameter that may be cross-validated
% ------
% Output
% ------
% x = coefficient vector
% % This code modifes spgl1.m a... |
github | CU-UQ/BASE_PC-master | omp.m | .m | BASE_PC-master/base_pc_v1/solver/solvers/omp.m | 3,079 | utf_8 | 31d5408348df72fe1ebd17f5e038d011 | % orthogonal matching pursuit
% -----
% x = omp(A,b,tol)
% -----
% Input
% -----
% A = lhs matrix
% b = rhs vector
% tol = regularization parameter that may be cross-validated
% ------
% Output
% ------
% x = coefficient vector
% x = omp(A, b, tol)
% A,x, b = from Ax=b
% tol = For stopping OMP and matrix operations.
%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.