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 | zhangxaochen/peac-master | plotColorPointCloud.m | .m | peac-master/matlab/plotColorPointCloud.m | 1,478 | utf_8 | 21f21881c612ed02c58a5ed794b6d9e8 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | viewSeg.m | .m | peac-master/matlab/viewSeg.m | 1,371 | utf_8 | 62d0798bd8849513904113c3aff510fd | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | fitAHCPlane.m | .m | peac-master/matlab/fitAHCPlane.m | 1,567 | utf_8 | f5da25eef9e8673857dda5cfc503dcb1 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | projectToXY.m | .m | peac-master/matlab/projectToXY.m | 1,510 | utf_8 | 5693f8f5d99d4cf63f2cdcc9687ceb24 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | fitPlane.m | .m | peac-master/matlab/fitPlane.m | 1,938 | utf_8 | 6d46403b6f24a2ab9e82b7cb05928474 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | reportAHCPlaneFitterParams.m | .m | peac-master/matlab/reportAHCPlaneFitterParams.m | 1,269 | utf_8 | fa49721e9fc829d61e8d98b8998e4de5 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | myPseudoColor.m | .m | peac-master/matlab/myPseudoColor.m | 1,511 | utf_8 | 87867aa552b374a27c8de5712fe1f261 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | Kinect.m | .m | peac-master/matlab/Kinect.m | 4,973 | utf_8 | 2aca6e101cfb02a6bd7100ae476feeb4 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | kinect_record.m | .m | peac-master/matlab/kinect_record.m | 2,057 | utf_8 | e55d3adc67a2b244a2f56315546cce09 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | createSegImg.m | .m | peac-master/matlab/createSegImg.m | 1,403 | utf_8 | 9c8dcefecdf3b44ae143d743d635a555 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | xyz2pts.m | .m | peac-master/matlab/xyz2pts.m | 1,234 | utf_8 | c6e700e0888ecda7325a0c1c883c3633 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | kinect_ahc.m | .m | peac-master/matlab/kinect_ahc.m | 2,878 | utf_8 | 713a2d0624a9a89ec669ef7c8452de0d | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | getDefaultAHCFitterparams.m | .m | peac-master/matlab/getDefaultAHCFitterparams.m | 1,651 | utf_8 | ecf56c78b286bbf5075f416382513bf4 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | zhangxaochen/peac-master | makefile.m | .m | peac-master/matlab/mex/makefile.m | 2,406 | utf_8 | f7d1eaafcf7fe6b1dd598879bf358f07 | %
% Copyright 2014 Mitsubishi Electric Research Laboratories All
% Rights Reserved.
%
% Permission to use, copy and modify this software and its
% documentation without fee for educational, research and non-profit
% purposes, is hereby granted, provided that the above copyright
% notice, this paragraph, and the followi... |
github | florentmeyniel/MinimalTransitionProbsModel-master | GetPatLL.m | .m | MinimalTransitionProbsModel-master/Tools/GetPatLL.m | 6,493 | utf_8 | a5274d58f55de31ac49951af61e08b35 | function [ mLL, nLL, sLL, seq, getLL, getLLpos, getLLcat, seqnames ] = ...
GetPatLL( N, s, seqLL, sym, stim, encaps )
%GETPATLL seeks for and count patterns in a sequence besides
%returning the average "seqLL" quantity associated with each pattern.
% - "N", the length of patterns to look for.
% - "s", the seque... |
github | florentmeyniel/MinimalTransitionProbsModel-master | Squires1976_SquiresModel.m | .m | MinimalTransitionProbsModel-master/Squires1976/Tools/Squires1976_SquiresModel.m | 2,517 | utf_8 | 113af7d23e76cfdce19d5cf7a30f081a | function [ p1_mean, surprise ] = Squires1976_SquiresModel( s, pA )
%SQUIRES1976_SQUIRESMODEL implements the linear model of Squires et al.
%(1976) published in Science. Note that they fitted it only on the last
%stimulus of each pattern whose length equals 5 (e.g. A in BBBBA).
% - "s": the sequence of stimuli on whic... |
github | florentmeyniel/MinimalTransitionProbsModel-master | Squires1976_KolossaModel.m | .m | MinimalTransitionProbsModel-master/Squires1976/Tools/Squires1976_KolossaModel.m | 4,809 | utf_8 | 64328c8baf5ebcb5531ff4e74e9bd6d9 | function [ p1_mean, surprise ] = Squires1976_KolossaModel( s )
%SQUIRES1976_KOLOSSAMODEL implements the model proposed by Kolossa et al.
%(2013) in Frontiers in Human Neuroscience.
% - "s": the binary sequence
%
% Copyright 2016 Florent Meyniel & Maxime Maheu
%% INTIALIZATION
% =============
% Define useful vari... |
github | florentmeyniel/MinimalTransitionProbsModel-master | IdealObserver.m | .m | MinimalTransitionProbsModel-master/IdealObserversCode/IdealObserver.m | 32,024 | utf_8 | f3f7b7d9f991cc2abfc1cc6e6c9dcc32 | function out = IdealObserver(in)
% This function is a wrapper to run different Ideal Observer models on a
% sequence of binary values (with 1s and 2s). The models depend on:
% WHAT IS LEARNED: frequency of the outcome, or transition probabilities
% between successive outcomes
% WHETHER JUMPS ARE EXPECTED: th... |
github | florentmeyniel/MinimalTransitionProbsModel-master | MarkovNoJump.m | .m | MinimalTransitionProbsModel-master/IdealObserversCode/MarkovNoJump.m | 13,107 | utf_8 | 81dbb53813d4972c86ebdea14cd193be | function [varargout] = MarkovNoJump(s, t, priorpAgB, priorpBgA, method, MemParam, OutPut, AboutFirst)
% Ideal Observer that estimates the hidden transition probabilities
% generating the observed outomes.
%
% Usage:
% [MAP, ...
% m_hat, ...
% s_hat, ...
% pmY, ...
% predA, ...
% predA_sd, ...
% ... |
github | JayMarx/Faster-RCNN-master | voc_eval.m | .m | Faster-RCNN-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 | ox-vgg/keypoint_detection-master | initialize3ObjeRecFusion.m | .m | keypoint_detection-master/dagnetworks/initialize3ObjeRecFusion.m | 18,171 | utf_8 | c809a599891df5fb921ee79b6eb63e93 | function net = initialize3ObjeRecFusion(opts,Niter,resConn, varargin)
% Related Work: Belagiannis V., and Zisserman A.,
% Recurrent Human Pose Estimation, FG (2017).
% Contact: Vasileios Belagiannis, vb@robots.ox.ac.uk
% The default network is defined to perform 2 iterations
% (i.e. 2 recurrent layers: 1 without shared... |
github | ox-vgg/keypoint_detection-master | cnn_regressor_dag.m | .m | keypoint_detection-master/model-train/cnn_regressor_dag.m | 4,492 | utf_8 | 4d4d171e4344f038aa93164b97232b1d | function [net, info] = cnn_regressor_dag(varargin)
%Create the imdb and train the model
% Dataset
opts.datas='BBC';
% Network input resolution
opts.patchHei=120;
opts.patchWi=80;
% Camera (always 1 for this setup)
opts.cam=1;
% Augmentation settings
opts.aug=0;
opts.NoAug=0;
% Export directory for model and imdb
... |
github | ox-vgg/keypoint_detection-master | cnn_train_dag_reg.m | .m | keypoint_detection-master/model-train/cnn_train_dag_reg.m | 15,766 | utf_8 | 9df49b71752399d74efc042c4dd538cb | function [net,stats] = cnn_train_dag_reg(net, imdb, getBatch, varargin)
%CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper
% CNN_TRAIN_DAG() is similar to CNN_TRAIN(), but works with
% the DagNN wrapper instead of the SimpleNN wrapper.
% Copyright (C) 2014-16 Andrea Vedaldi.
% All rights reserved... |
github | ox-vgg/keypoint_detection-master | getImdbNoAug.m | .m | keypoint_detection-master/model-train/getImdbNoAug.m | 817 | utf_8 | c196b4aaba6a9c6aef4c79ba30817fac | % --------------------------------------------------------------------
function imdb = getImdbNoAug(opts)
% --------------------------------------------------------------------
% Load the data to form the imdb file
load(opts.DataMatTrain); %training data
imdb.images.data=imgPath;
sets=ones(1,numel(imgPath));
imdb.im... |
github | ox-vgg/keypoint_detection-master | cnn_regressor_get_batch.m | .m | keypoint_detection-master/model-train/cnn_regressor_get_batch.m | 20,728 | utf_8 | 9103368f7237b9828e1d152db96722cc | function [imo, labels] = cnn_regressor_get_batch(imdb, batch, varargin)
opts.imageSize = [120, 80] ;
opts.border = [10, 10] ;
opts.keepAspect = false ;
opts.numAugments = 1 ;
opts.transformation = 'f5' ;
opts.averageImage = [];
opts.rgbVariance = zeros(0,3,'single') ;
opts.interpolation = 'bilinear' ;
opts.numThreads ... |
github | ox-vgg/keypoint_detection-master | vl_nnheatloss.m | .m | keypoint_detection-master/model-train/vl_nnheatloss.m | 2,931 | utf_8 | ec36d28ccd8d81e1e2a2b851671b078b | function Y = vl_nnheatloss(X,c, dzdy, varargin)
%Created by Vasileios Belagiannis.
%Contact: vb@robots.ox.ac.uk
%Heatmap Loss
opts.loss = 'l2loss-heatmap' ;
opts.ignOcc=0;
opts = vl_argparse(opts,varargin) ;
switch lower(opts.loss)
case {'l2loss-heatmap', 'l2loss-pairwiseheatmap'}
%GT
if strcmp(... |
github | antoinefalisse/opensim-core-master | createActuatorsFile.m | .m | opensim-core-master/OpenSim/Sandbox/MatlabScripts/createActuatorsFile.m | 7,216 | utf_8 | e897d3ac9221255070f380c300626b7f | %createActuatorsFile make and Print an OpenSim Actuator File from a Model
%
% createActuatorsFile makes a template actuators file that can
% be used in Static Optimization, RRA and CMC. This identifies the
% coordinates that are connected to ground and places point or torque
% actuators on translational or rotati... |
github | antoinefalisse/opensim-core-master | plotMuscleFLCurves.m | .m | opensim-core-master/OpenSim/Sandbox/MatlabScripts/plotMuscleFLCurves.m | 9,692 | utf_8 | 896290e08a2e0bb3c614397565b8461d | % -------------------------------------------------------------------------- %
% plotMuscleFLCurves.m %
% -------------------------------------------------------------------------- %
% The OpenSim API is a toolkit for musculoskeletal modeling and simulation. %
% Se... |
github | antoinefalisse/opensim-core-master | sandboxDGFPassive.m | .m | opensim-core-master/OpenSim/Sandbox/Moco/sandboxDGFPassive.m | 1,194 | utf_8 | 4db608d63c56d4cfeea086ae11345a26 | function sandboxDGFPassive
global xmin;
global FmaxStrain;
xmin = 0.2;
FmaxStrain = 0.6;
x = linspace(0, 1.8, 1000);
y = passive(x);
plot(x, y);
hold on;
y_new = passive_new(x);
plot(x, y_new);
fprintf('max error: %f\n', max(abs(y_new - y)));
legend('old', 'new');
fprintf('f(xmin): %f\n', passive(xmin));
fprintf(... |
github | antoinefalisse/opensim-core-master | assistedSquatToStand.m | .m | opensim-core-master/OpenSim/Sandbox/Moco/sandboxSquatToStand/assistedSquatToStand.m | 10,342 | utf_8 | b685898bfc58360c70a851fc18452aaf | function assistedSquatToStand
% This file is for a workshop competition to design an assistive device for
% squat-to-stand that reduces control effort the most.
% evaluateDevice() returns the score for your device, which is the percent
% reduction in effort summed over 2 subjects, which have different mass
% properties... |
github | antoinefalisse/opensim-core-master | IntegrateOpenSimPlant.m | .m | opensim-core-master/Bindings/Java/Matlab/Dynamic_Walking_Tutorials/Dynamic_Walker_Challenge/UserFunctions/IntegrateOpenSimPlant.m | 5,720 | utf_8 | e54fd2aa2c97fd1e7a751af099224397 | % -----------------------------------------------------------------------
% The OpenSim API is a toolkit for musculoskeletal modeling and
% simulation. See http://opensim.stanford.edu and the NOTICE file
% for more information. OpenSim is developed at Stanford University
% and supported by the US National Institutes of... |
github | antoinefalisse/opensim-core-master | OpenSimPlantControlsFunction.m | .m | opensim-core-master/Bindings/Java/Matlab/Dynamic_Walking_Tutorials/Dynamic_Walker_Challenge/UserFunctions/OpenSimPlantControlsFunction.m | 2,891 | utf_8 | 297fa794bed497d8a48cf80bddc8173b | % -----------------------------------------------------------------------
% The OpenSim API is a toolkit for musculoskeletal modeling and
% simulation. See http://opensim.stanford.edu and the NOTICE file
% for more information. OpenSim is developed at Stanford University
% and supported by the US National Institutes of... |
github | antoinefalisse/opensim-core-master | OpenSimPlantFunction.m | .m | opensim-core-master/Bindings/Java/Matlab/Dynamic_Walking_Tutorials/Dynamic_Walker_Challenge/UserFunctions/OpenSimPlantFunction.m | 4,171 | utf_8 | b70d97cd400ec1fbd4de63dd49a670f7 | % -----------------------------------------------------------------------
% The OpenSim API is a toolkit for musculoskeletal modeling and
% simulation. See http://opensim.stanford.edu and the NOTICE file
% for more information. OpenSim is developed at Stanford University
% and supported by the US National Institutes of... |
github | antoinefalisse/opensim-core-master | osimTableToStruct.m | .m | opensim-core-master/Bindings/Java/Matlab/Utilities/osimTableToStruct.m | 4,701 | utf_8 | 729eeeb6eb214b97760241c23c9bdeaa | %% Convert Matlab Struct to OpenSim time Series Table
% Input is an OpenSim TimesSeriesTable or TimesSeriesTableVec3
%
% Output is a Maltab stucture where data.label = nX1 or nx3 array
% eg structdata.LASI = [2 3 4; 4 5 6, ...
% ----------------------------------------------------------------------- %
% The OpenSim... |
github | antoinefalisse/opensim-core-master | osimTableFromStruct.m | .m | opensim-core-master/Bindings/Java/Matlab/Utilities/osimTableFromStruct.m | 4,798 | utf_8 | 829eaf41f71ccbd101dadb2bd8cabe64 | %% Convert Matlab Struct to OpenSim time Series Table
% Input is a Maltab stucture where data.label = nX1 or nX3 array
% eg s.LASI = [2 3 4; 4 5 6, ...
% One of the structures values MUST be a time vector and called 'time'
% Output is an OpenSim TimesSeriesTable
% --------------------------------------------------... |
github | antoinefalisse/opensim-core-master | osimVec3FromArray.m | .m | opensim-core-master/Bindings/Java/Matlab/Utilities/osimVec3FromArray.m | 2,147 | utf_8 | d53bb78782b1661ac4cf0cbbcf0230f4 | %% osimVec3FromArray converts 1x3 Matlab vector to OpenSim Vec3()
% Input = 1x3 Matlab matrix
% Output = OpenSim Vec3()
% ----------------------------------------------------------------------- %
% The OpenSim API is a toolkit for musculoskeletal modeling and %
% simulation. See http://opensim.stanford.edu ... |
github | antoinefalisse/opensim-core-master | osimVec3ToArray.m | .m | opensim-core-master/Bindings/Java/Matlab/Utilities/osimVec3ToArray.m | 2,062 | utf_8 | 9ed630eaf437f6f6f2d0fcdc6f755f1c | %% osimVec3ToArray converts OpenSim Vec3() to a 1x3 Matlab vector
% Input = OpenSim Vec3()
% Output = 1x3 Matlab matrix
% ----------------------------------------------------------------------- %
% The OpenSim API is a toolkit for musculoskeletal modeling and %
% simulation. See http://opensim.stanford.ed... |
github | antoinefalisse/opensim-core-master | prescribeMotionInModel.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/prescribeMotionInModel.m | 5,258 | utf_8 | 139e4b1d502c70cf847313f5f24fbcc2 | % ----------------------------------------------------------------------- %
% The OpenSim API is a toolkit for musculoskeletal modeling and %
% simulation. See http://opensim.stanford.edu and the NOTICE file %
% for more information. OpenSim is developed at Stanford University %
% and supported ... |
github | antoinefalisse/opensim-core-master | strengthScaler.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/strengthScaler.m | 4,230 | utf_8 | ca3d735f006ded7eeaadb67daf53faf8 | % ----------------------------------------------------------------------- %
% The OpenSim API is a toolkit for musculoskeletal modeling and %
% simulation. See http://opensim.stanford.edu and the NOTICE file %
% for more information. OpenSim is developed at Stanford University %
% and supported ... |
github | antoinefalisse/opensim-core-master | plotMuscleFLCurves.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/plotMuscleFLCurves.m | 9,556 | utf_8 | 518c33f27e088dd52c6c7596ebc51982 | function plotMuscleFLCurves(modelpath)
%% Function for computing and ploting the active and passive force--length
% curves for a specified muscle over the range of possible fiber lengths.
% This range is only approximate for muscles that cross more than one
% degree of freedom.
% 'modelpath' input is a full ... |
github | antoinefalisse/opensim-core-master | exampleMinimizeJointReaction.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleMinimizeJointReaction.m | 6,644 | utf_8 | 1d836c896133d3c518b9859ea7229b2f | % -------------------------------------------------------------------------- %
% OpenSim Moco: exampleMinimizeJointReaction.m %
% -------------------------------------------------------------------------- %
% Copyright (c) 2017 Stanford University and the Authors %
% ... |
github | antoinefalisse/opensim-core-master | examplePrototypeCustomGoal.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/examplePrototypeCustomGoal.m | 4,357 | utf_8 | a06a290ebcf125b9ce0c580568bc7244 | % -------------------------------------------------------------------------- %
% OpenSim Moco: examplePrototypeCustomGoal.m %
% -------------------------------------------------------------------------- %
% Copyright (c) 2019 Stanford University and the Authors %
% ... |
github | antoinefalisse/opensim-core-master | exampleSquatToStand.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleSquatToStand/exampleSquatToStand.m | 8,455 | utf_8 | d2da47f15c01569cad84bef8c363f0d1 | function exampleSquatToStand
%% Part 0: Load the Moco libraries and pre-configured Models.
import org.opensim.modeling.*;
% These models are provided for you (i.e., they are not part of Moco).
torqueDrivenModel = getTorqueDrivenModel();
muscleDrivenModel = getMuscleDrivenModel();
%% Part 1: Torque-driven Predictive P... |
github | antoinefalisse/opensim-core-master | exampleSquatToStand_answers.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleSquatToStand/exampleSquatToStand_answers.m | 10,126 | utf_8 | 55a93ccef8699c163d8ae009caa17ca1 | function exampleSquatToStand_answers
%% Part 0: Load the Moco libraries and pre-configured Models.
import org.opensim.modeling.*;
% These models are provided for you (i.e., they are not part of Moco).
torqueDrivenModel = getTorqueDrivenModel();
muscleDrivenModel = getMuscleDrivenModel();
%% Part 1: Torque-driven Pred... |
github | antoinefalisse/opensim-core-master | exampleIMUTracking_answers.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleSquatToStand/exampleIMUTracking/exampleIMUTracking_answers.m | 9,946 | utf_8 | 5c601da800c54f55d73c266417e439d2 | function exampleIMUTracking_answers
clc; clear; close all;
%% Part 0: Load the Moco libraries.
addpath('../'); % Add the directory above to access mocoPlotTrajectory.m
import org.opensim.modeling.*;
%% Part 1: Load model and add IMU frames.
% Part 1a: Load a torque-driven, 3 degree-of-freedom model with a single leg ... |
github | antoinefalisse/opensim-core-master | exampleIMUTracking.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleSquatToStand/exampleIMUTracking/exampleIMUTracking.m | 9,151 | utf_8 | a29ab340f4c340db26747eecc5e1172a | function exampleIMUTracking
clc; clear; close all;
%% Part 0: Load the Moco libraries.
addpath('../'); % Add the directory above to access mocoPlotTrajectory.m
import org.opensim.modeling.*;
%% Part 1: Load model and add IMU frames.
% Part 1a: Load a torque-driven, 3 degree-of-freedom model with a single leg
% and f... |
github | antoinefalisse/opensim-core-master | exampleEMGTracking_answers.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleEMGTracking/exampleEMGTracking_answers.m | 11,148 | utf_8 | 43283fc3092bc97e4bbe383292840bab | function exampleEMGTracking_answers
clear; close all; clc;
%% Part 0: Load the OpenSim and Moco libraries.
import org.opensim.modeling.*;
%% Part 1: Muscle redundancy problem: effort minimization.
% Solve the muscle redundancy problem while minimizing muscle excitations
% squared using the MocoInverse tool.
% Part ... |
github | antoinefalisse/opensim-core-master | exampleEMGTracking.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleEMGTracking/exampleEMGTracking.m | 10,325 | utf_8 | e5ee97d24568b0e1de0794453e2e04f9 | function exampleEMGTracking
clear; close all; clc;
%% Part 0: Load the OpenSim and Moco libraries.
import org.opensim.modeling.*;
%% Part 1: Muscle redundancy problem: effort minimization.
% Solve the muscle redundancy problem while minimizing muscle excitations
% squared using the MocoInverse tool.
% Part 1a: Load... |
github | antoinefalisse/opensim-core-master | exampleMocoInverse.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/example3DWalking/exampleMocoInverse.m | 7,532 | utf_8 | cd9930a19d0a868c792fc2fb4e9be3df | % -------------------------------------------------------------------------- %
% OpenSim Moco: exampleMocoInverse.m %
% -------------------------------------------------------------------------- %
% Copyright (c) 2020 Stanford University and the Authors %
% ... |
github | antoinefalisse/opensim-core-master | exampleMocoTrack.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/example3DWalking/exampleMocoTrack.m | 8,559 | utf_8 | c847e8770b28853a50f9b58d9cfb2b52 | % -------------------------------------------------------------------------- %
% OpenSim Moco: exampleMocoTrack.m %
% -------------------------------------------------------------------------- %
% Copyright (c) 2019 Stanford University and the Authors %
% ... |
github | antoinefalisse/opensim-core-master | example2DWalkingStepAsymmetry.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/example2DWalking/example2DWalkingStepAsymmetry.m | 19,958 | utf_8 | 18bb573c1545f8d48f7b8f031c6473aa | % ---------------------------------------------------------------------------- %
% OpenSim Moco: example2DWalkingStepAsymmetry.m %
% ---------------------------------------------------------------------------- %
% Copyright (c) 2021 Stanford University and the Authors ... |
github | antoinefalisse/opensim-core-master | exampleMarkerTracking10DOF.m | .m | opensim-core-master/Bindings/Java/Matlab/examples/Moco/exampleMarkerTracking10DOF/exampleMarkerTracking10DOF.m | 6,790 | utf_8 | 61d0e098090766d898794fc22b754a68 | % -------------------------------------------------------------------------- %
% OpenSim Moco: exampleMarkerTracking10DOF.m %
% -------------------------------------------------------------------------- %
% Copyright (c) 2017 Stanford University and the Authors %
% ... |
github | antoinefalisse/opensim-core-master | testMocoWorkflow.m | .m | opensim-core-master/Bindings/Java/Matlab/tests/testMocoWorkflow.m | 7,290 | utf_8 | 6f12925283d712696fccf5c8ab858883 | % -------------------------------------------------------------------------- %
% OpenSim Moco: testWorkflow.m %
% -------------------------------------------------------------------------- %
% Copyright (c) 2017 Stanford University and the Authors %
% ... |
github | antoinefalisse/opensim-core-master | OptimizeHopper.m | .m | opensim-core-master/Bindings/Java/Matlab/Hopper_Device/OptimizeHopper.m | 10,414 | utf_8 | 373df97f46994571704426cc397b5163 | function [x, f] = OptimizeHopper()
% OPTIMIZEHOPPER
% This function implements two different optimization approaches to
% maximize the jump height of the hopper. Requires either the
% Optimization Toolbox or the Global Optimization Toolbox.
%----------------------------------------------------------------------... |
github | antoinefalisse/opensim-core-master | InteractiveHopper.m | .m | opensim-core-master/Bindings/Java/Matlab/Hopper_Device/InteractiveHopper.m | 26,460 | utf_8 | 3a25099f8a44d0eac030df1020502a38 | function varargout = InteractiveHopper(varargin)
% INTERACTIVEHOPPER MATLAB code for InteractiveHopper.fig
% INTERACTIVEHOPPER, by itself, creates a new INTERACTIVEHOPPER or raises the existing
% singleton*.
%
% H = INTERACTIVEHOPPER returns the handle to a new INTERACTIVEHOPPER or the handle to
% t... |
github | antoinefalisse/opensim-core-master | InteractiveHopperSettings.m | .m | opensim-core-master/Bindings/Java/Matlab/Hopper_Device/InteractiveHopperSettings.m | 10,338 | utf_8 | cca017dee3ab27bd6f26fbe926a5e8e6 | function [handles] = InteractiveHopperSettings(handles,saveOrLoad,varargin)
% INTERACTIVEHOPPERSETTINGS
% Save or load GUI settings from the InteractiveHopper example
%-----------------------------------------------------------------------%
% The OpenSim API is a toolkit for musculoskeletal modeling and %
% ... |
github | antoinefalisse/opensim-core-master | InteractiveHopperParameters.m | .m | opensim-core-master/Bindings/Java/Matlab/Hopper_Device/InteractiveHopperParameters.m | 5,244 | utf_8 | 8c109ea20749ea7829b75c4317ae7f87 | function [func] = InteractiveHopperParameters(name)
% INTERACTIVEHOPPERPARAMETERS
% Built-in parameters for the InteractiveHopper GUI example.
%-----------------------------------------------------------------------%
% The OpenSim API is a toolkit for musculoskeletal modeling and %
% simulation. See http://o... |
github | halidziya/DPSlice-master | munkres.m | .m | DPSlice-master/run/munkres.m | 6,971 | utf_8 | d287696892e8ef857858223a49ad48fd | function [assignment,cost] = munkres(costMat)
% MUNKRES Munkres (Hungarian) Algorithm for Linear Assignment Problem.
%
% [ASSIGN,COST] = munkres(COSTMAT) returns the optimal column indices,
% ASSIGN assigned to each row and the minimum COST based on the assignment
% problem represented by the COSTMAT, where the (i,j... |
github | ghazi94/HandwritingDetection-master | ocrgui.m | .m | HandwritingDetection-master/GUI/ocrgui.m | 6,421 | utf_8 | cdb1d83f98ddc5683ebe4d90bf66f3fa | function varargout = ocrgui(varargin)
% OCRGUI MATLAB code for ocrgui.fig
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ocrgui_OpeningFcn, ...
... |
github | isetbio/EJLPhosphene-master | visualizePhotocurrentAndBpMosaicResponses.m | .m | EJLPhosphene-master/@primaArray/visualizePhotocurrentAndBpMosaicResponses.m | 5,545 | utf_8 | 9524fb3772a92e9cbd7446f496adb0a7 | function visualizePhotocurrentAndBpMosaicResponses(primaArray, filename, ...
weights, photocurrentResponse, bpResponseCenter, bpResponseCenterFull)
subplotPosVectors = NicePlot.getSubPlotPosVectors(...
'rowsNum', size(primaArray.center,1), ...
'colsNum', size(primaArray.center,2), ...
... |
github | isetbio/EJLPhosphene-master | visualizeStimulusAndElectrodeActivation.m | .m | EJLPhosphene-master/@primaArray/visualizeStimulusAndElectrodeActivation.m | 4,764 | utf_8 | adee2af57c8ffb32f2e3545a0897c8ed | function visualizeStimulusAndElectrodeActivation(primaArray, filename, fullStimulus, linearActivation, activation, activationDS, activationDSoff)
% normalize to [0 .. 1]
maxActivation = max([max(activation(:)) max(linearActivation(:))]);
minActivation = min([min(activation(:)) min(linearActivation(:))]);
... |
github | pmal19/Exploring-Learning-Level-Set-master | maskcircle2.m | .m | Exploring-Learning-Level-Set-master/code/Chan-Vese/maskcircle2.m | 2,101 | utf_8 | 5172c5d8c496225ecc2354991153d114 |
function m = maskcircle2(I,type)
% auto pick a circular mask for image I
% built-in mask creation function
% Input: I : input image
% type: mask shape keywords
% Output: m : mask image
% Copyright (c) 2009,
% Yue Wu @ ECE Department, Tufts University
% All Rights Reserved
if size(I,3)~... |
github | pmal19/Exploring-Learning-Level-Set-master | chenvese.m | .m | Exploring-Learning-Level-Set-master/code/Chan-Vese/chenvese.m | 15,250 | utf_8 | 063009baf327247ab05c53bb92152741 | %==========================================================================
%
% Active contour with Chen-Vese Method
% for image segementation
%
% Implemented by Yue Wu (yue.wu@tufts.edu)
% Tufts University
% Feb 2009
% http://sites.google.com/site/rexstribeofimageprocessing/
%
% all rights re... |
github | GiangTTran/ExactRecoveryChaoticSystems-master | am_solver.m | .m | ExactRecoveryChaoticSystems-master/am_solver.m | 4,169 | utf_8 | b2286e34ae2f17d5a8f42cc0366b033a | %==========================================================================
% am_solver: alternating minimization to solve the following joint sparsity + sparsity problem
% (C,E) = min mu/2||phiX*C + E - Xdot + b||_F^2 + sum_j||E^j||_2
% subject to C is sparse
% b = b +... |
github | GiangTTran/ExactRecoveryChaoticSystems-master | dictionary3.m | .m | ExactRecoveryChaoticSystems-master/dictionary3.m | 1,995 | utf_8 | dd59ee8a872c3d7da442aaa708dfc636 | %==========================================================================
% dictionary3: dictionary matrix built from the 3D data
%
% Input:
% U(m x 3): time-varying measurements [x y z], kth row is the measurement value at time k*dt
% where 3 = dimension of the ODE system
% ... |
github | GiangTTran/ExactRecoveryChaoticSystems-master | corrupted_data.m | .m | ExactRecoveryChaoticSystems-master/corrupted_data.m | 3,132 | utf_8 | 4ada039e9e57e7772c50c4cf06ca2559 | %==========================================================================
% corrupted_data: add bandwith corruption to clean data X
% Input:
% X(m x n): Clean, time-varying measurements, kth row is the measurement value at time k*dt
% where n = dimension of the ODE system
% ... |
github | GiangTTran/ExactRecoveryChaoticSystems-master | time_derivative.m | .m | ExactRecoveryChaoticSystems-master/time_derivative.m | 1,602 | utf_8 | b137def4842c611bc61e7b5d68cf15a6 | %==========================================================================
% time_derivative: 1st/2nd numerical approximation of time derivative
% 1st-order approximation:
% roc(x(t)) = (x(t+dt) - x(t))/dt
% 2nd-order approximation:
% roc(x(t)) =... |
github | GiangTTran/ExactRecoveryChaoticSystems-master | dictionary4.m | .m | ExactRecoveryChaoticSystems-master/dictionary4.m | 1,998 | utf_8 | d7569102c4dd53bdb667aae7af03bf3c | %==========================================================================
% dictionary4: dictionary matrix built from the 4D data
%
% Input:
% U(m x 4): time-varying measurements [x y z w], kth row is the measurement value at time k*dt
% where 4 = dimension of the ODE system
... |
github | kunzhan/Feature_linking_model-master | GrayStretch.m | .m | Feature_linking_model-master/FLM/GrayStretch.m | 1,468 | utf_8 | 66f7072b5405d64af14d3dc3744c8164 | % The code was written by Jicai Teng, Jinhui Shi, Kun Zhan
% $Revision: 1.0.0.0 $ $Date: 2014/12/06 $ 17:58:47 $
% Reference:
% [1] K. Zhan, J. Shi, Q. Li, J. Teng, M. Wang,
% "Image segmentation using fast linking SCM,"
% in Proc. of IJCNN, vol. 25, pp. 2093-2100, 2015.
% [2] K. Zhan, J. Shi, ... |
github | joe-of-all-trades/fstack-master | fstack.m | .m | fstack-master/fstack.m | 4,872 | utf_8 | 513f1052e274f14172a3d71441b23a60 | function [edofimg, varargout] = fstack(img,varargin)
%FSTACK merging images of mutiple focal planes into one in-focus image.
%
% edofimg = fstack(img) merges img, an img array containing grayscale or
% color images acquired at mutiple focal distance, into one all-in-focus
% image.
%
% edofimg = fstack(img, option... |
github | msangnier/simpleed-matlab-master | mmedtrain.m | .m | simpleed-matlab-master/core/simpleed/mmedtrain.m | 4,856 | utf_8 | b31c6cb6b6f5bcd40d7f44c7c42675e4 | % 14/05/28
% 21-Jan-2015 Change kOpt.type = 2 to kOpt.type = 3
function out = mmedtrain(y, x, mu, varargin)
options = check_options(check_argin(varargin, struct), ...
'C', 1, ... % Cost parameter
'cv', 0, ... % Cross-validation
'Label', [1, -1]); % Labels to save in the model
%% MMED options
% Kernel ... |
github | msangnier/simpleed-matlab-master | eval_earliness.m | .m | simpleed-matlab-master/core/simpleed/eval_earliness.m | 1,097 | utf_8 | ff9dffb0540a46c1a3a1d5c80bc450cf | % 20-Jul-2016
function res = eval_earliness(db_test, model, opt, leg)
% Prediction
[~, ~, decisions, decisions_time, labels] = ...
edpredict(db_test, model, opt);
% Scores
[xamoc, yamoc, auamoc] = timetodetection(decisions_time, labels);
auroc = aucscore(decisions, labels, model.Label(... |
github | msangnier/simpleed-matlab-master | simfulltrain.m | .m | simpleed-matlab-master/core/simpleed/simfulltrain.m | 4,006 | utf_8 | a8489409847757ade717d3c1c04cadba | function out = simfulltrain(y, x, varargin)
%SIMFULLTRAIN Proxy for NSVMTRAIN
% model = SIMFULLTRAIN(labels, data, options)
% accuracy = SIMFULLTRAIN(labels, data, options) if options.cv > 0
% perf = SIMFULLTRAIN(labels, data, options) if options.cv > 0 and
% options.perf exists
%
% INPUT:
% - labels... |
github | msangnier/simpleed-matlab-master | nsvmtrain.m | .m | simpleed-matlab-master/core/nsvm-linear/nsvmtrain.m | 10,787 | utf_8 | 6ed32b29366ee6cc49ce9315f613dd43 | function out = nsvmtrain(y, x, varargin)
%NSVMTRAIN Non-negative Support Vector Machine
% model = NSVMTRAIN(labels, data, options)
% accuracy = NSVMTRAIN(labels, data, options) if options.cv > 0
% perf = NSVMTRAIN(labels, data, options) if options.cv > 0 and
% options.perf exists
%
% INPUT:
% - label... |
github | msangnier/simpleed-matlab-master | nsvml1l2primaltrain.m | .m | simpleed-matlab-master/core/nsvm-linear/nsvml1l2primaltrain.m | 10,236 | utf_8 | 30da6e020c5b6beb5e0c87495bd068e8 | function model = nsvml1l2primaltrain(y, x, varargin)
%NSVML1L2PRIMALTRAIN Non-negative elastic net and L2-loss SVM trained in
%the primal.
% model = NSVML1L2PRIMALTRAIN(labels, data, C, min_bias, lambda, options)
%
% INPUT:
% - labels: column vector with two different values (preferably 1 and -1)
% - data: 2D m... |
github | msangnier/simpleed-matlab-master | svmbl1l2wprimaltrain.m | .m | simpleed-matlab-master/core/nsvm-linear/svmbl1l2wprimaltrain.m | 9,737 | utf_8 | 932f995df63a1ec844a68d307942cff0 | function model = svmbl1l2wprimaltrain(y, x, varargin)
%SVMBL1L2WPRIMALTRAIN Elastic net and L2-loss SVM trained in the primal
%(generalized forward backward splitting)
% model = SVMBL1L2WPRIMALTRAIN(labels, data, C, lambda, options)
%
% INPUT:
% - labels: column vector with two different values (preferably 1 and ... |
github | msangnier/simpleed-matlab-master | nsvml1l2primalactivesettrain.m | .m | simpleed-matlab-master/core/nsvm-linear/nsvml1l2primalactivesettrain.m | 8,714 | utf_8 | 8ed21224c6f36a11100c253ef7d92710 | function model = nsvml1l2primalactivesettrain(y, x, varargin)
%NSVML1L2PRIMALACTIVESETTRAIN Non-negative elastic net and L2-loss SVM
%trained in the primal with an active set strategy.
% model = NSVML1L2PRIMALACTIVESETTRAIN(labels, data, C, min_bias, lambda, options)
%
% INPUT:
% - labels: column vector with two ... |
github | RoardFruit/pgm-master | ComputeExactMarginalsBP.m | .m | pgm-master/PGM_Programming_Assignment_7/ComputeExactMarginalsBP.m | 2,258 | utf_8 | 73f38cb93f660bde0a2d28a1e4e01a2e | %COMPUTEEXACTMARGINALSBP Runs exact inference and returns the marginals
%over all the variables.
% M = COMPUTEEXACTMARGINALSBP(F,E, isMax) Takes a list of factors F,
% evidence E and a flag isMax and run exact inference and returns the
% final marginals for the variables in the network. If isMax is 1, then
% ... |
github | RoardFruit/pgm-master | FactorSum.m | .m | pgm-master/PGM_Programming_Assignment_7/FactorSum.m | 2,208 | utf_8 | b32940673c307cf1e23efcd1dc3cc9fe | % FactorProduct Computes the product of two factors.
% C = FactorSum(A,B) computes the sum of two factors, A and B,
% where each factor is defined over a set of variables with given dimension.
% The factor data structure has the following fields:
% .var Vector of variables in the factor, e.g. [1 2 3]
% ... |
github | RoardFruit/pgm-master | LRSearchLambdaSGD.m | .m | pgm-master/PGM_Programming_Assignment_7/LRSearchLambdaSGD.m | 1,232 | utf_8 | 77679825967e05becfa1d7510d0b437d | % function allAcc = LRSearchLambdaSGD(Xtrain, Ytrain, Xvalidation, Yvalidation, lambdas)
% For each value of lambda provided, fit parameters to the training data and return
% the accuracy in the validation data in the corresponding entry of allAcc.
% For instance, allAcc(i) = accuracy in the validation set using lambda... |
github | RoardFruit/pgm-master | EliminateVar.m | .m | pgm-master/PGM_Programming_Assignment_7/EliminateVar.m | 1,344 | utf_8 | 5eee22473a7397f75d71157c426f2ea7 | % Function used in production of clique trees
%
% Copyright (C) Daphne Koller, Stanford Univerity, 2012
function [newF C E] = EliminateVar(F, C, E, Z)
useFactors = [];
scope = [];
for i=1:length(F)
if any(F(i).var == Z)
useFactors = [useFactors i];
scope = union(scope, F(i).var);
end
end
% u... |
github | RoardFruit/pgm-master | StochasticGradientDescent.m | .m | pgm-master/PGM_Programming_Assignment_7/StochasticGradientDescent.m | 1,616 | utf_8 | 781ef29f8cf41868621072eb1ac56e12 | % function thetaOpt = StochasticGradientDescent (gradFunc, theta0, maxiter)
% runs gradient descent until convergence, returning the optimal parameters thetaOpt.
%
% Inputs:
% gradFunc function handle to a function [cost, grad] = gradFunc(theta, i)
% that computes the LR cost / objective function and... |
github | RoardFruit/pgm-master | IndexToAssignment.m | .m | pgm-master/PGM_Programming_Assignment_7/IndexToAssignment.m | 587 | utf_8 | 16baab12b20308058dd13e7565a96e60 | % IndexToAssignment Convert index to variable assignment.
%
% A = IndexToAssignment(I, D) converts an index, I, into the .val vector
% into an assignment over variables with cardinality D. If I is a vector,
% then the function produces a matrix of assignments, one assignment
% per row.
%
% See also Assignme... |
github | RoardFruit/pgm-master | LRCostSGD.m | .m | pgm-master/PGM_Programming_Assignment_7/LRCostSGD.m | 1,496 | utf_8 | d971795e0a6b27c9bc5e105958f368f5 | % [cost, grad] = LRCostSGD(X, y, theta, lambda, i) calculates the LR cost / objective
% function with respect to data instance (i mod n), given the LR classifier parameterized
% by theta and where n = the number of data instances. Also returns the gradient of
% the cost function with respect to data instance (i mod ... |
github | RoardFruit/pgm-master | CliqueTreeCalibrate.m | .m | pgm-master/PGM_Programming_Assignment_7/CliqueTreeCalibrate.m | 5,153 | utf_8 | c430a630a9c531aa7b3145e5c12fef33 | %CLIQUETREECALIBRATE Performs sum-product or max-product algorithm for
%clique tree calibration.
% [P] = CLIQUETREECALIBRATE(P, isMax) calibrates a given clique tree, P
% according to the value of isMax flag. If isMax is 1, it uses max-product
% message passing, otherwise uses sum-product. This function
% r... |
github | RoardFruit/pgm-master | GenerateAllFeatures.m | .m | pgm-master/PGM_Programming_Assignment_7/GenerateAllFeatures.m | 2,513 | utf_8 | d5e82ae09bde41bb49215839c7ce6c1b | % This function is called by InstanceNegLogLikelihood.
% Its input/output is specified there.
% If you're interested in the implementation details of CRFs,
% feel free to read through this code!
% For the purposes of this assignment, though, you don't
% have to understand how this code works.
%
% Copyright (C) Daphne K... |
github | RoardFruit/pgm-master | FactorMarginalization.m | .m | pgm-master/PGM_Programming_Assignment_7/FactorMarginalization.m | 1,551 | utf_8 | 470be9bc98bbb2fb7e2b10913db1da6d | % FactorMarginalization Sums given variables out of a factor.
% B = FactorMarginalization(A,V) computes the factor with the variables
% in V summed out. The factor data structure has the following fields:
% .var Vector of variables in the factor, e.g. [1 2 3]
% .card Vector of cardinalities corresp... |
github | RoardFruit/pgm-master | LRTrainSGD.m | .m | pgm-master/PGM_Programming_Assignment_7/LRTrainSGD.m | 1,353 | utf_8 | d3ef910e60f9f60de975d70858e94283 | % thetaOpt = LRTrainSGD(X, y, lambda) trains a logistic regression
% classifier using stochastic gradient descent. It returns the optimal theta values.
%
% Inputs:
% X data. (numInstances x numFeatures matrix)
% X(:,1) is all ones, i.e., it encodes the intercept/bias term.
%... |
github | RoardFruit/pgm-master | MaxDecoding.m | .m | pgm-master/PGM_Programming_Assignment_7/MaxDecoding.m | 659 | utf_8 | 9168d0f003f618eb31f0006d6c83970d | %MAXDECODING Finds the best assignment for each variable from the marginals
%passed in. Returns A such that A(i) returns the index of the best
%instantiation for variable i.
%
% For instance: Let's say we have two variables 1 and 2.
% Marginals for 1 = [0.1, 0.3, 0.6]
% Marginals for 2 = [0.92, 0.08]
% A(1) = ... |
github | RoardFruit/pgm-master | LRAccuracy.m | .m | pgm-master/PGM_Programming_Assignment_7/LRAccuracy.m | 658 | utf_8 | bf10b837298e6f94c490327c020e201e | % function acc = LRAccuracy(GroundTruth, Predictions) compares the
% vector of predictions with the vector of ground truth values,
% and returns the accuracy (fraction of predictions that are correct).
%
% Input:
% GroundTruth (numInstances x 1 vector)
% Predictions (numInstances x 1 vector)
%
% Output:
% err... |
github | RoardFruit/pgm-master | FactorProduct.m | .m | pgm-master/PGM_Programming_Assignment_7/FactorProduct.m | 2,160 | utf_8 | 7f87add7a3c8bfac085a23c8cb2ba03c | % FactorProduct Computes the product of two factors.
% C = FactorProduct(A,B) computes the product between two factors, A and B,
% where each factor is defined over a set of variables with given dimension.
% The factor data structure has the following fields:
% .var Vector of variables in the factor, e.g... |
github | RoardFruit/pgm-master | submit.m | .m | pgm-master/PGM_Programming_Assignment_7/submit.m | 20,967 | utf_8 | c1248b5f208f3aacb05dd313678cdb8b | function submit(partId, webSubmit)
%SUBMIT Submit your code and output to the pgm-class servers
% SUBMIT() will connect to the pgm-class server and submit your solution
% There is no penalty for submitting, so go ahead and try this!
%
% If this function does not work for you, use the web-submission mechanism.
% ... |
github | RoardFruit/pgm-master | ComputeInitialPotentials.m | .m | pgm-master/PGM_Programming_Assignment_7/ComputeInitialPotentials.m | 3,604 | utf_8 | 737d72093cf516b5431db5e4878b5891 | %COMPUTEINITIALPOTENTIALS Sets up the cliques in the clique tree that is
%passed in as a parameter.
% P = COMPUTEINITIALPOTENTIALS(C) Takes the clique tree C which is a
% struct with three fields:
% - nodes: represents the cliques in the tree.
% - edges: represents the adjacency matrix of the tree.
% - facto... |
github | RoardFruit/pgm-master | GetValueOfAssignment.m | .m | pgm-master/PGM_Programming_Assignment_7/GetValueOfAssignment.m | 834 | utf_8 | 0a65aef1740618807fb9e95821268dab | %GETVALUEOFASSIGNMENT Gets the value of a variable assignment in a factor.
%
% v = GETVALUEOFASSIGNMENT(F, A) returns the value of a variable assignment,
% A, in factor F. The order of the variables in A are assumed to be the
% same as the order in F.var.
%
% v = GETVALUEOFASSIGNMENT(F, A, VO) gets the va... |
github | RoardFruit/pgm-master | GetNextCliques.m | .m | pgm-master/PGM_Programming_Assignment_7/GetNextCliques.m | 1,742 | utf_8 | ba635097f61dfeba09e3885c9ee936b4 | %GETNEXTCLIQUES Find a pair of cliques ready for message passing
% [i, j] = GETNEXTCLIQUES(P, messages) finds ready cliques in a given
% clique tree, P, and current messages. Returns indices i and j
% such that clique i is ready to transmit a message to clique j.
% If no such cliques exist, returns i = j = 0
%
... |
github | RoardFruit/pgm-master | FactorMaxMarginalization.m | .m | pgm-master/PGM_Programming_Assignment_7/FactorMaxMarginalization.m | 1,694 | utf_8 | eaa4b78b713845fc6b57c262e4764292 | % FactorMaxMarginalization Takes the max of given variables when marginalizing out of a factor.
% B = FactorMarginalization(A,V) computes the factor with the variables
% in V summed out. The factor data structure has the following fields:
% .var Vector of variables in the factor, e.g. [1 2 3]
% .card... |
github | RoardFruit/pgm-master | ComputeMarginal.m | .m | pgm-master/PGM_Programming_Assignment_7/ComputeMarginal.m | 973 | utf_8 | b17f8235ad67cf5b95fb291d1d46eed1 | %ComputeMarginal Computes the marginal over a set of given variables
% M = ComputeMarginal(V, F, E) computes the marginal over variables V
% in the distribution induced by the set of factors F, given evidence E
%
% M is a factor containing the marginal over variables V
% V is a vector containing the variables i... |
github | RoardFruit/pgm-master | AssignmentToIndex.m | .m | pgm-master/PGM_Programming_Assignment_7/AssignmentToIndex.m | 609 | utf_8 | 3c17a18df90fc3a49aeebcb3e418e23f | % AssignmentToIndex Convert assignment to index.
%
% I = AssignmentToIndex(A, D) converts an assignment, A, over variables
% with cardinality D to an index into the .val vector for a factor.
% If A is a matrix then the function converts each row of A to an index.
%
% See also IndexToAssignment.m
%
% Copyright ... |
github | RoardFruit/pgm-master | CreateCliqueTree.m | .m | pgm-master/PGM_Programming_Assignment_7/CreateCliqueTree.m | 2,121 | utf_8 | a936108baf3997c53510b2efc9259f7b | %CREATECLIQUETREE Takes in a list of factors F, Evidence and returns a
%clique tree after calling ComputeInitialPotentials at the end.
%
% C = CREATECLIQUETREE(F) Takes a list of factors and creates a clique
% tree . The value of the cliques should be initialized to
% the initial potential.
% It returns a cl... |
github | RoardFruit/pgm-master | submitWeb.m | .m | pgm-master/PGM_Programming_Assignment_7/submitWeb.m | 580 | utf_8 | 5f4510147426716d140b1e22e95d36d7 | % submitWeb Creates files from your code and output for web submission.
%
% If the submit function does not work for you, use the web-submission mechanism.
% Call this function to produce a file for the part you wish to submit. Then,
% submit the file to the class servers using the "Web Submission" button on ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.