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 | thejihuijin/VideoDilation-master | saveDilatedFrames.m | .m | VideoDilation-master/videoDilation/saveDilatedFrames.m | 1,787 | utf_8 | 2a95aa094940d0d029caf2812879e314 | % SAVEDILATEDFRAMES saves the frames as designated by the vector of
% indices, frameIndices, at a constant framerate.
%
% INPUTS
% vidMat : 3D or 4D video matrix
% frameIndices : Vector of indices into vidMat to be played sequentially
% fr : Constant framerate at which to play frames
% dilated_fr : Variable fra... |
github | thejihuijin/VideoDilation-master | fr2playback.m | .m | VideoDilation-master/videoDilation/fr2playback.m | 2,019 | utf_8 | 4f79daf7cb3e621808fbb58f5b6096a2 | % FR2PLAYBACK Takes a variable framerate vector and finds the frames to be
% played at a constant framerate that best simulate the variable framerate.
%
% INPUTS
% frameRates : Vector of variable framerate per frame
% playback_fr : Constant framerate at which frames will be played
%
% OUTPUT
% playbackFrames :... |
github | thejihuijin/VideoDilation-master | check_video.m | .m | VideoDilation-master/videoDilation/check_video.m | 1,404 | utf_8 | 226375c8ccb6c737cef8b8a496c1f16b | % CHECK_VIDEO Checks the dimension of the input video. The input video must
% be divisibl by 'dim', or the saliency algorithm will throw an error.
% If the dimensions don't fit the criteria, a resized video is generated
%
% input_video_path : path to input video
% dim : Dimension of video must be divisible by dim
%
% o... |
github | thejihuijin/VideoDilation-master | sliceVid.m | .m | VideoDilation-master/videoDilation/sliceVid.m | 1,492 | utf_8 | b880e0a14f35fa703f1079bd010de575 | % SLICEVID Convert a video file to a 4D matrix
% Assume input video is RGB
% Dimensions = (rows, cols, 3, frames)
%
% INPUTS
% filename : String filename
% startTime : Time in video to start, in seconds
% endTime : Time in video to end, in seconds
% ds : Downsampling factor
%
% OUTPUTS
% vidMatrix : 4D matr... |
github | thejihuijin/VideoDilation-master | smooth_normalize.m | .m | VideoDilation-master/videoDilation/smooth_normalize.m | 1,061 | utf_8 | 5734eade58221fbba4e6055711456374 | % SMOOTH_NORMALIZE filter and normalize a 1D array between 0 and 1
%
% energy : 1D energy function
% mov_avg_window : size of moving average window for moving mean filter
% mov_med_window : size of window for moving median filter
%
% smoothed_energy : filtered and normalized energy function
% std_dev : standard deviati... |
github | happylun/StyleSimilarity-master | randfold.m | .m | StyleSimilarity-master/Learning/randfold.m | 1,046 | utf_8 | f6513a869a9935da136abcbdea59f3ea | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | loadArray.m | .m | StyleSimilarity-master/Learning/loadArray.m | 1,081 | utf_8 | b3b0093cdfecd1e2d10256b751510393 | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | sigmoid.m | .m | StyleSimilarity-master/Learning/sigmoid.m | 1,022 | utf_8 | 4bff04b1be3597b8f174c4e852fea727 | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | loadMatrix.m | .m | StyleSimilarity-master/Learning/loadMatrix.m | 1,386 | utf_8 | dfc0c268e4ca724e78ca597a8230e794 | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | loadCellArray.m | .m | StyleSimilarity-master/Learning/loadCellArray.m | 1,179 | utf_8 | 71efd0a10ef103c422653eb3851d9522 | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | loadVector.m | .m | StyleSimilarity-master/Learning/loadVector.m | 1,338 | utf_8 | 64418f6444a828ee1a5ba1acc228d527 | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | sliceTriplets.m | .m | StyleSimilarity-master/Learning/sliceTriplets.m | 1,059 | utf_8 | 7251bea7579ce7d421b343f50e6b14fb | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | slice2flags.m | .m | StyleSimilarity-master/Learning/slice2flags.m | 1,096 | utf_8 | ef9453c6d21abbccb04c8bdfc6253c12 | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | MAPObjective.m | .m | StyleSimilarity-master/Learning/MAPObjective.m | 2,439 | utf_8 | 4a6499879dd7d7739b756000811a08dc | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | computeDistance.m | .m | StyleSimilarity-master/Learning/computeDistance.m | 6,784 | utf_8 | 149c5e119e4e207dbf6bb653e569432e | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | happylun/StyleSimilarity-master | LMNNObjective.m | .m | StyleSimilarity-master/Learning/LMNNObjective.m | 2,520 | utf_8 | 72546b7bf7d2afc9b94493ec2a97e5be | %=========================================================================
%
% This file is part of the Style Similarity project.
%
% Copyright (c) 2015 - Zhaoliang Lun (author of the code) / UMass-Amherst
%
% This is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public Li... |
github | mathieubray/Tensor-master | parCube.m | .m | Tensor-master/reference/parCube/v2.0/parCube.m | 2,826 | utf_8 | d520d484f6214569ff0345721963f46f | %Vagelis Papalexakis, 2012
%School of Computer Science, Carnegie Mellon University
%Implementation of ParCube Non-negative PARAFAC decomposition for
%memory-resident tensors
function [A B C lambda] = parCube(X,F,sample_factor,times,nonneg)
if nargin == 4
nonneg = 0;
end
mypath = pwd;
p = 0.55;
s = size(X); I = s... |
github | mathieubray/Tensor-master | parCube_core.m | .m | Tensor-master/reference/parCube/v2.0/parCube_core.m | 1,344 | utf_8 | 4a710d302a7a04cbbaad2fa885c81692 | %Vagelis Papalexakis, 2012
%School of Computer Science, Carnegie Mellon University
%Core sampling function for the ParCube algorithm, for memory resident
%tensors.
function [Xs idx_i idx_j idx_k Xma Xmb Xmc] = parCube_core(X,sample_factor,fixed_set)
if numel(sample_factor)>1
s1 = sample_factor(1);
s2 = sample... |
github | mathieubray/Tensor-master | efficient_corcondia_kl.m | .m | Tensor-master/reference/AutoTen/v1.0/efficient_corcondia_kl.m | 2,612 | utf_8 | 464cef7ce959c0bf1d0853906795c199 | function [c,time] = efficient_corcondia_kl(X,Fac)
%Vagelis Papalexakis - Carnegie Mellon University, School of Computer
%Science (2014-2015)
s = size(X);
I = s(1); J = s(2); K = s(3);
C = Fac.U{3}; B = Fac.U{2}; A = Fac.U{1};
A = A*diag(Fac.lambda);
F = size(A,2);
tic
Z2 = reshape(X,[I*J*K 1]);%Z2 is x
disp('Compute... |
github | mathieubray/Tensor-master | AutoTen.m | .m | Tensor-master/reference/AutoTen/v1.0/AutoTen.m | 2,286 | utf_8 | 179098e6512684b7e951cc3e73622c12 | function [Fac, c, F_est,loss] = AutoTen(X,Fmax,strategy)
%Vagelis Papalexakis - Carnegie Mellon University, School of Computer
%Science (2015-2016)
%strategy = 1--> choose the loss that gives maximum c, among the "best"
%points
%strategy = 2--> choose the loss that gives maximum F, among the "best"
%points
allF = 2:... |
github | mathieubray/Tensor-master | efficient_corcondia.m | .m | Tensor-master/reference/AutoTen/v1.0/efficient_corcondia.m | 1,746 | utf_8 | 4c95c716a9d7cd229809965a4bf607d0 | function [c,time] = efficient_corcondia(X,Fac,sparse_flag)
%Vagelis Papalexakis - Carnegie Mellon University, School of Computer
%Science (2014)
%This is an efficient algorithm for computing the CORCONDIA diagnostic for
%the PARAFAC decomposition (Bro and Kiers, "A new
%efficient method for determining the number of co... |
github | mathieubray/Tensor-master | generateData.m | .m | Tensor-master/reference/onlineCP/onlineCP/generateData.m | 962 | utf_8 | cd038997acc8745910c5476b9940500b | %% Shuo Zhou, Xuan Vinh Nguyen, James Bailey, Yunzhe Jia, Ian Davidson,
% "Accelerating Online CP Decompositions for Higher Order Tensors",
% (C) 2016 Shuo Zhou
% Email: zhous@student.unimelb.edu.au
% To run the code, Tensor Toolbox is required.
% Brett W. Bader, Tamara G. Kolda and others. MATLAB Tensor Toolbox
%... |
github | mathieubray/Tensor-master | getKhatriRaoList.m | .m | Tensor-master/reference/onlineCP/onlineCP/getKhatriRaoList.m | 1,037 | utf_8 | 9379fd931f636060ed8711934cfa3cd9 | %% Shuo Zhou, Xuan Vinh Nguyen, James Bailey, Yunzhe Jia, Ian Davidson,
% "Accelerating Online CP Decompositions for Higher Order Tensors",
% (C) 2016 Shuo Zhou
% Email: zhous@student.unimelb.edu.au
% To run the code, Tensor Toolbox is required.
% Brett W. Bader, Tamara G. Kolda and others. MATLAB Tensor Toolbox
%... |
github | mathieubray/Tensor-master | getHadamard.m | .m | Tensor-master/reference/onlineCP/onlineCP/getHadamard.m | 772 | utf_8 | 764d87900b7d60b67b055a78434e615d | %% Shuo Zhou, Xuan Vinh Nguyen, James Bailey, Yunzhe Jia, Ian Davidson,
% "Accelerating Online CP Decompositions for Higher Order Tensors",
% (C) 2016 Shuo Zhou
% Email: zhous@student.unimelb.edu.au
% To run the code, Tensor Toolbox is required.
% Brett W. Bader, Tamara G. Kolda and others. MATLAB Tensor Toolbox
%... |
github | mathieubray/Tensor-master | onlineCP_initial.m | .m | Tensor-master/reference/onlineCP/onlineCP/onlineCP_initial.m | 1,305 | utf_8 | 42d77d8f1bbdbfd392978ab2f93e2c16 | %% Shuo Zhou, Xuan Vinh Nguyen, James Bailey, Yunzhe Jia, Ian Davidson,
% "Accelerating Online CP Decompositions for Higher Order Tensors",
% (C) 2016 Shuo Zhou
% Email: zhous@student.unimelb.edu.au
% To run the code, Tensor Toolbox is required.
% Brett W. Bader, Tamara G. Kolda and others. MATLAB Tensor Toolbox
%... |
github | mathieubray/Tensor-master | onlineCP_update.m | .m | Tensor-master/reference/onlineCP/onlineCP/onlineCP_update.m | 1,827 | utf_8 | 5f2e07646e8e5c365a28545d3cdeff21 | %% Shuo Zhou, Xuan Vinh Nguyen, James Bailey, Yunzhe Jia, Ian Davidson,
% "Accelerating Online CP Decompositions for Higher Order Tensors",
% (C) 2016 Shuo Zhou
% Email: zhous@student.unimelb.edu.au
% To run the code, Tensor Toolbox is required.
% Brett W. Bader, Tamara G. Kolda and others. MATLAB Tensor Toolbox
%... |
github | caomw/arc-robot-vision-master | fill_depth_cross_bf.m | .m | arc-robot-vision-master/suction-based-grasping/external/bxf/fill_depth_cross_bf.m | 1,990 | utf_8 | b7e5bbcb1bedcb7426978f7df1777af9 | % In-paints the depth image using a cross-bilateral filter. The operation
% is implemented via several filterings at various scales. The number of
% scales is determined by the number of spacial and range sigmas provided.
% 3 spacial/range sigmas translated into filtering at 3 scales.
%
% Args:
% imgRgb - the RGB im... |
github | caomw/arc-robot-vision-master | sub2ind2d.m | .m | arc-robot-vision-master/parallel-jaw-grasping/baseline/sub2ind2d.m | 135 | utf_8 | 4970286e0c7d89b91364ca0d54668cff | % A faster version of sub2ind for 2D case
function linIndex = sub2ind2d(sz, rowSub, colSub)
linIndex = (colSub-1) * sz(1) + rowSub;
|
github | skiamu/Thesis-master | ConstantMix.m | .m | Thesis-master/MatlabCode/ConstantMix.m | 2,067 | utf_8 | c3d95b1f095c2c17d5dda0fca8f331e2 | function [U] = ConstantMix(param,model,VaR,M,N,alpha)
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
%% 1) Compute mu and Sigma
switch model
case 'Gaussian'
mu = param.mu;
Sigma = param.S;
case 'Mixture'
Sigma = 0;
mu = 0;
for i = 1 : length(param)
mu = mu + param(i).la... |
github | skiamu/Thesis-master | SimulationReturns.m | .m | Thesis-master/MatlabCode/SimulationReturns.m | 2,284 | utf_8 | 44d3a786d073e9f0d307c8f70056ed02 | function [ w ] = SimulationReturns(param,Nsim,M,Nstep,model)
%SimulationReturns is a function for simulating asset class returns
%according to the model specified in input
% INPUT:
% param = cell array or struct of model parameters
% Nsim = number of MC simulations
% M = asset class dimension
% Ns... |
github | skiamu/Thesis-master | PortfolioStatistics.m | .m | Thesis-master/MatlabCode/PortfolioStatistics.m | 2,382 | utf_8 | 4bece873bfca11d969ba7d9af9a9621b |
function Statistics = PortfolioStatistics(Returns,freq,policy,r,N)
%PortfolioStatistic computes several statistics on return data obtained by
%a given portfolio strategy
%
% INPUT:
% Returns = matrix of asset class returns in the desired frequency
% freq = desired return frequency, freq must be one of the follo... |
github | skiamu/Thesis-master | GMcalibrationMM.m | .m | Thesis-master/MatlabCode/GMcalibrationMM.m | 5,345 | utf_8 | 386610fed4b3fd997198aa6b4dac1c50 | function [param,CalibrationData] = GMcalibrationMM(Returns,k,M )
%GMcalibrationMM calibrates a gaussian mixture model by using the method of
%moments
% INPUT:
% Returns = asset class returns [matrix]
% k = number of mixture components
% M = asset allocation dimension
% OUTPUT:
% param = struct a... |
github | skiamu/Thesis-master | SetODAAparameters.m | .m | Thesis-master/MatlabCode/SetODAAparameters.m | 920 | utf_8 | c5b387e6f9b9c0049f8512023b540a99 | % this file set the parameters for the ODAA algorithm
VaR = 0.07; % monthly
alpha = 0.01; % confidence level VaR
switch freq % number of time step for a 2-year investment
case 'wk'
N = 104;
NstepPlot = 26;
VaR = VaR / 2;
case 'm'
N = 24;
NstepPlot = 6;
case 'q'
N = 8;
NstepPlot = 3;
VaR = VaR * sqrt(... |
github | skiamu/Thesis-master | GMcalibrationML.m | .m | Thesis-master/MatlabCode/GMcalibrationML.m | 2,824 | utf_8 | ce5d46253ca0ea08f399e425f895107f | function [param,CalibrationData] = GMcalibrationML(Returns,k,M)
%GMcalibrationML calibrate a gaussian mixture model using the maximum
%likelihood method
% INPUT:
% Returns = asset class returns [matrix]
% k = number of mixture components [scalar]
% M = asset allocation dimension [scalar]
% OUTPUT:
% ... |
github | skiamu/Thesis-master | ODAAalgorithm.m | .m | Thesis-master/MatlabCode/ODAAalgorithm.m | 4,761 | utf_8 | e5d44aa45086e795a2913d20392f65c0 | function [U,J] = ODAAalgorithm(N,M,X,param,model,VaR,alpha)
%DPalgorithm implements a Dynamic Programming algorithm to solve a
%stochastic reachability problem
% INPUT:
% N = number of time steps
% M = dimension asset allocation (e.g. 3)
% X = cell array of discretized target sets, to access the i-th
%... |
github | skiamu/Thesis-master | CPPI.m | .m | Thesis-master/MatlabCode/CPPI.m | 3,816 | utf_8 | 0b3671a59bd94c7827f14d284259fe5c | function[U,Floor,Cushion] = CPPI(u0,X,r,m,N,param,model,VaR,alpha)
%CPPI is a function for implementing the CPPI strategy. It computed the
%allocation maps according to the CPPI policy for different realization of
%the portfolio value
% INPUT:
% u0 = initial portfolio allocation [column vector]
% X = cell a... |
github | skiamu/Thesis-master | AssetClassStatistics.m | .m | Thesis-master/MatlabCode/AssetClassStatistics.m | 3,272 | utf_8 | d2611314f6e00d6e2d3bc106bcfd05e6 |
function Statistics = AssetClassStatistics(Returns,freq,Flag)
%AssetClassStatistics given a multivariate returns times-eries computes
%several statistics
%
% INPUT:
% Returns = Returns = matrix of asset class returns in the desired frequency
% freq = desired return frequency, freq must be one of the following
% ... |
github | skiamu/Thesis-master | GMdensity.m | .m | Thesis-master/MatlabCode/GMdensity.m | 496 | utf_8 | 3b5f1b55dc9b6fb60a972661e2a19d4d |
function f = GMdensity(z,param,k)
%GMdensity is the density of a random vector that follows a gaussian
%mixture distribution
% INPUT:
% z = point where to compute the density, if z is a matrix the density
% is computed at each row [array or matrix]
% param = struct array or parameters
% k = ... |
github | skiamu/Thesis-master | nigcdfSmall.m | .m | Thesis-master/MatlabCode/nig/nigcdfSmall.m | 1,413 | utf_8 | c01bead4a056c7ee7b5f56418931aa9d | function y = nigcdfSmall(x, alpha, beta, mu, delta)
%NIGCDFSMALL Normal-Inverse-Gaussian cumulative distribution function (cdf).
%
% This version is called by nigcdf and should not be used on its own.
% This version is optimized for small vectors x (numel(x) < 100).
% ----------------------------------------... |
github | skiamu/Thesis-master | quadcc.m | .m | Thesis-master/MatlabCode/quadcc/quadcc.m | 16,056 | utf_8 | e7ad237cd4c4f4b6d84ad0f71a3b8f20 |
function [ int , err , nr_points ] = quadcc ( f , a , b , tol )
%QUADCC evaluates an integral using adaptive quadrature. The
% algorithm uses Clenshaw-Curtis quadrature rules of increasing
% degree in each interval and bisects the interval if either the
% function does not appear to be smooth or a rule of maxim... |
github | skiamu/Thesis-master | SetODAAParamED.m | .m | Thesis-master/MatlabCode/DiscreteEvent/SetODAAParamED.m | 676 | utf_8 | 66eb9f2fd4f734695b219acb02828d66 | % set ODAA parameters in the event-driven case
N = 10; % number of events
theta = 0.07; % yearly target return
eta = 1e-3/5; % target set discretization
n = 3;
[ X ] = makeTargetSet(N,theta,eta,n);
function [ X ] = makeTargetSet(N,theta,eta,n)
%makeTargetSet creates the discretized target sets used in the DPalgorithm
... |
github | skiamu/Thesis-master | pfDESext3.m | .m | Thesis-master/MatlabCode/DiscreteEvent/pfDESext3.m | 1,445 | utf_8 | 224ebf751a15ada2820f8049f61b15ed | function [ f ] = pfDESext3(z,x,u,J_jump,param)
%pfDESext2 computes the density function of the random variable x(k+1)
%(portdolio value at event number k+1)
% INPUT:
% z = indipendent variable
% x = portfolio value last event
% u = cash weigth
% J_jump = jump treshold
% param = struct of mode... |
github | skiamu/Thesis-master | SimulationED.m | .m | Thesis-master/MatlabCode/DiscreteEvent/SimulationED.m | 2,275 | utf_8 | ca5f6eec7bc32cb48465a17278c5eec7 | function [Binomial, tau] = SimulationED(param,Nsim, Nstep,J_jump,model)
%SimulationED simulated the random variables ih the event-driven dynamics
%for the basic model and extension1
% INPUT:
% param = model parameters [struct]
% Nsim = number of MC simulation [scalar]
% Nstep = number of time steps [sc... |
github | skiamu/Thesis-master | fminsearchbnd.m | .m | Thesis-master/MatlabCode/DiscreteEvent/fminsearchbnd.m | 8,139 | utf_8 | 1316d7f9d69771e92ecc70425e0f9853 | function [x,fval,exitflag,output] = fminsearchbnd(fun,x0,LB,UB,options,varargin)
% FMINSEARCHBND: FMINSEARCH, but with bound constraints by transformation
% usage: x=FMINSEARCHBND(fun,x0)
% usage: x=FMINSEARCHBND(fun,x0,LB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB,options)
% usage: x... |
github | skiamu/Thesis-master | DPalgorithmDES2.m | .m | Thesis-master/MatlabCode/DiscreteEvent/DPalgorithmDES2.m | 2,887 | utf_8 | 920d385e67a0207b40729686c466d1d2 | function [U,J] = DPalgorithmDES2(N,X,p,lambda,r,J_jump,VaR,alpha)
%DPalgorithm implements a Dynamic Programming algorithm to solve a
%stochastic reachability problem
% INPUT:
% N = number of time steps
% M = dimension asset allocation (e.g. 3)
% X = cell array of discretized target sets, to access the ... |
github | skiamu/Thesis-master | pfDESext2.m | .m | Thesis-master/MatlabCode/DiscreteEvent/pfDESext2.m | 1,739 | utf_8 | 2212bf7c1a32658397bcba96b5044092 | function [ f ] = pfDESext2(z,x,u,J_jump,param)
%pfDESext2 computes the density function of the random variable x(k+1)
%(portdolio value at event number k+1)
% INPUT:
% z = indipendent variable
% x = portfolio value last event
% u = cash weigth
% J_jump = jump treshold
% param = struct of mode... |
github | skiamu/Thesis-master | hHistoricalVaRES.m | .m | Thesis-master/MatlabCode/DiscreteEvent/hHistoricalVaRES.m | 999 | utf_8 | 491ba88c820baf2bac94ad3f383c547a | function [VaR,ES] = hHistoricalVaRES(Sample,VaRLevel)
% Compute historical VaR and ES
% See [4] for technical details
% Convert to losses
Sample = -Sample;
N = length(Sample);
k = ceil(N*VaRLevel);
z = sort(Sample);
VaR = z(k);
if k < N
ES = ((k - N*VaRLev... |
github | skiamu/Thesis-master | ODAAalgorithmDES.m | .m | Thesis-master/MatlabCode/DiscreteEvent/ODAAalgorithmDES.m | 3,678 | utf_8 | 6feb0598ee92c683c985d764210dc47a | function [U,J] = ODAAalgorithmDES(N,X,J_jump,param,model)
%DPalgorithm implements a Dynamic Programming algorithm to solve a
%stochastic reachability problem
% INPUT:
% N = number of events
% M = dimension asset allocation (e.g. )
% X = cell array of discretized target sets, to access the i-th
% ... |
github | skiamu/Thesis-master | pfDESext1.m | .m | Thesis-master/MatlabCode/DiscreteEvent/pfDESext1.m | 1,739 | utf_8 | e693a64f401f789398c751eb4c541064 | function [ f ] = pfDESext1(z,x,u,J_jump,param)
%pfDES computes the density function of the random variable x(k+1)
%(portdolio value at event number k+1)
% INPUT:
% z = indipendent variable [column vector]
% x = portfolio value last event [scalar]
% u = cash weigth [scalar]
% J_jump = jump treshold... |
github | skiamu/Thesis-master | gigrnd.m | .m | Thesis-master/MatlabCode/gigrnd/gigrnd.m | 2,979 | utf_8 | 8a1c710aeca0a8b24678eab7c8cdc6fa | %% Implementation of the Devroye (2014) algorithm for sampling from
% the generalized inverse Gaussian (GIG) distribution
%
% function X = gigrnd(p, a, b, sampleSize)
%
% The generalized inverse Gaussian (GIG) distribution is a continuous
% probability distribution with probability density function:
%
% p(x | ... |
github | skiamu/Thesis-master | VaRGM.m | .m | Thesis-master/MatlabCode/testScript/VaRGM.m | 444 | utf_8 | 688c230e304f3d7862d4124134651552 | function y = VaRGM(param,u,alpha)
y0 = 0.02;
y = zeros([1 length(alpha)]);
options = optimset('Display','off');
for i = 1 : length(alpha);
y(i) = fsolve(@(z) Phi(param,u,z,alpha(i)),y0,options);
y0 = y(i);
end
end % ValueAtRisk
function y = Phi(param,u,z,alpha)
Phi = 0;
for i = 1 : length(param)
mu = -u' * param(i)... |
github | skiamu/Thesis-master | MCECMalgorithm.m | .m | Thesis-master/MatlabCode/GHcalibration/MCECMalgorithm.m | 5,200 | utf_8 | 068e4519b02786566c98b824c8274b25 | function [param,CalibrationData] = MCECMalgorithm(toll,maxiter,X,GHmodel)
%MCECMalgorithm implements a modified version of the EM algorithm for
%fitting a Generalized Hyperbolic Distribution
% INPUT:
% toll = stopping tolerance
% maxiter = maximum number of iterations
% X = returns data
% GHmodel ... |
github | skiamu/Thesis-master | MCECMalgorithm_t.m | .m | Thesis-master/MatlabCode/GHcalibration/MCECMalgorithm_t.m | 4,701 | utf_8 | e4b1bcecdb92c3542591525f7c306250 | function [param, CalibrationData] = MCECMalgorithm_t(toll,maxiter,X,GHmodel)
%MCECMalgorithm implements a modified version of the EM algorithm for
%fitting a Generalized Hyperbolic Distribution
% INPUT:
% toll = stopping tolerance
% maxiter = maximum number of iterations
% X = returns data
% GHmod... |
github | skiamu/Thesis-master | MCECMalgorithm2.m | .m | Thesis-master/MatlabCode/GHcalibration/MCECMalgorithm2.m | 7,110 | utf_8 | d1a1cbf9251f4b03d3d13ab18a2e705f | function [theta,LogL,exitFlag,numIter] = MCECMalgorithm2(toll,maxiter,X,GHmodel)
%MCECMalgorithm implements a modified version of the EM algorithm for
%fitting a Generalized Hyperbolic Distribution
% INPUT:
% toll = stopping tolerance
% maxiter = maximum number of iterations
% X = returns data
% G... |
github | skiamu/Thesis-master | MCECMalgorithm_VG.m | .m | Thesis-master/MatlabCode/GHcalibration/MCECMalgorithm_VG.m | 4,360 | utf_8 | b8fca6ce4918a5f23d0144bcb5206e68 | function [theta,LogL,exitFlag,numIter] = MCECMalgorithm_VG(toll,maxiter,X,GHmodel)
%MCECMalgorithm implements a modified version of the EM algorithm for
%fitting a Generalized Hyperbolic Distribution
% INPUT:
% toll = stopping tolerance
% maxiter = maximum number of iterations
% X = returns data
% ... |
github | skiamu/Thesis-master | MethodofMomentsGM.m | .m | Thesis-master/MatlabCode/OldScript/MethodofMomentsGM.m | 3,329 | utf_8 | 9713e2182c294e8403ee1fa113093ad2 | function [ x, error, lambda, param ] = MethodofMomentsGM( Sample,k,M,SampleFreq )
%MethodofMomentsGM is a function for calibrating a Gaussian Mixture models
%by moment metching. It is used when time-series are not available.
% INPUT:
% Sample = vector of sample moments. Sample = [muC,sigmaC,gammaC,kappaC,...
% ... |
github | skiamu/Thesis-master | MethodMomentsGM.m | .m | Thesis-master/MatlabCode/OldScript/MethodMomentsGM.m | 2,993 | utf_8 | ae82ae45286c45748ee84f59cf05d2b4 | function [x] = MethodMomentsGM(X)
%MethodMomentsGM is a function for the calibration of a Gaussian Mixture
%(GM) model by using the method of moments.
% INPUT:
% X = data matrix (asset class returns)
% OUTPUT:
% x = vector of parameters [lambda, mu1_1, mu2_1, mu3_1, sigma1_1,
% sigma2_1,sigma3_1... |
github | skiamu/Thesis-master | DPalgorithm.m | .m | Thesis-master/MatlabCode/OldScript/DPalgorithm.m | 5,206 | utf_8 | 0c2054dfc130bf0f4459229632cb213e | function [ U, J] = DPalgorithm(N,M,X,param,model,VaR,alpha)
%DPalgorithm implements a Dynamic Programming algorithm to solve a
%stochastic reachability problem
% INPUT:
% N = number of time steps
% M = dimension asset allocation (e.g. 3)
% X = cell array of discretized target sets, to access the i-th
%... |
github | skiamu/Thesis-master | DPalgorithm2.m | .m | Thesis-master/MatlabCode/OldScript/DPalgorithm2.m | 4,972 | utf_8 | 95b217a351bd5016bb21644121c0cafd | function [ U, J] = DPalgorithm(N,M,X,param,model,VaR,alpha)
%DPalgorithm implements a Dynamic Programming algorithm to solve a
%stochastic reachability problem
% INPUT:
% N = number of time steps
% M = dimension asset allocation (e.g. 3)
% X = cell array of discretized target sets, to access the i-th
%... |
github | theislab/pseudodynamics-master | simulate_pd_branching_fv_toy.m | .m | pseudodynamics-master/finiteVolume/models/simulate_pd_branching_fv_toy.m | 11,573 | utf_8 | 464bbe02ad0e2384bf92aec583776639 | % simulate_pd_branching_fv_toy.m is the matlab interface to the cvodes mex
% which simulates the ordinary differential equation and respective
% sensitivities according to user specifications.
% this routine was generated using AMICI commit # in branch unknown branch in repo unknown repository.
%
% USAGE:
% =====... |
github | fdcl-gwu/Matrix-Fisher-Distribution-master | pdf_MF_normal_deriv.m | .m | Matrix-Fisher-Distribution-master/pdf_MF_normal_deriv.m | 5,874 | utf_8 | ba3f2c9db4d02a947c70fc3bd8d7716c | function varargout=pdf_MF_normal_deriv(s,bool_ddc,bool_scaled)
%pdf_MF_norma_deriv: the derivatives of the normalizing constant for the matrix Fisher distribution
%on SO(3)
% [dc, ddc] = pdf_MF_normal(s,BOOL_DDC,BOOL_SCALED) returns the 3x1 first
% order derivative dc and the 3x3 second order derivatives ddc of the... |
github | fdcl-gwu/Matrix-Fisher-Distribution-master | pdf_MF_M2S.m | .m | Matrix-Fisher-Distribution-master/pdf_MF_M2S.m | 4,026 | utf_8 | ed0f8ec92f034dd89b2b4f9bf5b22d27 | function [s FVAL NITER]=pdf_MF_M2S(d,s0)
%pdf_MF_M2S: transforms the first moments into the proper singular values
% s=pdf_MF_M2S(d,s0) numerically solves the following equations for s
%
% \frac{1}{c(S)}\frac{\partial c(S)}{s_i} - d_i = 0,
%
% to find the proper singular values of the matrix Fisher distributi... |
github | fdcl-gwu/Matrix-Fisher-Distribution-master | est_MF.m | .m | Matrix-Fisher-Distribution-master/est_MF.m | 5,390 | utf_8 | c81a7da56900c7f0616ba50153d92c06 | function est_MF
%est_MF: attitude estimation with the matrix Fisher
%distributionp on SO(3)
%
% Internal variables
% - filename : the name of the mat file where estimation results are saved
% - EST_METHOD : determine the estimation scheme
% 0 : first order estimation
% 1 ... |
github | fdcl-gwu/Matrix-Fisher-Distribution-master | pdf_MF_sampling.m | .m | Matrix-Fisher-Distribution-master/pdf_MF_sampling.m | 1,555 | utf_8 | d3322b8045c4c44ca7a12bccefb79634 | function [R accept_ratio]=pdf_MF_sampling(F,N)
%pdf_MF_sampling: samping for the matrix Fisher distribution on SO(3)
% R=pdf_MF_sampling(F,N) returns N rotation matricies distributed
% according to the matrix Fisher distribution with hte matrix parameter F
%
% See T. Lee, "Bayesian Attitude Estimation with the Ma... |
github | fdcl-gwu/Matrix-Fisher-Distribution-master | pdf_MF_normal.m | .m | Matrix-Fisher-Distribution-master/pdf_MF_normal.m | 2,234 | utf_8 | c5ebd05c4302aa66a42359b15367a456 | function c_return=pdf_MF_normal(s,bool_scaled)
%pdf_MF_normal: the normalizing constant for the matrix Fisher distribution
%on SO(3)
% c = pdf_MF_normal(s) is the normalizing constant for the
% matrix Fisher distribution on SO(3), for a given 3x1 (or 1x3) proper singular
% values s.
%
% c = pdf_MF_normal(s,BOO... |
github | mcubelab/rgrasp-master | savejson.m | .m | rgrasp-master/software/jsonlab-1.0/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | mcubelab/rgrasp-master | loadjson.m | .m | rgrasp-master/software/jsonlab-1.0/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | mcubelab/rgrasp-master | loadubjson.m | .m | rgrasp-master/software/jsonlab-1.0/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | mcubelab/rgrasp-master | saveubjson.m | .m | rgrasp-master/software/jsonlab-1.0/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | mcubelab/rgrasp-master | ikTrajServer_internal.m | .m | rgrasp-master/software/planning/ik_server/ikTrajServer_internal.m | 3,737 | utf_8 | 9a5fa5ae61613f0297f936806ff84e4d |
function ret_json = ikTrajServer_internal(r, data_json, options)
data = JSON.parse(data_json);
% 1. Get hand target pose
q0 = cell2mat(data.q0)';
target_hand_pos = [];
target_hand_ori = [];
if isfield(data, 'target_hand_pos')
target_hand_pos = cell2mat(data.target_hand_pos)'... |
github | mcubelab/rgrasp-master | sub2ind2d.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/sub2ind2d.m | 136 | utf_8 | 727b74a55a13af99fd671e8d45a7ac73 | % a faster version for sub2ind for 2d case
function linIndex = sub2ind2d(sz, rowSub, colSub)
linIndex = (colSub-1) * sz(1) + rowSub;
|
github | mcubelab/rgrasp-master | nmsRange2.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/nmsRange2.m | 1,162 | utf_8 | 2a7015acc141a2906694c5c52ddc2a2b | % A sped up version of nmsRange()
function finalPick = nmsRange2(scores,range,minvalue)
%tic;
finalPick = zeros(size(scores));
changeScore = scores;
changeScore(changeScore<=minvalue) = 0.0; % suppres the scores that are under minvalue
xdim = size(changeScore,1);
ydim = size(changeScore,2);
ind_havevalue = find(chang... |
github | mcubelab/rgrasp-master | fill_depth_cross_bf.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/bxf/fill_depth_cross_bf.m | 1,901 | utf_8 | 94541444b63dc32ed860bb45e3d50f11 | % In-paints the depth image using a cross-bilateral filter. The operation
% is implemented via several filterings at various scales. The number of
% scales is determined by the number of spacial and range sigmas provided.
% 3 spacial/range sigmas translated into filtering at 3 scales.
%
% Args:
% imgRgb - the RGB im... |
github | mcubelab/rgrasp-master | draw_square_3d.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/draw_square_3d.m | 1,073 | utf_8 | 0462ce22c01b036dfb5c0083946973ea | % Draws a square in 3D
%
% Args:
% corners - 8x2 matrix of 2d corners.
% color - matlab color code, a single character.
% lineWidth - the width of each line of the square.
%
% Author: Nathan Silberman (silberman@cs.nyu.edu)
function draw_square_3d(corners, color, lineWidth)
if nargin < 2
color = 'r';
end
... |
github | mcubelab/rgrasp-master | pointCloudGPU_faster.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/pointCloudGPU_faster.m | 36,588 | utf_8 | 0a79c3d12eac92d864fb3b874162e4d6 | classdef pointCloudGPU < matlab.mixin.Copyable & vision.internal.EnforceScalarHandle
% pointCloud Object for storing a 3-D point cloud.
% ptCloud = pointCloud(xyzPoints) creates a point cloud object whose
% coordinates are specified by an M-by-3 or M-by-N-by-3 matrix xyzPoints.
%
% ptCloud = pointCloud(xyzPoints,... |
github | mcubelab/rgrasp-master | vis_cube.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/vis_cube.m | 445 | utf_8 | 8ba84e855aa99957bf175a602279772b | % Visualizes a 3D bounding box.
%
% Args:
% bb3d - 3D bounding box struct
% color - matlab color code, a single character
% lineWidth - the width of each line of the square
%
% See:
% create_bounding_box_3d.m
%
% Author:
% Nathan Silberman (silberman@cs.nyu.edu)
function vis_cube(bb3d, color, lineWidth)
if ... |
github | mcubelab/rgrasp-master | ppmtopng_and_remove_ppm_nowait.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/ppmtopng_and_remove_ppm_nowait.m | 247 | utf_8 | c826d1a0125128c901661f52cd5ff668 | % Doing compression with pnmtopng is faster than use imwrite to save png
function ppmtopng_and_remove_ppm_nowait(ppmfilepath, pngfilepath)
system(sprintf('pnmtopng -compression 1 %s > %s && rm %s &', ppmfilepath, pngfilepath, ppmfilepath));
end
|
github | mcubelab/rgrasp-master | loadjson.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/loadjson.m | 22,559 | ibm852 | 09a85cd74f0d5c9b0eb6ba3396e252d5 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | mcubelab/rgrasp-master | vis_point_cloud.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/vis_point_cloud.m | 2,400 | utf_8 | ff3f3e4dabfb83d67b26a57980abcbc4 | % Visualizes a 3D point cloud.
%
% Args:
% points3d - Nx3 or Nx2 point cloud where N is the number of points.
% colors - (optional) Nx3 vector of colors or Nx1 vector of values which which
% be scaled for visualization.
% sizes - (optional) Nx1 vector of point sizes or a scalar value which is applied
... |
github | mcubelab/rgrasp-master | pointCloudGPU.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/pointCloudGPU.m | 36,079 | utf_8 | e94ea6fea9383d5041cf8f66b0f9523a | classdef pointCloudGPU < matlab.mixin.Copyable & vision.internal.EnforceScalarHandle
% pointCloud Object for storing a 3-D point cloud.
% ptCloud = pointCloud(xyzPoints) creates a point cloud object whose
% coordinates are specified by an M-by-3 or M-by-N-by-3 matrix xyzPoints.
%
% ptCloud = pointCloud(xyzPoints,... |
github | mcubelab/rgrasp-master | get_corners_of_bb3d.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/get_corners_of_bb3d.m | 1,861 | utf_8 | d4a28e913ae46cbc141499a0146c6964 | % Gets the 3D coordinates of the corners of a 3D bounding box.
%
% Args:
% bb3d - 3D bounding box struct.
%
% Returns:
% corners - 8x3 matrix of 3D coordinates.
%
% See:
% create_bounding_box_3d.m
%
% Author: Nathan Silberman (silberman@cs.nyu.edu)
function corners = get_corners_of_bb3d(bb3d)
corners = zeros(8,... |
github | mcubelab/rgrasp-master | pcregrigidGPU.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/pcregrigidGPU.m | 19,811 | utf_8 | 350410e2e891575befca65c50a6b58ec | function [tform, movingReg, rmse] = pcregrigid(moving, fixed, varargin)
%PCREGRIGID Register two point clouds with ICP algorithm.
% tform = PCREGRIGID(moving, fixed) returns the rigid transformation that
% registers the moving point cloud with the fixed point cloud. moving and
% fixed are pointCloud object. tform... |
github | mcubelab/rgrasp-master | vis_line.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/vis_line.m | 845 | utf_8 | ea51e5d49df00cb5106f03a9ea6e0c1f | % Visualizes a line in 2D or 3D space
%
% Args:
% p1 - 1x2 or 1x3 point
% p2 - 1x2 or 1x3 point
% color - matlab color code, a single character
% lineWidth - the width of the drawn line
%
% Author: Nathan Silberman (silberman@cs.nyu.edu)
function vis_line(p1, p2, color, lineWidth)
if nargin < 3
color = '... |
github | mcubelab/rgrasp-master | BBfromPoints.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/utils/BBfromPoints.m | 1,397 | utf_8 | 2f2824b485191037c1983b5e9ff66fd5 | function [bb3dAlginedZ,bb3dTight] = BBfromPoints(objPts)
% objPts is 3xN point could
[coeffPCA,scorePCA,latentPCA] = pca(objPts');
Rot = [coeffPCA(:,1),coeffPCA(:,2),cross(coeffPCA(:,1),coeffPCA(:,2))]; % Follow righthand rule
Vproj = Rot'*objPts;
[projmin] = min(Vproj,[... |
github | mcubelab/rgrasp-master | warpFL.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/SIFTflow/warpFL.m | 212 | utf_8 | 8a88e59d40dc4a442477f98d01b9301b | % warp i2 according to flow field in vx vy
function [warpI2,I]=warp(i2,vx,vy)
[M,N]=size(i2);
[x,y]=meshgrid(1:N,1:M);
warpI2=interp2(x,y,i2,x+vx,y+vy,'bicubic');
I=find(isnan(warpI2));
warpI2(I)=zeros(size(I));
|
github | mcubelab/rgrasp-master | computeColor.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/SIFTflow/computeColor.m | 3,142 | utf_8 | a36a650437bc93d4d8ffe079fe712901 | function img = computeColor(u,v)
% computeColor color codes flow field U, V
% According to the c++ source code of Daniel Scharstein
% Contact: schar@middlebury.edu
% Author: Deqing Sun, Department of Computer Science, Brown University
% Contact: dqsun@cs.brown.edu
% $Date: 2007-10-31 21:20:30 (Wed, 31 O... |
github | mcubelab/rgrasp-master | SIFTflowc2f.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/SIFTflow/SIFTflowc2f.m | 5,485 | utf_8 | a5d8f4d01080d208613afeb9cce2e799 | % function to do coarse to fine SIFT flow matching
function [vx,vy,energylist]=SIFTflowc2f(im1,im2,SIFTflowpara,isdisplay,Segmentation)
if isfield(SIFTflowpara,'alpha')
alpha=SIFTflowpara.alpha;
else
alpha=0.01;
end
if isfield(SIFTflowpara,'d')
d=SIFTflowpara.d;
else
d=alpha*20;
end
if isfield(SIFTfl... |
github | mcubelab/rgrasp-master | warpImage.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/SIFTflow/warpImage.m | 530 | utf_8 | 6c87e60f54c4d09e7e47627e7e105b4b | % function to warp images with different dimensions
function [warpI2,mask]=warpImage(im,vx,vy,type)
[height2,width2,nchannels]=size(im);
[height1,width1]=size(vx);
[xx,yy]=meshgrid(1:width2,1:height2);
[XX,YY]=meshgrid(1:width1,1:height1);
XX=XX+vx;
YY=YY+vy;
mask=XX<1 | XX>width2 | YY<1 | YY>height2;
XX=min(max(XX,1... |
github | mcubelab/rgrasp-master | warpFLColor.m | .m | rgrasp-master/catkin_ws/src/passive_vision/src/stateIntegrator/SIFTflow/warpFLColor.m | 514 | utf_8 | 3806cd3429b55ca97a9faff4365e77a7 | % Function to warp color image im2 to the grid of im1. It uses the pixels
% in im1 to fill in the holes of warpI2 if there is any in the warping
function warpI2=warpFLColor(im1,im2,vx,vy)
if isfloat(im1)~=1
im1=im2double(im1);
end
if isfloat(im2)~=1
im2=im2double(im2);
end
if exist('vy')~=1
vy=vx(... |
github | Eden-Kramer-Lab/ParametricContinuousPhaseEstimation-master | generate_data.m | .m | ParametricContinuousPhaseEstimation-master/ParametricContinuousPhase/generate_data.m | 7,335 | utf_8 | cbf27e38ff020110e488175471a837ea | function data = generate_data(chanal_num , sample_rate , data_length , scale_noise , SNR ,W_cfg , k_config)
%% chanal_num = number of chanal that we want to generate *** ex=32
%% sample rate = frequence of generating data *** ex=1000
%%%% data length = seconds of data that we want have synchrony in a
%%... |
github | Eden-Kramer-Lab/ParametricContinuousPhaseEstimation-master | acf.m | .m | ParametricContinuousPhaseEstimation-master/ParametricContinuousPhase/acf.m | 2,458 | utf_8 | 236f4d8adcb8a89ee0851080b4ee4309 | function ta = acf(y,p)
% ACF - Compute Autocorrelations Through p Lags
% >> myacf = acf(y,p)
%
% Inputs:
% y - series to compute acf for, nx1 column vector
% p - total number of lags, 1x1 integer
%
% Output:
% myacf - px1 vector containing autocorrelations
% (First lag computed is lag 1. Lag 0 not com... |
github | Eden-Kramer-Lab/ParametricContinuousPhaseEstimation-master | fminsearchbnd.m | .m | ParametricContinuousPhaseEstimation-master/ParametricContinuousPhase/fminsearchbnd.m | 8,139 | utf_8 | 1316d7f9d69771e92ecc70425e0f9853 | function [x,fval,exitflag,output] = fminsearchbnd(fun,x0,LB,UB,options,varargin)
% FMINSEARCHBND: FMINSEARCH, but with bound constraints by transformation
% usage: x=FMINSEARCHBND(fun,x0)
% usage: x=FMINSEARCHBND(fun,x0,LB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB)
% usage: x=FMINSEARCHBND(fun,x0,LB,UB,options)
% usage: x... |
github | Eden-Kramer-Lab/ParametricContinuousPhaseEstimation-master | fminsearchcon.m | .m | ParametricContinuousPhaseEstimation-master/ParametricContinuousPhase/fminsearchcon.m | 11,330 | utf_8 | c52011ee59580c69f3872d1b59630088 | function [x,fval,exitflag,output]=fminsearchcon(fun,x0,LB,UB,A,b,nonlcon,options,varargin)
% FMINSEARCHCON: Extension of FMINSEARCHBND with general inequality constraints
% usage: x=FMINSEARCHCON(fun,x0)
% usage: x=FMINSEARCHCON(fun,x0,LB)
% usage: x=FMINSEARCHCON(fun,x0,LB,UB)
% usage: x=FMINSEARCHCON(fun,x0,LB,UB,A,b... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | submit.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex2/ex2/submit.m | 1,605 | utf_8 | 9b63d386e9bd7bcca66b1a3d2fa37579 | function submit()
addpath('./lib');
conf.assignmentSlug = 'logistic-regression';
conf.itemName = 'Logistic Regression';
conf.partArrays = { ...
{ ...
'1', ...
{ 'sigmoid.m' }, ...
'Sigmoid Function', ...
}, ...
{ ...
'2', ...
{ 'costFunction.m' }, ...
'Logistic R... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | submitWithConfiguration.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex2/ex2/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | savejson.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex2/ex2/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | loadjson.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex2/ex2/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | loadubjson.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex2/ex2/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | saveubjson.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex2/ex2/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | mridulnagpal/Andrew-Ng-ML-Course-Assignments-master | submit.m | .m | Andrew-Ng-ML-Course-Assignments-master/machine-learning-ex4/ex4/submit.m | 1,635 | utf_8 | ae9c236c78f9b5b09db8fbc2052990fc | function submit()
addpath('./lib');
conf.assignmentSlug = 'neural-network-learning';
conf.itemName = 'Neural Networks Learning';
conf.partArrays = { ...
{ ...
'1', ...
{ 'nnCostFunction.m' }, ...
'Feedforward and Cost Function', ...
}, ...
{ ...
'2', ...
{ 'nnCostFunct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.