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 | mhmukadam/Computer_Vision_cs543_spring2014-master | harris.m | .m | Computer_Vision_cs543_spring2014-master/3_image_stitching/harris.m | 3,283 | utf_8 | f143a80a331ecd8d66d87c1f5a1aee14 | % HARRIS - Harris corner detector
%
% Usage: [cim, r, c] = harris(im, sigma, thresh, radius, disp)
%
% Arguments:
% im - image to be processed.
% sigma - standard deviation of smoothing Gaussian. Typical
% values to use might be 1-3.
% thresh - thres... |
github | mhmukadam/Computer_Vision_cs543_spring2014-master | main.m | .m | Computer_Vision_cs543_spring2014-master/3_image_stitching/main.m | 3,817 | utf_8 | a3ca6278123504843ef28d1efc8346b0 | function main
%-----------------------------------------------------------------%
% Comuper Vision Assignment 3 %
% Image Stitching %
% Written by Mustafa Mukadam %
%---------------------------------... |
github | mhmukadam/Computer_Vision_cs543_spring2014-master | display_output.m | .m | Computer_Vision_cs543_spring2014-master/1_shape_from_shading/display_output.m | 695 | utf_8 | e0a99d491ff1d1b002b0bed6bffeefc5 | %% Spring 2014 CS 543 Assignment 1
%% Arun Mallya and Svetlana Lazebnik
function display_output(albedo, height_map)
% NOTE: h x w is the size of the input images
% albedo: h x w matrix of albedo
% height_map: h x w matrix of surface heights
% some cosmetic transformations to make 3D model look better
[hgt, wid] = si... |
github | mhmukadam/Computer_Vision_cs543_spring2014-master | harris.m | .m | Computer_Vision_cs543_spring2014-master/4.1_matrix_estimation_and_triangulation/harris.m | 3,283 | utf_8 | f143a80a331ecd8d66d87c1f5a1aee14 | % HARRIS - Harris corner detector
%
% Usage: [cim, r, c] = harris(im, sigma, thresh, radius, disp)
%
% Arguments:
% im - image to be processed.
% sigma - standard deviation of smoothing Gaussian. Typical
% values to use might be 1-3.
% thresh - thres... |
github | mhmukadam/Computer_Vision_cs543_spring2014-master | main.m | .m | Computer_Vision_cs543_spring2014-master/4.1_matrix_estimation_and_triangulation/main.m | 5,726 | utf_8 | bb2138d97372ee3e9ca787c2499ad116 | function main
%-----------------------------------------------------------------%
% Comuper Vision Assignment 3 %
% Fundamental Matrix Estimation and Triangulation %
% Written by Mustafa Mukadam %
%----------------------------... |
github | butterflyAIchinese/BasicNMFTool-master | gen_marker.m | .m | BasicNMFTool-master/utils/gen_marker.m | 694 | utf_8 | 31bf91686817b908bc736fa9f0da232b |
function marker=gen_marker(curve_idx)
markers=[];
% scheme
% scheme
markers{end+1}='o';
markers{end+1}='*';
markers{end+1}='d';
markers{end+1}='p';
markers{end+1}='s';
markers{end+1}='h';
markers{end+1}='o';
markers{end+1}='*';
markers{end+1}='o';
markers{end+1}='o';
markers{end+1}='o';
markers{end+1}='o';
markers{e... |
github | yzb85/caffe-2dlstm-master | classification_demo.m | .m | caffe-2dlstm-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | Gypaets/findTheHoles-master | findTheHoles.m | .m | findTheHoles-master/findTheHoles.m | 9,290 | utf_8 | a795073159c009f7abdc80d359f72644 | function [triangulation, holes] = findTheHoles(XY,S,M,T)
%% Definition
% findTheHoles is a 2D mesh reconstruction tool which automatically
% identifies holes in a points cloud.
%
%% Usage
% Input:
% XY= Nx2 matrix with point coordinates.
% Optional arguments:
% S = Critical area ratio (real and positive number). ... |
github | YuwenXiong/py-R-FCN-master | voc_eval.m | .m | py-R-FCN-master/lib/datasets/VOCdevkit-matlab-wrapper/voc_eval.m | 1,332 | utf_8 | 3ee1d5373b091ae4ab79d26ab657c962 | function res = voc_eval(path, comp_id, test_set, output_dir)
VOCopts = get_voc_opts(path);
VOCopts.testset = test_set;
for i = 1:length(VOCopts.classes)
cls = VOCopts.classes{i};
res(i) = voc_eval_cls(cls, VOCopts, comp_id, output_dir);
end
fprintf('\n~~~~~~~~~~~~~~~~~~~~\n');
fprintf('Results:\n');
aps = [res(:... |
github | shigueraupm/mooc2017-master | Ejercicio_6_4_3.m | .m | mooc2017-master/modulo_6/Ejercicio_6_4_3.m | 615 | iso_8859_13 | e2581f720281bf26307691033139e2c6 | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 6_4_3
% --------------------------------------------------------
function [x,niter]=gauss_seidel(A,b,maxiter,tol)
N=leng... |
github | shigueraupm/mooc2017-master | Ejercicio_6_4_4.m | .m | mooc2017-master/modulo_6/Ejercicio_6_4_4.m | 826 | utf_8 | 97e2c9ef0da9535c2d0ae7864192f836 | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 6_4_4
% --------------------------------------------------------
function [x1,k]=secante(fun,x0,x1,epsilon,maxit)
% Entrada... |
github | shigueraupm/mooc2017-master | Ejercicio_6_4_1.m | .m | mooc2017-master/modulo_6/Ejercicio_6_4_1.m | 528 | utf_8 | 2424c5de8b9944a78d04703976fdd6a2 | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 6_4_1
% --------------------------------------------------------
function [int]=simpson(fun,a,b,m)
f=inline(fun);
h=(... |
github | shigueraupm/mooc2017-master | burbuja_1.m | .m | mooc2017-master/modulo_5/burbuja_1.m | 563 | iso_8859_13 | 9f56cc4af5f1747c87701cb8d3a112a0 | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 5.5.3 versión 1
% --------------------------------------------------------
function vo=burbuja_1(v)
n=length(v);
for ... |
github | shigueraupm/mooc2017-master | dist_1.m | .m | mooc2017-master/modulo_5/dist_1.m | 337 | utf_8 | 9695976541974c419b57dd1db741cd2d | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio Mod5_ev1. function dist_1
% --------------------------------------------------------
function [d] = dist_1( p,q )
d=sqrt... |
github | shigueraupm/mooc2017-master | dist_2.m | .m | mooc2017-master/modulo_5/dist_2.m | 366 | utf_8 | d0ed68bc859980edb048d3b0c776ac27 | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio Mod5_ev1. function dist_2
% --------------------------------------------------------
function [d] = dist_2( p,q )
d=sqrt... |
github | shigueraupm/mooc2017-master | area.m | .m | mooc2017-master/modulo_5/area.m | 406 | utf_8 | 056bfce388e33893bb442ee15d4ed8ac | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 5.5.1
% --------------------------------------------------------
function a=area(p,q,r)
%esta función calcula el área de... |
github | shigueraupm/mooc2017-master | sfac.m | .m | mooc2017-master/modulo_5/sfac.m | 367 | utf_8 | 38f2fe2d8bb42c9f93e2c30d8fbdd38d | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 5.5.1
% --------------------------------------------------------
function [suma, fact]=sfac(n)
suma=0;fact=1;
for i=1... |
github | shigueraupm/mooc2017-master | burbuja_2.m | .m | mooc2017-master/modulo_5/burbuja_2.m | 653 | utf_8 | 58df8b63817daf3a790283d725841320 | % --------------------------------------------------------
% MOOC UPM
% MATLAB y Octave para Ingenieros y Cientificos (2017)
% --------------------------------------------------------
% Ejercicio 5.5.3 versión 2
% --------------------------------------------------------
function vo=burbuja_2(v)
n=length(v);
ord=... |
github | SneakySnail/LIPRAS-master | LiprasInteractiveHelp.m | .m | LIPRAS-master/+ui/LiprasInteractiveHelp.m | 4,041 | utf_8 | bd04443c60d338d89dbd6b00a7a1e127 | classdef LiprasInteractiveHelp < handle
%LIPRASINTERACTIVEHELP is a class to manage what the GUI will do when the
% context-sensitive help (CS) for the Lipras figure is activated.
% To activate the context-sensitive help, type
% handles.figure1.CSHelpMode = 'on';
% To turn it off, type... |
github | SneakySnail/LIPRAS-master | update.m | .m | LIPRAS-master/+ui/update.m | 17,429 | utf_8 | 1a65f100becb0f0590bf5a26b47f5241 | function update(handles, varargin)
%UPDATE(HANDLES, 'PROPERTY', VALUE) checks the values saved in the Model
% PROFILELISTMANAGER and updates the GUI based on these values. It does NOT change any of
% the model.
%
% 'PROPERTY' - VALUE:
% 'Min2T'
% 'Max2T'
% 'BackgroundModel'
% 'BackgroundOr... |
github | SneakySnail/LIPRAS-master | onPlotFitChange.m | .m | LIPRAS-master/+ui/+control/@GUIController/onPlotFitChange.m | 1,499 | utf_8 | 6df013a7628c722b83c9c69b20963ce9 | function onPlotFitChange(this, viewname)
%ONPLOTVIEWCHANGE changes the available components in the Results tab.
import utils.plotutils.*
handles = this.hg;
switch viewname
case 'peakfit'
cla(handles.axes1)
handles.panel_choosePlotView.SelectedObject = handles.radio_peakeqn;
changeListedItems... |
github | SneakySnail/LIPRAS-master | initGUI.m | .m | LIPRAS-master/+ui/+control/@GUIController/initGUI.m | 4,898 | utf_8 | 2f597eeef5f5c46b2fa9f3f0f08ced75 | % Initialize GUI controls
function handles = initGUI(handles)
clear(['+utils' filesep '+plotutils' filesep 'plotX'])
screensize = get(0, 'ScreenSize');
handles.figure1.Position(2) = screensize(4) - handles.figure1.Position(4) - 100;
set(handles.figure1, 'visible', 'on');
addToExecPath();
initComponents();
createJavaS... |
github | SneakySnail/LIPRAS-master | setFunctions.m | .m | LIPRAS-master/@PackageFitDiffractionData/setFunctions.m | 3,927 | utf_8 | 06a2460d3503b699d19ef6626559b767 | function funcObj = setFunctions(Stro, fcnName, fcnID)
%SETFUNCTIONS Creates the FitFunction objects of type Gaussian, Lorentzian,
% Pearson VII, and Pseudo-Voigt, or any of their corresponding
% asymmetric functions. The function type is specified by the string
% fcnNames.
%
% SETFUNCTIONS(STRO, FCNNAME) create... |
github | SneakySnail/LIPRAS-master | figAlwaysOnTop.m | .m | LIPRAS-master/+utils/figAlwaysOnTop.m | 1,391 | utf_8 | f4343d523b3501607ea6e3dbaa9b7c56 | function fig = figAlwaysOnTop(fig)
%FIGALWAYSONTOP sets a specified figure to always be on top.
%
% FIGALWAYSONTOP() creates a new figure if fig handle is
% not specified.
%
% FIGALWAYSONTOP(FIG) modifies the underlying java frame of
% the figure specified in FIG so that it is always on top.
%
if nargin < 1... |
github | SneakySnail/LIPRAS-master | cshelp.m | .m | LIPRAS-master/+utils/cshelp.m | 6,796 | utf_8 | 40535a2ad46eed9b2b3c1b5a9417c319 | function cshelp(FigHandle,ParentHandle)
%CSHELP Installs GUI-wide context sensitive help.
%
% CSHELP(FIGHANDLE) installs context-sensitive (CS) help for the
% figure with handle FIGHANDLE. To activate CS help, type
% FIGHANDLE.CSHelpMode = 'on';
% To turn it off, type
% FIGHANDLE.CSHelpMode = 'off';
%... |
github | SneakySnail/LIPRAS-master | addCSHelpDynamicProperties.m | .m | LIPRAS-master/+utils/addCSHelpDynamicProperties.m | 783 | utf_8 | c0d8eb074ff42b6b4395382c01cacdf4 | % Copyright 2009-2014 The MathWorks, Inc.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Helper functions - MCOS transition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function addCSHelpDynamicProperties(FigHandle)
p = findprop(FigHandle,'CSHelpMode');
if isempty(p)
hprop = addprop(FigHandle,'CSHelpMode');
hprop.SetObservabl... |
github | SneakySnail/LIPRAS-master | newid.m | .m | LIPRAS-master/+utils/newid.m | 17,166 | utf_8 | 2891fa93f1ae825850762431fa85734a | function Answer=newid(Prompt, Title, NumLines, DefAns, Resize)
%INPUTDLG Input dialog box.
% ANSWER = INPUTDLG(PROMPT) creates a modal dialog box that returns user
% input for multiple prompts in the cell array ANSWER. PROMPT is a cell
% array containing the PROMPT strings.
%
% INPUTDLG uses UIWAIT to suspend execu... |
github | SneakySnail/LIPRAS-master | selectBackgroundPoints.m | .m | LIPRAS-master/+utils/+plotutils/selectBackgroundPoints.m | 3,131 | utf_8 | c91620f29c05cf6c87d7b11419cd0344 | function bkgdpoints = selectBackgroundPoints(handles, mode)
%SELECTPOINTSFROMPLOT selects points on the plot until the ENTER key is pressed.
% If the ESCAPE key is pressed, BKGDPOINTS is returned as a NaN. If MODE is 'delete' and all the points are
% deleted, BKGDPOINTS is an empty array.
import utils.plotutils.*
E... |
github | SneakySnail/LIPRAS-master | plotX.m | .m | LIPRAS-master/+utils/+plotutils/plotX.m | 18,270 | utf_8 | f1a98b3c02d3241ddd0f6895b67e228b | % Properties needed: datatype, DisplayName, ColorOrder
function plotX(handles, mode, varargin)
% All lines that would require re-plotting in d-space are initially not visible. They become visible
% after calling plotter.XScale.
persistent previousPlot_
try
plotter = handles.gui.Plotter;
filenum = handles.gui.C... |
github | SneakySnail/LIPRAS-master | ginput.m | .m | LIPRAS-master/+utils/+plotutils/ginput.m | 8,929 | utf_8 | b8f9b50065d503817331c631d6d59b90 | function [out1,out2,out3] = ginput(arg1)
%GINPUT Graphical input from mouse.
% [X,Y] = GINPUT(N) gets N points from the current axes and returns
% the X- and Y-coordinates in length N vectors X and Y. The cursor
% can be positioned using a mouse. Data points are entered by pressing
% a mouse button or any key... |
github | SneakySnail/LIPRAS-master | parseXML.m | .m | LIPRAS-master/+utils/+fileutils/parseXML.m | 2,019 | utf_8 | b2d90b1481fb8fbfcaa973d1dfcffa60 | function theStruct = parseXML(filename)
% PARSEXML Convert XML file to a MATLAB structure.
try
tree = xmlread(filename);
catch
error('Failed to read XML file %s.',filename);
end
% Recurse over child nodes. This could run into problems
% with very deeply nested trees.
try
theStruct = parseChildNodes(tree);
ca... |
github | SneakySnail/LIPRAS-master | newDataSet.m | .m | LIPRAS-master/+utils/+fileutils/newDataSet.m | 11,545 | utf_8 | c0093fc2969f6343895e489558c0cb33 | % Imports new data.
function [data, filename, datapath] = newDataSet(datapath, filename)
% DATAPATH is the folder to initially open.
try
% PrefFile=fopen('Preference File.txt','r');
% data_path=fscanf(PrefFile,'%c');
% data_path(end)=[]; % method above adds a white space at the last character that messes ... |
github | SneakySnail/LIPRAS-master | requestClose.m | .m | LIPRAS-master/dialog/requestClose.m | 683 | utf_8 | 3c0fd809a83f8f6435b546ff4b5cbddb | % A dialog box that asks the user if they really want to quit the program.
function choice = requestClose(handles, choice)
% if nargin < 2
% try
% if handles.profiles.hasData
% choice = questdlg('Do you really want to quit? Some data may be lost.', ...
% 'Confirm Quit', ...
% ... |
github | SneakySnail/LIPRAS-master | overwriteExistingFit.m | .m | LIPRAS-master/dialog/overwriteExistingFit.m | 1,181 | utf_8 | 824a44694f1258e477add84f0548d608 | % If there is a current fit, check with user to overwrite. If user cancels
% action, this function throws an error to be caught by calling functions.
% User can suppress the dialog from UIGETPREF permanently by selecting
% "Do not show this dialog again".
function a = overwriteExistingFit(handles)
prompt = 'Some dat... |
github | SneakySnail/LIPRAS-master | newid.m | .m | LIPRAS-master/dialog/newid.m | 17,736 | utf_8 | 56d3b1824f89fc167fec3cb4b6e341b5 | function Answer=newid(Prompt, Title, NumLines, DefAns, Resize)
%INPUTDLG Input dialog box.
% ANSWER = INPUTDLG(PROMPT) creates a modal dialog box that returns user
% input for multiple prompts in the cell array ANSWER. PROMPT is a cell
% array containing the PROMPT strings.
%
% INPUTDLG uses UIWAIT to suspend... |
github | SneakySnail/LIPRAS-master | LiprasDialogCollection.m | .m | LIPRAS-master/dialog/@LiprasDialogCollection/LiprasDialogCollection.m | 10,838 | utf_8 | 31b2fd17767ccf7781dd7f80837d883e | classdef LiprasDialogCollection
% Class method to hold static functions that create dialog boxes.
properties (Constant)
ScreenSize = get(0, 'ScreenSize');
HelpDlgTitle = 'LIPRAS Help';
end
methods (Static)
function dlg = createCSHelpDialog()
%csHelpDialog creates a h... |
github | Mizzlr/Dzyn-master | PSOv2.m | .m | Dzyn-master/old/PSOv2.m | 2,820 | utf_8 | dc1e137507443a3f4e049e56b5d3eec9 | function [GBest] = PSOv2(config, model)
% initialize PSO parameters
inertiaFactor = 0.9;
cognitiveLearingFactor = 2;
socialLearningFactor = 2;
% initialize swarm of particles
designMatrix = getRandomDesignMatrix(model.factors, ...
model.numDesignRuns);
PBests = {};
particles = {};
for i=1:config.numPartic... |
github | Mizzlr/Dzyn-master | getPsyFunction.m | .m | Dzyn-master/old/getPsyFunction.m | 488 | utf_8 | 33b10bb1f94695916eafacd8f1ef8b92 | function [psyFunction] = getPsyFunction(linkName)
switch (linkName)
case 'logit'
psyFunction = @(x) exp(x) ./ (1 + exp(x)) .^ 2;
case 'probit'
psyFunction = @(x) (2*exp(-x.^2)/sqrt(pi)).^2 ./ (erf(x)*erfc(x));
case {'log-log', 'c-log-log'}
psyFunction = @(x) loglogPsy(x);
otherwise
error('Unknown l... |
github | Mizzlr/Dzyn-master | PSOv1.m | .m | Dzyn-master/old/PSOv1.m | 1,839 | utf_8 | 70eab9b7ed82897e0bc183f4e34da8c1 | function [GBest] = PSOv1(config, model)
% initialize PSO parameters
inertiaFactor = 0.9;
cognitiveLearingFactor = 2;
socialLearningFactor = 2;
% initialize swarm of particles
GBest = [];
PBests = {};
particles = {};
informationMatrices = {};
for i=1:config.numParticles
particles(1,i) = getRandomDesignMat... |
github | Mizzlr/Dzyn-master | MSMAv2.m | .m | Dzyn-master/old/MSMAv2.m | 10,121 | utf_8 | 8732253628fe71078c0cae61cd2db0bd | function [GGGBest] = MSMAv2(config, model)
numDesignRuns = model.numDesignRuns; %length(model.params) + 2
numDesignRunsMax = numDesignRuns + 0;
if (numDesignRuns < length(model.params))
error('numDesignRuns should be greater than length(model.params)');
exit
end
MLEBachieved = false;
for K=numDesignRuns:nu... |
github | Mizzlr/Dzyn-master | sim1MSMA.m | .m | Dzyn-master/old/sim1MSMA.m | 1,652 | utf_8 | 0daaf24e661794c5efff2817f9613d36 | tic;
config.maxIterS1 = 5;
config.maxIterS2 = 10;
config.mutationProbS1 = 0.4;
config.mutationProbS2 = 0.4;
config.elitismRateS1 = 0.4;
config.elitismRateS2 = 0.4;
config.survivalRateS1 = 1 - config.elitismRateS1;
config.survivalRateS2 = 1 - config.elitismRateS2;
config.populationSizeS1 = 25;
config.populationSizeS2 =... |
github | Mizzlr/Dzyn-master | PSOv4.m | .m | Dzyn-master/old/PSOv4.m | 6,245 | utf_8 | d01b06b10f4e8dc8a42ff4f3c416b040 | function [GGBest] = PSOv4(config, model)
% initialize PSO parameters
inertiaFactor = 0.9;
cognitiveLearingFactor = 2;
socialLearningFactor = 2;
GGBest = {};
reset = 1;
while (reset <= config.maxResets)
% initialize swarm of particles
GBest = {};
PBests = {};
swarm = {};
for i=1:config.numParticles
... |
github | Mizzlr/Dzyn-master | PSOv3.m | .m | Dzyn-master/old/PSOv3.m | 4,220 | utf_8 | 1bb60c16a2c139275ec955e6704515b6 | function [GGBest] = PSOv3(config, model)
% initialize PSO parameters
inertiaFactor = 0.9;
cognitiveLearingFactor = 2;
socialLearningFactor = 2;
GGBest = {};
reset = 1;
while (reset <= config.maxResets)
% initialize swarm of particles
GBest = {};
PBests = {};
particles = {};
for i=1:config.numParticl... |
github | Mizzlr/Dzyn-master | MSMAv1.m | .m | Dzyn-master/old/MSMAv1.m | 5,482 | utf_8 | 9b885d36455dea50c8dbd6b8d6e37d30 | function [GGGBest] = MSMAv1(config, model)
numDesignRuns = length(model.params) + 1
numDesignRunsMax = numDesignRuns + 2
for K=numDesignRuns:numDesignRunsMax
for reset=1:config.maxResets
% generate initial random population
% evaluate fitness of the population
% and sort them by fitness scores
popula... |
github | mehmetgonen/sbmkl-master | sbmkl_supervised_classification_variational_train.m | .m | sbmkl-master/sbmkl_supervised_classification_variational_train.m | 4,721 | utf_8 | b8fde8896fecfee35abfd0b0471e22c4 | function state = sbmkl_supervised_classification_variational_train(Km, y, parameters)
rand('state', parameters.seed); %#ok<RAND>
randn('state', parameters.seed); %#ok<RAND>
D = size(Km, 1);
N = size(Km, 2);
P = size(Km, 3);
sigma_g = parameters.sigma_g;
lambda.alpha = (parameters.alpha_lam... |
github | mehmetgonen/sbmkl-master | sbmtmkl_supervised_classification_variational_train.m | .m | sbmkl-master/sbmtmkl_supervised_classification_variational_train.m | 6,151 | utf_8 | ffb6207c89567e085c83e657ab675a56 | function state = sbmtmkl_supervised_classification_variational_train(Km, y, parameters)
rand('state', parameters.seed); %#ok<RAND>
randn('state', parameters.seed); %#ok<RAND>
T = length(Km);
D = zeros(T, 1);
N = zeros(T, 1);
for o = 1:T
D(o) = size(Km{o}, 1);
N(o) = size(Km{o}, ... |
github | cvjena/chimpanzee_faces-master | initWorkspaceChimpanzeeFacesDataset.m | .m | chimpanzee_faces-master/initWorkspaceChimpanzeeFacesDataset.m | 1,624 | utf_8 | 664be80a5a3210e2f15e2b69f4c8d6b8 | function initWorkspaceChimpanzeeFacesDataset
% function initWorkspaceChimpanzeeFacesDataset
%
% BRIEF
% Add local subfolders and 3rd party libraries to Matlabs work space.
%
% Exemplary call from external position:
% CHIMPFACEDATASETDIR = '/place/to/this/repository/';
% currentDir = pwd;
% cd ... |
github | vikasjiitk/Computer-Vision-Relative-Attributes-master | ranksvm_with_sim.m | .m | Computer-Vision-Relative-Attributes-master/code/RankSVM/ranksvm_with_sim.m | 6,933 | utf_8 | d8787fb995ada5ce7ad9ee2f978040fc | function w = ranksvm_with_sim(X_,O_,S_,C_O, C_S,w,opt)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Modified by Xiao Lin on 11/24/2014
% to fix an error with support vector computation. Thanks to Emrah Ergul
% <emergul13@yahoo.com> for pointing this out. See lines 148, 162, 171.
... |
github | JohnCremona/sorting-master | sorting.m | .m | sorting-master/code/sorting.m | 10,394 | utf_8 | 1b20b49d61be0de5fa6599a51ceec2c5 | /*
Magma code for comparing/sorting/enumerating ideals in the ring of integers OK of a number field.
The ordering of ideals is described in detail in sorting.tex
IMPORTANT: the field K should be created using the canonical defining polynomial (as listed in the LMFDB and returned by polredabs).
... |
github | GatorSense/MIACE-master | ace_det_local.m | .m | MIACE-master/ace_det_local.m | 821 | utf_8 | 27d8bbd7a13240b998194d6271c1a8ad | function [ace_out,mu,siginv] = ace_det_local(hsi_img,tgt_sig,mask,mu,siginv)
if ~exist('mask','var'), mask = []; end
if ~exist('mu','var'), mu = []; end
if ~exist('siginv','var'), siginv = []; end
[ace_out,mu,siginv] = img_det(@ace_det,hsi_img,tgt_sig,mask,mu,siginv);
end
function [ace_data,mu,siginv] = ace_det(hs... |
github | GatorSense/MIACE-master | miTarget.m | .m | MIACE-master/miTarget.m | 9,500 | utf_8 | 5f03bd7083304c7261a888fe5cfea672 | function [optTarget, optObjVal, b_mu, sig_inv_half, init_t] = miTarget(dataBags, labels, parameters)
% MIACE/MISMF Multiple Instance Adaptive Cosine Estimator/Multiple Instance
% Spectral Matched Filter Demo
%
% Syntax: [optTarget, optObjVal, b_mu, sig_inv_half, init_t] = miTarget(dataBags, labels, parameters)... |
github | ymirsky/pcStream-master | RandIndex.m | .m | pcStream-master/pcStream/Matlab/RandIndex.m | 1,662 | utf_8 | 5d251e24a80f1a5997dc747861bee777 | function [AR,RI,MI,HI]=RandIndex(c1,c2)
%RANDINDEX - calculates Rand Indices to compare two partitions
% ARI=RANDINDEX(c1,c2), where c1,c2 are vectors listing the
% class membership, returns the "Hubert & Arabie adjusted Rand index".
% [AR,RI,MI,HI]=RANDINDEX(c1,c2) returns the adjusted Rand index,
% the unadjusted R... |
github | FelixGruen/featurevis-master | getVarReceptiveFields.m | .m | featurevis-master/MATLAB/@DDagNN/getVarReceptiveFields.m | 3,547 | utf_8 | 9977344c3ee3420cbd18d5e2bda22ba4 | function rfs = getVarReceptiveFields(obj, var)
%GETVARRECEPTIVEFIELDS Get the receptive field of a variable
% RFS = GETVARRECEPTIVEFIELDS(OBJ, VAR) gets the receptivie fields RFS of
% all the variables of the DagNN OBJ into variable VAR. VAR is a variable
% name or index.
%
% RFS has one entry for each variable... |
github | FelixGruen/featurevis-master | rebuild.m | .m | featurevis-master/MATLAB/@DDagNN/rebuild.m | 3,103 | utf_8 | fc57d8ce4b72dccf7227806ef718ff79 | function rebuild(obj)
%REBUILD Rebuild the internal data structures of a DagNN object
% REBUILD(obj) rebuilds the internal data structures
% of the DagNN obj. It is an helper function used internally
% to update the network when layers are added or removed.
varFanIn = zeros(1, numel(obj.vars)) ;
varFanOut = zero... |
github | FelixGruen/featurevis-master | print.m | .m | featurevis-master/MATLAB/@DDagNN/print.m | 11,627 | utf_8 | 80e554d9138d08b4cf9a88b7bec346eb | function str = print(obj, inputSizes, varargin)
%PRINT Print information about the DagNN object
% PRINT(OBJ) displays a summary of the functions and parameters in the network.
% STR = PRINT(OBJ) returns the summary as a string instead of printing it.
%
% PRINT(OBJ, INPUTSIZES) where INPUTSIZES is a cell array of ... |
github | FelixGruen/featurevis-master | fromSimpleNN.m | .m | featurevis-master/MATLAB/@DDagNN/fromSimpleNN.m | 7,113 | utf_8 | 08d81312f58ea919e2483edf0f05af41 | function obj = fromSimpleNN(net, varargin)
% FROMSIMPLENN Initialize a DagNN object from a SimpleNN network
% FROMSIMPLENN(NET) initializes the DagNN object from the
% specified CNN using the SimpleNN format.
%
% SimpleNN objects are linear chains of computational layers. These
% layers echange information thr... |
github | honglaklee/convDBN-master | bmm2crbm.m | .m | convDBN-master/bmm2crbm.m | 3,767 | utf_8 | c63d9dc802cbd9cf05ebc492e213cd90 | function [CRBM, params] = bmm2crbm(X, CRBM, params)
ws = params.ws;
numhid = params.numhid;
numvis = params.numvis;
pbias = params.pbias;
sigma0 = params.sigma;
Xall = [];
patch_count= 0;
patches_per_image = round(150000/length(X)); %100;
% sample randomly from the V1 response, and then just visulaize them?
for j=1:... |
github | honglaklee/convDBN-master | crbm_inference.m | .m | convDBN-master/crbm_inference.m | 875 | utf_8 | a55016628e2b0dc64521c888045e564a | %%% hidden unit inference
%%% of convolutional restricted Boltzmann machine
%%% with probabilistic max-pooling
function PAR = crbm_inference(CRBM, PAR, params, opt)
%
if ~exist('opt','var'), opt = 'pos'; end
PAR.hidprobs = CRBM.hbiasmat;
if strcmp(opt,'pos'),
%%% --- positive phase --- %%%
for c = 1:params.n... |
github | honglaklee/convDBN-master | demo_cdbn.m | .m | convDBN-master/demo_cdbn.m | 2,890 | utf_8 | e9b3f9478d4f4cbe09bf213433cbea03 | %%% demo for convolutional deep belief network
%%% with 2 layers of convolutional restricted Boltzmann machine with
%%% probabilistic max-pooling
function demo_cdbn(objclass, spacing_V1, pbias_V1, plambda_V1, numhid_V1, l2reg_V1, spacing_V2, pbias_V2, plambda_V2, numhid_V2, l2reg_V2)
% parameters for the first layer
... |
github | honglaklee/convDBN-master | crbm_train.m | .m | convDBN-master/crbm_train.m | 9,006 | utf_8 | 8cd12706045d9c8a7bba4a6b4e005b7e | function [CRBM, params ,CDBN] = crbm_train(X,params,CDBN)
%% convolutional RBM
% Ey: (1/std^2)*[v'v - v'Wh - b'h - c'v]
addpath utils/;
if ~exist('CDBN','var'),
CDBN = cell(1,1);
end
if ~exist('params','var'),
params = struct;
end
%%% --- set up hyper parameters --- %%%
params = makeCRBMparams(params);
pa... |
github | honglaklee/convDBN-master | fobj_crbm.m | .m | convDBN-master/fobj_crbm.m | 1,816 | utf_8 | 585feddb6be4c8e792c698b79d7a9916 | %%% compute gradients using constrastive divergence
function [CRBM, PAR] = fobj_crbm(CRBM, PAR, params, opt)
PAR.ferr = 0;
PAR.sparsity = 0;
PAR.recon_err = zeros(params.numvis,1);
for c = 1:params.numvis,
CRBM.Wlr(:,:,:,c) = reshape(CRBM.W(end:-1:1, end:-1:1, c, :),[params.ws,params.ws,params.numhid]);
end
CRBM... |
github | honglaklee/convDBN-master | trim_image_square.m | .m | convDBN-master/trim_image_square.m | 810 | utf_8 | 0c04fdb67b9f4030a7241bf43296fd91 | function imresp = trim_image_square(imdata,ws,batch_ws,spacing)
% trim the image into batch_ws x batch_ws
[rows, cols, ~] = size(imdata);
rowstart = randi(rows-batch_ws+1);
rowidx = rowstart:rowstart+batch_ws-1;
colstart = randi(cols-batch_ws+1);
colidx = colstart:colstart+batch_ws-1;
imresp = imdata(rowidx, colidx, ... |
github | honglaklee/convDBN-master | sample_multrand.m | .m | convDBN-master/sample_multrand.m | 1,719 | utf_8 | bb7459d750e421210eef71613f594347 | function [H HP Hc HPc] = sample_multrand(poshidexp, params, spacing)
if ~exist('spacing','var'),
spacing = params.spacing;
end
% poshidexp is 3d array
poshidprobs_mult = zeros(spacing^2+1, size(poshidexp,1)*size(poshidexp,2)*size(poshidexp,3)/spacing^2);
poshidprobs_mult(end,:) = 0;
for c = 1:spacing,
for r =... |
github | honglaklee/convDBN-master | crbm_vishidprod.m | .m | convDBN-master/crbm_vishidprod.m | 745 | utf_8 | 9ba77d294d42a1102077db12b1b5ac20 | %%% compute gradient w.r.t. weight tensor between visible and hidden units
function PAR = crbm_vishidprod(PAR, params, opt)
if ~exist('opt','var'), opt = 'pos'; end
selidx1 = size(PAR.hidprobs,1):-1:1;
selidx2 = size(PAR.hidprobs,2):-1:1;
if strcmp(opt,'pos'),
%%% --- positive phase --- %%%
for c = 1:params.... |
github | honglaklee/convDBN-master | crbm_reconstruct.m | .m | convDBN-master/crbm_reconstruct.m | 1,106 | utf_8 | cc5661617a7585c09cb5650f8990bf78 | %%% visible unit inference (reconstruction)
%%% of convolutional restricted Boltzmann machine
%%% with probabilistic max-pooling
function PAR = crbm_reconstruct(CRBM, PAR, params, opt)
if ~exist('opt','var'), opt = 'neg'; end
if strcmp(opt,'recon'),
%%% --- reconstruction --- %%%
PAR.reconst = CRBM.vbiasmat;... |
github | honglaklee/convDBN-master | display_crbm_v2_bases.m | .m | convDBN-master/display_crbm_v2_bases.m | 2,280 | utf_8 | 8f1f7dc280dedca6a9405418024d4e45 | function display_crbm_v2_bases(W, V1, expandfactor, opt_nonneg, cols)
addpath /mnt/neocortex/scratch/kihyuks/library/Display_Networks/;
if ~exist('opt_nonneg', 'var'), opt_nonneg = false; end
if ~exist('expandfactor', 'var'), expandfactor = 4; end
if ndims(W) == 4,
W = reshape(W,size(W,1)*size(W,2),size(W,3),size(... |
github | honglaklee/convDBN-master | crbm_v1_response.m | .m | convDBN-master/crbm_v1/crbm_v1_response.m | 1,624 | utf_8 | b62b05bd92f57a38c28af16a7ae2d9f7 | function [H HP Hc HPc imdata_v0] = crbm_v1_response(im, CRBM, sigma, spacing, imsize, D, ws_pad, noiselevel)
%
if ~exist('sigma','var') || isempty(sigma),
sigma = 1;
end
if ~exist('noiselevel', 'var'),
noiselevel = 0.5;
end
%%% image preprocessing
if size(im,3)>1, im2 = double(rgb2gray(im));
else im2 = dou... |
github | honglaklee/convDBN-master | crbm_inference_response.m | .m | convDBN-master/crbm_v1/crbm_inference_response.m | 711 | utf_8 | 0045a552bf6882e6bd674bb4520895e9 | %%% hidden unit inference
%%% of convolutional restricted Boltzmann machine
%%% with probabilistic max-pooling
function [H HP Hc HPc] = crbm_inference_response(vis, CRBM, sigma, spacing)
%
if ~exist('sigma','var') || isempty(sigma),
sigma = 1;
end
numvis = size(vis,3);
numhid = size(CRBM.W,4);
hidprobs = zeros... |
github | meng-tang/KernelCut-master | computeColor.m | .m | KernelCut-master/libs/flow-code-matlab/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 | NekBox/NekBox-master | xxt_test.m | .m | NekBox-master/jl/tests/xxt_test.m | 2,311 | utf_8 | 1b4747c4dcb41ff5f4013264a8a9728d | function xxt_test
Al0=[8 -1; -1 4];
Ac0=[-2 -2 -2; 0 -2 -1];
As0=[4 -1 0; -1 8 -1; 0 -1 4];
Al1=[4];
Ac1=[-1 -1 -2];
As1=[4 -2 -1; -2 4 -1; -1 -1 4];
Al2=[4];
Ac2=[-1 -2 -1];
As2=[4 -1 -2; -1 4 -1; -2 -1 4];
A0=[Al0 Ac0; Ac0' As0];
A1=[Al1 Ac1; Ac1' As1];
A2=[Al2 Ac2; Ac2' As2];
Il=eye(4); Is=eye(4);
gI=eye(8);
Rl... |
github | NekBox/NekBox-master | xxt_test2.m | .m | NekBox-master/jl/tests/xxt_test2.m | 1,743 | utf_8 | d77fba63152f473361f4dbec5f787af5 | %p = [4 3 2 1 3 6 1 5 6 5 ]
%inv(A)(p,p)
function M=bdiag(A,B,C)
[ra ca]=size(A);
[rb cb]=size(B);
[rc cc]=size(C);
M = [ A zeros(ra,cb) zeros(ra,cc)
zeros(rb,ca) B zeros(rb,cc)
zeros(rc,ca) zeros(rc,cb) C ];
end
Al0=[];
Ac0=zeros(2)([],:);
As0=[1 -.5; -.5 1];
Al1=[ 2 -.5 -... |
github | drbenvincent/github-sync-matlab-master | githubSync.m | .m | github-sync-matlab-master/githubSync.m | 3,730 | utf_8 | f0a2cab3045ef8e542b03f34cef0e1df | function githubSync(dependencies, varargin)
% This function takes a cell array of url's to hithub repositories, loop through
% them and ensure they exist on the path, or clone them to your local machine.
%
% Example input:
%
% dependencies={...
% 'https://github.com/drbenvincent/mcmc-utils-matlab',...
% 'https://gith... |
github | rushilanirudh/pdsphere-master | make.m | .m | pdsphere-master/matlab/libsvm-3.21/matlab/make.m | 888 | utf_8 | 4a2ad69e765736f8cca8e3b721fb7ebd | % This make.m is for MATLAB and OCTAVE under Windows, Mac, and Unix
function make()
try
% This part is for OCTAVE
if (exist ('OCTAVE_VERSION', 'builtin'))
mex libsvmread.c
mex libsvmwrite.c
mex -I.. svmtrain.c ../svm.cpp svm_model_matlab.c
mex -I.. svmpredict.c ../svm.cpp svm_model_matlab.c
% This part is fo... |
github | rushilanirudh/pdsphere-master | sphere_extrinsic_mean.m | .m | pdsphere-master/matlab/Sphere tools/sphere_extrinsic_mean.m | 236 | utf_8 | 802be692a126fcaad41d365244f2ee35 | %compute sphere extrinsic mean
%expects set of points in cell array
function out = sphere_extrinsic_mean(cluster_points)
i=1;
n=length(cluster_points);
M=0;
for j=1:n
M=M+cluster_points{j};
end
M=M/n;
out=M/norm(M);
end |
github | rushilanirudh/pdsphere-master | exp_map.m | .m | pdsphere-master/matlab/Sphere tools/exp_map.m | 111 | utf_8 | a0d370c092abb3ed625418aed3396239 | %exponential map
function out = exp_map(psi,vec,t)
v=norm(vec)+eps;
out = cos(t*v)*psi+ sin(t*v)*vec/v;
end |
github | rushilanirudh/pdsphere-master | log_map.m | .m | pdsphere-master/matlab/Sphere tools/log_map.m | 114 | utf_8 | 84cd23b4acc97a710473c17208177bd0 | %logarithmic map
function vec=log_map(psi1,psi2)
u=psi2-(psi1'*psi2)*psi1;
vec=u/norm(u)*rdist(psi1,psi2);
end |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | meanSq.m | .m | Sparse-Autoencoders-for-Denoising-master/meanSq.m | 1,443 | utf_8 | 13fa4098a390fc6b6e720249c2bca54e | function error = meanSq(theta, visibleSize, hiddenSize, data,train_type)
W1 = reshape(theta(1:hiddenSize*visibleSize), hiddenSize, visibleSize);
W2 = reshape(theta(hiddenSize*visibleSize+1:2*hiddenSize*visibleSize), visibleSize, hiddenSize);
b1 = theta(2*hiddenSize*visibleSize+1:2*hiddenSize*visibleSize+hiddenSize... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | readIm.m | .m | Sparse-Autoencoders-for-Denoising-master/readIm.m | 878 | utf_8 | 9424fb977d280287fe47fe6cac712670 | function patches = readIm()
srcFiles = dir('C:\Users\Gautam Sridhar\Documents\MATLAB\train_data\*.jpg'); % the folder in which ur images exists
for i = 1 : 20000
filename = strcat('C:\Users\Gautam Sridhar\Documents\MATLAB\train_data\',srcFiles(i).name);
I = imread(filename);
I = im2double(I);
fea... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | checkNumericalGradient.m | .m | Sparse-Autoencoders-for-Denoising-master/checkNumericalGradient.m | 1,982 | utf_8 | 689a352eb2927b0838af5dc508f6374d | function [] = checkNumericalGradient()
% This code can be used to check your numerical gradient implementation
% in computeNumericalGradient.m
% It analytically evaluates the gradient of a very simple function called
% simpleQuadraticFunction (see below) and compares the result with your numerical
% solution. Your num... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | feedForwardAutoencoder_tied.m | .m | Sparse-Autoencoders-for-Denoising-master/feedForwardAutoencoder_tied.m | 1,033 | utf_8 | e3a3abbb31a9ca416a1c28d2628ebee3 | function aoutput = feedForwardAutoencoder_tied(opttheta, hiddenSize, visibleSize, input)
W1 = opttheta(1:hiddenSize*visibleSize);
%W1_prime = opttheta(hiddenSize*visibleSize+1:2*hiddenSize*visibleSize);
W1_prime = W1';
W1 = reshape(W1,[hiddenSize,visibleSize]);
W1_prime = reshape(W1_prime,[visibleSize,hiddenSize]);
... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | crossValidate.m | .m | Sparse-Autoencoders-for-Denoising-master/crossValidate.m | 1,078 | utf_8 | d587ed6e0ca2e9ffcb91836dbb5c4e00 | % Function for calculating the training and cross validation errors
% over different values of the training set to choose the correct
% amount of data for training and choose appropriate hyperparameters
function [error_train,error_val] = crossValidate(X_train,X_val,hiddenSize,visibleSize,train_type)
m = size(X_trai... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | sparseAutoencoderCost.m | .m | Sparse-Autoencoders-for-Denoising-master/sparseAutoencoderCost.m | 5,247 | utf_8 | bb0d557493bed29c1a0a47c281506861 | function [cost,grad] = sparseAutoencoderCost(theta, visibleSize, hiddenSize, ...
lambda, sparsityParam, beta, data,train_type)
patchsize =21;
% visibleSize: the number of input units (probably 64)
% hiddenSize: the number of hidden units (probably 25)
% lambda: weight deca... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | sampleIMAGES.m | .m | Sparse-Autoencoders-for-Denoising-master/sampleIMAGES.m | 3,138 | utf_8 | aff7e0c64d2c41e2db9aca1f709389a6 | function patches = sampleIMAGES()
% sampleIMAGES
% Returns 10000 patches for training
load IMAGES_IN; % load images from disk
sim_wind = 5; % measure of side of patch for similarity
patchsize = 15; %AE input patchsize
swind_hsize = (sim_wind-1)/2;% half size of search window
s =swind_hsize;
numpatches = 1000... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | feedForwardAutoencoder.m | .m | Sparse-Autoencoders-for-Denoising-master/feedForwardAutoencoder.m | 1,012 | utf_8 | 8787553d1f5132617d59bc67c30c6b93 | function aoutput = feedForwardAutoencoder(opttheta, hiddenSize, visibleSize, input)
W1 = opttheta(1:hiddenSize*visibleSize);
W1_prime = opttheta(hiddenSize*visibleSize+1:2*hiddenSize*visibleSize);
W1 = reshape(W1,[hiddenSize,visibleSize]);
W1_prime = reshape(W1_prime,[visibleSize,hiddenSize]);
b1 = opttheta(2*hidde... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | sparseAutoencoderCost_tied.m | .m | Sparse-Autoencoders-for-Denoising-master/sparseAutoencoderCost_tied.m | 5,280 | utf_8 | 74cc02282e52774409263ed41b820094 | function [cost,grad] = sparseAutoencoderCost_tied(theta, visibleSize, hiddenSize, ...
lambda, sparsityParam, beta, data,patchsize,train_type)
% visibleSize: the number of input units (probably 64)
% hiddenSize: the number of hidden units (probably 25)
% lambda: weight dec... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | myOctaveVersion.m | .m | Sparse-Autoencoders-for-Denoising-master/SGD_Files/util/myOctaveVersion.m | 169 | utf_8 | d4603482a968c496b66a4ed4e7c72471 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | isOctave.m | .m | Sparse-Autoencoders-for-Denoising-master/SGD_Files/util/isOctave.m | 108 | utf_8 | 4695e8d7c4478e1e67733cca9903f9ef | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | makeLMfilters.m | .m | Sparse-Autoencoders-for-Denoising-master/SGD_Files/util/makeLMfilters.m | 1,895 | utf_8 | 21950924882d8a0c49ab03ef0681b618 | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (must be... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | normalizeData_t.m | .m | Sparse-Autoencoders-for-Denoising-master/SGD_Files/tests/normalizeData_t.m | 479 | utf_8 | ef9fcd1d42abd9fdfab2ebfc5e6560e1 |
function [patches, mean_p] = normalizeData_t(patches)
% Squash data to [0.1, 0.9] since we use sigmoid as the activation
% function in the output layer
mean_p(:,:) = mean(patches);
% Remove DC (mean of images).
patches = bsxfun(@minus, patches, mean(patches));
% Truncate to +/-3 standard deviations and scale to -1 ... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | myOctaveVersion.m | .m | Sparse-Autoencoders-for-Denoising-master/DeepLearnToolbox-master/util/myOctaveVersion.m | 169 | utf_8 | d4603482a968c496b66a4ed4e7c72471 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | isOctave.m | .m | Sparse-Autoencoders-for-Denoising-master/DeepLearnToolbox-master/util/isOctave.m | 108 | utf_8 | 4695e8d7c4478e1e67733cca9903f9ef | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | makeLMfilters.m | .m | Sparse-Autoencoders-for-Denoising-master/DeepLearnToolbox-master/util/makeLMfilters.m | 1,895 | utf_8 | 21950924882d8a0c49ab03ef0681b618 | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (must be... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | savefig.m | .m | Sparse-Autoencoders-for-Denoising-master/savefig/savefig.m | 13,343 | utf_8 | 5e55383fee448146f66f14d4c342b027 | function savefig(fname, varargin)
% Usage: savefig(filename, fighdl, options)
%
% Saves a pdf, eps, png, jpeg, and/or tiff of the contents of the fighandle's (or current) figure.
% It saves an eps of the figure and the uses Ghostscript to convert to the other formats.
% The result is a cropped, clean picture. There a... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | WolfeLineSearch.m | .m | Sparse-Autoencoders-for-Denoising-master/minFunc/WolfeLineSearch.m | 11,478 | utf_8 | d10187f2fedfa4143ebd6300537b6be4 | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS,maxLS,tolX,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function value at st... |
github | GautamSridhar/Sparse-Autoencoders-for-Denoising-master | minFunc_processInputOptions.m | .m | Sparse-Autoencoders-for-Denoising-master/minFunc/minFunc_processInputOptions.m | 3,704 | utf_8 | dc74c67d849970de7f16c873fcf155bc |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,tolFun,tolX,method,...
corrections,c1,c2,LS_init,LS,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
DerivativeCheck,Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,useMex,use... |
github | Aerotenna/APM_OcPoC_Cyclone-master | RotToQuat.m | .m | APM_OcPoC_Cyclone-master/libraries/AP_NavEKF/Models/Common/RotToQuat.m | 288 | utf_8 | 9239706354267c8f5f2a29f992c07de9 | % convert froma rotation vector in radians to a quaternion
function quaternion = RotToQuat(rotVec)
vecLength = sqrt(rotVec(1)^2 + rotVec(2)^2 + rotVec(3)^2);
if vecLength < 1e-6
quaternion = [1;0;0;0];
else
quaternion = [cos(0.5*vecLength); rotVec/vecLength*sin(0.5*vecLength)];
end |
github | Aerotenna/APM_OcPoC_Cyclone-master | NormQuat.m | .m | APM_OcPoC_Cyclone-master/libraries/AP_NavEKF/Models/Common/NormQuat.m | 198 | utf_8 | ed913e87efc9194a2c52b266fced8da7 | % normalise the quaternion
function quaternion = normQuat(quaternion)
quatMag = sqrt(quaternion(1)^2 + quaternion(2)^2 + quaternion(3)^2 + quaternion(4)^2);
quaternion(1:4) = quaternion / quatMag;
|
github | Aerotenna/APM_OcPoC_Cyclone-master | QuatToEul.m | .m | APM_OcPoC_Cyclone-master/libraries/AP_NavEKF/Models/Common/QuatToEul.m | 436 | utf_8 | c19c9235052d99b8b943a7157e83fc94 | % Convert from a quaternion to a 321 Euler rotation sequence in radians
function Euler = QuatToEul(quat)
Euler = zeros(3,1);
Euler(1) = atan2(2*(quat(3)*quat(4)+quat(1)*quat(2)), quat(1)*quat(1) - quat(2)*quat(2) - quat(3)*quat(3) + quat(4)*quat(4));
Euler(2) = -asin(2*(quat(2)*quat(4)-quat(1)*quat(3)));
Euler(3) =... |
github | jam-world/handleKITTI-master | loadCalibrationCamToCam.m | .m | handleKITTI-master/devkit/matlab/loadCalibrationCamToCam.m | 1,894 | utf_8 | 88db832a2338f205ea36b1a9f6231aed | function calib = loadCalibrationCamToCam(filename)
% open file
fid = fopen(filename,'r');
if fid<0
calib = [];
return;
end
% read corner distance
calib.cornerdist = readVariable(fid,'corner_dist',1,1);
% read all cameras (maximum: 100)
for cam=1:100
% read variables
S_ = readVariable(fid,['S_' num2s... |
github | jam-world/handleKITTI-master | loadCalibrationRigid.m | .m | handleKITTI-master/devkit/matlab/loadCalibrationRigid.m | 855 | utf_8 | 9148661cd7335b41dace4f57bd25b3a4 | function Tr = loadCalibrationRigid(filename)
% open file
fid = fopen(filename,'r');
if fid<0
error(['ERROR: Could not load: ' filename]);
end
% read calibration
R = readVariable(fid,'R',3,3);
T = readVariable(fid,'T',3,1);
Tr = [R T;0 0 0 1];
% close file
fclose(fid);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.