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 | marthawhite/reverse-prediction-master | Experiments.m | .m | reverse-prediction-master/algs/competitors/MR/Experiments.m | 6,532 | utf_8 | c85e0eefba2b31d72d55b85c86163f4d | function results=Experiments(dataset,NN,SIGMA,gamma_A,gamma_I,DEGREE,M)
% [err_svm,err_rlsc]=Experiments(dataset)
% dataset.mat should have matrices
% X (n x d training data matrix, n examples, d features)
% Xt (test data matrix) (if available)
% training labels Y
% test labels Yt (if available)
%
% NN: nu... |
github | marthawhite/reverse-prediction-master | classifier_evaluation.m | .m | reverse-prediction-master/algs/competitors/MR/classifier_evaluation.m | 1,742 | utf_8 | 1bb871f0399589f4ce43c27091513ad2 | % Classifier Evaluation Routine
% This code provides different methods to evaluate binary classifiers.
%
% Basic Usage :
% [maxthreshold,maxobj,maxcm]=classifier_evaluation(outputs,labels,func)
% outputs is a vector of real-valued outputs on a test set
% labels are corresponding true labels
% func : function of the ty... |
github | marthawhite/reverse-prediction-master | ExperimentsWebKB.m | .m | reverse-prediction-master/algs/competitors/MR/ExperimentsWebKB.m | 2,244 | utf_8 | 40e03bf590e307651ba73996f60b46b1 | function [prbep_svm,prbep_rlsc]=ExperimentsWebKB(mode,joint)
%% For binary classification on LINK.mat PAGE.mat PAGE+LINK.mat
%% mode='link' | 'page' | 'page+link'
%% link=0 or 1. Put 1 if you want to use a
%% joint regularizer (multi-view learning). Otherwise ignore this argument or put joint=0.
%% e.g [prbep_svm,p... |
github | marthawhite/reverse-prediction-master | make_options.m | .m | reverse-prediction-master/algs/competitors/MR/make_options.m | 6,396 | utf_8 | e86f6b554bd5088e376b275341142d5a | function options = make_options(varargin)
% ML_OPTIONS - Generate/alter options structure for training classifiers
% ----------------------------------------------------------------------------------------%
% options = ml_options('PARAM1',VALUE1,'PARAM2',VALUE2,...)
%
% Creates an options structure "options" in w... |
github | marthawhite/reverse-prediction-master | Lfor_log.m | .m | reverse-prediction-master/loss/Lfor_log.m | 1,069 | utf_8 | 305b0fbfa01210acb7adbbd9a41331d2 | function [f,g,log_constraint_opts] = Lfor_log(X,W,Y)
% assumes 0 <= X, because f^-1(YU) = exp(YU) = X
% f(z) = log(z), F(z) = [ln(z) - 1]^T z^T
% f = D_F(XW||f^*(Y)) = sum((ln(XW) - 1).*(XW)) - YW^T X^T)
% g = X^T(f(XW) - Y) = X^T(log(XW) - Y)
% NOTE: FUNCTION VALUES CAN BE LESS THAN ZERO BECAUSE WE ARE
% NOT WRITING ... |
github | zhujiagang/gating-ConvNet-code-master | classification_demo.m | .m | gating-ConvNet-code-master/caffe-action/matlab/demo/classification_demo.m | 5,466 | utf_8 | 45745fb7cfe37ef723c307dfa06f1b97 | 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 | uncledickHe/EMBED-master | FISTA.m | .m | EMBED-master/src/FISTA.m | 1,679 | utf_8 | cabc593990ccf7c5cf75d5d5b9048e57 | function [x,info] = FISTA(fun, PSF, b, x0, maxit)
% FISTA FAST ITERATIVE SHRINKAGE-THRESHOLDING ALGORITHM
%
% Usage: [x,info] = FISTA(@fun, PSF, b, x0, maxit)
%
% Input:
% @fun: Function handle with objective function and gradient
% PSF: Point-spread function
% b : Beamformer map
% x0: Starting vector
% max... |
github | vildenst/3D-heart-models-master | meshIntersectImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Meshes/meshIntersectImage.m | 3,242 | utf_8 | 1f67da0fd88c98728ce085baf3a959e4 | function flag = meshIntersectImage(meshIn, imageIn, varargin)
% returns true if the mesh and the image intersect at voxels where the
% image is nonzero
n=1/2;
dbg=false;
i=1;
while (i <= size(varargin,2))
if (strcmp( varargin{i} , 'debug'))
dbg= true;
elseif (strcmp( varargin{i} , 'thickness'))
... |
github | vildenst/3D-heart-models-master | meshBinarize.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Meshes/meshBinarize.m | 5,378 | utf_8 | 68a9f0e757ca5428555ce4c31170603c | function imageOut = meshBinarize(meshIn, imageIn, varargin)
% converts a mesh into a binary image (rasterization), on the grid defined
%
% Options:
% 'thickness' , n -> n is the number of voxel sizes at each size of
% the mesh that will be painted (by default, n=1/2)
n=1/2;
dbg=false;
i=1;
enlarge=0;
MAX_C... |
github | vildenst/3D-heart-models-master | meshClip.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Meshes/meshClip.m | 3,132 | utf_8 | 3114d4f956c33fad0ccaee6c15e99104 | function imageOut = meshClip(meshIn, meshStencil, varargin)
% Clips the input mesh, meshIn, using another mesh as a stencil
%
% Options:
% none
dbg=false;
i=1;
while (i <= size(varargin,2))
if (strcmp( varargin{i} , 'thickness'))
%n= varargin{i+2};
%i = i+1;
elseif(strcmp( varargin{i} , '... |
github | vildenst/3D-heart-models-master | PointInTriangle.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Geometry/PointInTriangle.m | 1,429 | utf_8 | 1e0294774d58c2ff4462665e17eee244 | function flag = PointInTriangle(p, a,b,c,varargin)
% returns true if the point p is inside the triangle defined by a,b,c (in 2D)
% p, a b and c are column points
MAX_CHUNK_SIZE = 50;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'maxChunkSize'))
MAX_CHUNK_SIZE = varargin{i+1};
i=i+1;
end ... |
github | vildenst/3D-heart-models-master | quatToRMat_igtl.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Geometry/quatToRMat_igtl.m | 695 | utf_8 | 9e936dfbc7128a6485d398ecf10859e1 | % Converts a quaternion to a 3quat(1)3 rotation matriquat(1)
function RMat = quatToRMat_igtl(quat)
quat = quat / norm(quat);
q00 = quat(1) * quat(1)*2; % xx
q0x = quat(1) * quat(2)*2; % xy
q0y = quat(1) * quat(3)*2; % xz
q0z = quat(1) * quat(4)*2; % xw
qxx = quat(2) * quat(2)*2; % yy
qxy = quat(2) * quat(3)*2; % yz... |
github | vildenst/3D-heart-models-master | quatToRMat.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Geometry/quatToRMat.m | 663 | utf_8 | 80939c0da0ee48fa73fe3cb23860ca2a | % Converts a quaternion to a 3x3 rotation matrix
function RMat = quatToRMat(quat)
quat = quat / norm(quat);
q00 = quat(1) * quat(1);
q0x = quat(1) * quat(2);
q0y = quat(1) * quat(3);
q0z = quat(1) * quat(4);
qxx = quat(2) * quat(2);
qxy = quat(2) * quat(3);
qxz = quat(2) * quat(4);
qyy = quat(3) * quat(3);
qyz = quat... |
github | vildenst/3D-heart-models-master | PointInFrustum.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Geometry/PointInFrustum.m | 1,559 | utf_8 | c0f77e35cf25a5d0459538a974dc4342 | function flag = PointInFrustum(p, frustum,varargin)
% returns true if the point p is inside the frustum (in 3D)
% p are column points
MAX_CHUNK_SIZE = 50;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'maxChunkSize'))
MAX_CHUNK_SIZE = varargin{i+1};
i=i+1;
end
end
NCHUNKS = cei... |
github | vildenst/3D-heart-models-master | PointInTriangle3D.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Geometry/PointInTriangle3D.m | 773 | utf_8 | 1efcaba15df43c2b2d0af1658acb24de | function flag = PointInTriangle3D(p, a,b,c)
% returns true if the point p is inside the triangle defined by a,b,c (in 3D)
% p, a b and c are column points
flag = SameSide(p,a, b,c) .* SameSide(p,b, a,c) .* SameSide(p,c, a,b);
end
function flag = SameSide(p1,p2, a,b)
% This function and the next one ... |
github | vildenst/3D-heart-models-master | coneImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Sources/coneImage.m | 1,756 | utf_8 | 6b9f19b1dc5ee1977b18d4b71c43b972 | % test_generateCone
function out = coneImage(points_axis, points_side, ref_im)
%% parameters
out = ImageType(ref_im);
th = sqrt(sum(ref_im.spacing.^2))/2;
%th=48;
npieces=1;
%% get the apex of the cone
Up = (points_axis(:,2)-points_axis(:,1))/norm(points_axis(:,2)-points_axis(:,1));
Uq = (points_side(:,2)-points... |
github | vildenst/3D-heart-models-master | prismImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Sources/prismImage.m | 2,348 | utf_8 | eaaddbc7ba27025ae9971ac325dc7ba5 | % test_generateCone
function out = prismImage(roi_file, ref_im,varargin)
% generate a prism from a roi, using the roi as base section and extruding
% along the normal to the roi plane
%% parameters
MAX_CHUNK_SIZE = 50;
MAX_CHUNK_SIZE = 50;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'debug'))
dbg = tr... |
github | vildenst/3D-heart-models-master | ellipsoidMesh.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Sources/ellipsoidMesh.m | 5,858 | utf_8 | 40ad36dfde772dfe5cff5b18d784b22e | function m = ellipsoidMesh(c,r,varargin)
% m = ellipsoidMesh(c,r)
% m = ellipsoidMesh(c,r,options)
%
% creates a MeshType object of a sphere of radius r (vector) and center c
%
% options meaning default
% ------- ------- -------
%
% 'resolution' sphereRes 16
% 'theta' angle [... |
github | vildenst/3D-heart-models-master | planeImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Sources/planeImage.m | 1,886 | utf_8 | 79304dd1339002b3779451aceb18423f |
function out = planeImage(p, n, ref_im,varargin)
%lets say that the plane is defined by the point p and the
%normal vector n.
skeletonize_plane=false;
MAX_CHUNK_SIZE = 50;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'debug'))
dbg = true;
elseif (strcmp(varargin{i},'skeletonize'))
skeletoni... |
github | vildenst/3D-heart-models-master | cylinderImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Sources/cylinderImage.m | 1,760 | utf_8 | 68ba9dd0b57b2de7f1309fb205a41b9e | % test_generateCone
function out = cylinderImage(points_axis, points_side, ref_im)
%% parameters
out = ImageType(ref_im);
th = sqrt(sum(ref_im.spacing.^2))/2;
%th=48;
npieces=1;
%% get the apex of the cone
Up = (points_axis(:,2)-points_axis(:,1))/norm(points_axis(:,2)-points_axis(:,1));
Uq = (points_side(:,2)-po... |
github | vildenst/3D-heart-models-master | gradientBinaryImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Basic/gradientBinaryImage.m | 2,165 | utf_8 | 69f6baceb835769d25fc803e1dce1151 | function out = gradientBinaryImage(im,varargin)
% out = gradientImage(im)
%
% Fast gradient of a binary image
% Works for ImageType
%
difforder = 1;
binary=false;
dbg=false;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'dbg'))
dbg=true;
elseif (strcmp(varargin{i},'order'))
difforder=varargi... |
github | vildenst/3D-heart-models-master | gradientImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Basic/gradientImage.m | 3,508 | utf_8 | e7bc4b29c506c5b31a86029b9080bd4b | function out = gradientImage(im,varargin)
% out = gradientImage(im)
%
% Fast gradient of an image
% Works for ImageType
%
difforder = 1;
binary=false;
dbg=false;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'dbg'))
dbg=true;
elseif (strcmp(varargin{i},'order'))
difforder=varargin{1};
el... |
github | vildenst/3D-heart-models-master | gaussianBlurImage.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/Basic/gaussianBlurImage.m | 1,858 | utf_8 | e77041b544d680c3bd86e18ebf395faa | function out = gaussianBlurImage(im,varargin)
% out = gaussianBlurImage(im)
%
% Fast gaussian blur
% Works for ImageType
%
filter_size = 5;
sigma = 1.5;
dbg = false;
for i=1:size(varargin,2)
if (strcmp(varargin{i},'dbg'))
dbg=true;
elseif (strcmp(varargin{i},'kernelSize'))
filter_size=varargin... |
github | vildenst/3D-heart-models-master | read_gipl2.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_gipl2.m | 4,167 | utf_8 | cc6279c2867274e206d8a231128307b0 | function [V, sizes, origin,scales] =read_gipl2(filename)
% function for reading header of Guys Image Processing Lab (Gipl) volume file
%
% [V, sizes, origin,scales] = gipl_read_header(filename);
%
%
% Copied from the package ReadData3D_version1h
fid=fopen(filename,'rb','ieee-be');
%fid=fopen(filename,'r','... |
github | vildenst/3D-heart-models-master | read_parrec2DFlow.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_parrec2DFlow.m | 18,394 | utf_8 | cb03377888f70ad72f5bdb0b5da050ff | function [outphase, outanatomy, patientdata] = read_parrec2DFlow(filename)
par_survey = parread(filename );
rec_survey = readrec([filename(1:end-3) 'REC' ]);
% Split the 5D 2Dflow data
data_mag = rec_survey(:,:,:,1,1);
if ndims(rec_survey)>3 && size(rec_survey,4)>1
data_oth = rec_survey(:,:,:,2,1); % ?
else
... |
github | vildenst/3D-heart-models-master | read_mhd.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_mhd.m | 10,497 | utf_8 | 1e583e41a4ab0481210876d95b95b93b | function [img, info]=read_mhd(filename)
% This function is based upon "read_mhd" function from the package
% ReadData3D_version1 from the matlab exchange.
% Copyright (c) 2010, Dirk-Jan Kroon
% [image info ] = read_mhd(filename)
info = mhareadheader(filename);
[path, name, extension] = fileparts(filename);
if (isfie... |
github | vildenst/3D-heart-models-master | read_vtkSP.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_vtkSP.m | 4,704 | utf_8 | 20a96a39be48ddd9fdc98826bb15deef | function [img, info]=read_vtkSP(filename)
% This function is based upon "read_mhd" function from the package
% ReadData3D_version1 from the matlab exchange.
% Copyright (c) 2010, Dirk-Jan Kroon
% [image info ] = read_mhd(filename)
info = vtkSPreadheader(filename);
img = VectorImageType(info.Dimensions',info.Offset',i... |
github | vildenst/3D-heart-models-master | read_roi.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_roi.m | 2,775 | utf_8 | 68644e9d752ab5c4857ac0a482658adf | function [roinormal, roiorigin, points2D, points3D] = read_roi(roi_file)
% [roinormal, roiorigin, points2D, points3D] = read_roi(roi_file)
%roi_file must be an xml file
% points are wc in 2D of the roi vertices. This space can be achieved by
% the matrix defined by origin and normal
roi_file = char(roi_file);
idx =... |
github | vildenst/3D-heart-models-master | read_nifty.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_nifty.m | 13,037 | utf_8 | fd40f3d530bce32b3eba55c19b8f5511 | function [img, info]=read_nifty(filename)
% [image info ] = read_nifty(filename)
% Adapted from the code
% "Tools for NIfTI and ANALYZE image"
% by Jimmy Shen
% Available at http://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image
if ~exist('filename','var')
error('Usage: nii =... |
github | vildenst/3D-heart-models-master | read_meshMesh.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_meshMesh.m | 2,725 | utf_8 | f44abbb2b7d5527f563591bcc2b210a5 | function mesh =read_meshMesh(filename)
% Function for reading a mesh in a Visualization Toolkit (VTK) format
%
% mesh = read_vtkMesh(filename);
%
% examples:
% mesh=read_vtkMesh('volume.vtk');
% mesh would be of the class MeshType
%from vtkCellType.h
keywordList={'MeshVersionFormatted','Dimension','Vert... |
github | vildenst/3D-heart-models-master | read_MITKPoints.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_MITKPoints.m | 4,015 | utf_8 | e5e60717ca44a830094c042e96c77277 | function out=read_MITKPoints(filename)
global bounds;
global points;
bounds = zeros(6,1);
points = [];
out = [];
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
theStruc... |
github | vildenst/3D-heart-models-master | read_gipl.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/processing/IO/read_gipl.m | 4,261 | utf_8 | b7e0a24be25a0a04a0c57e59ed2ca44f | function out =read_gipl(filename)
% function for reading header of Guys Image Processing Lab (Gipl) volume file
%
% out = gipl_read_header(filename);
%
% returns an ImageType
%
% Copied from the package ReadData3D_version1h
fid=fopen(filename,'rb','ieee-be');
%fid=fopen(filename,'r','native');
if(fid<0)... |
github | vildenst/3D-heart-models-master | MeshType.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/class_mesh/MeshType.m | 58,137 | utf_8 | 42bb608b029763866937bbd8bd41223d | classdef MeshType < handle
% This class defines a trinagulated mesh
% by Alberto Gomez, 2011
%
properties(GetAccess = 'public', SetAccess = 'public')
npoints=0;
ntriangles=0;
points=[];% npointsx3 matrix
triangles=[];%ntrianglesx3 matrix
bounds = [0 0 0 0 0 0... |
github | vildenst/3D-heart-models-master | QuadMeshType.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/class_mesh/QuadMeshType.m | 3,222 | utf_8 | 9b6dfff51ad7cca91802f4c03b1ce3a5 | classdef QuadMeshType < handle
% This class defines a trinagulated mesh
% by Alberto Gomez, 2011
%
properties(GetAccess = 'public', SetAccess = 'public')
end
methods(Access = public)
%constructor
function obj = QuadMeshType(npoints,ncells)
if(nargi... |
github | vildenst/3D-heart-models-master | QuadTetMeshType.m | .m | 3D-heart-models-master/Medical_Image_Processing_Toolbox/code/MedicalImageProcessingToolbox/class_mesh/QuadTetMeshType.m | 3,422 | utf_8 | 75ac3909ac15eac80a176b58cdf3d2cf | classdef QuadTetMeshType < handle
% This class defines a trinagulated mesh
% by Alberto Gomez, 2011
%
properties(GetAccess = 'public', SetAccess = 'public')
npoints=0;
ncells=0;
points=[];% npointsx3 matrix
cells=[];%ntrianglesx3 matrix
bounds = [0 0 0 0 0 0... |
github | vildenst/3D-heart-models-master | gmsh2pdetoolbox.m | .m | 3D-heart-models-master/gmsh/utils/converters/matlab/gmsh2pdetoolbox.m | 9,118 | utf_8 | 50a4231a31b359c82cee0ce1c21a5567 | %GMSH2PDETOOLBOX Reads a mesh in msh format, version 1 or 2 and returns the
%arrays p, e and t according to the MATLAB pde toolbox syntax. Filename
%refers to the .msh file. Note that only triangular 2D mesh are processed
%since these are the only elements allowed in pde toolbox.
%
%SEE ALSO load_gmsh load_gmsh4 initme... |
github | vildenst/3D-heart-models-master | notSliceAlignment.m | .m | 3D-heart-models-master/Matlab_Process/notSliceAlignment.m | 10,794 | utf_8 | ea94293cc4ba8101a75f2addc6b53570 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% ALIGN SLICES %
% %
%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | sliceAlignmentwithBivEpi.m | .m | 3D-heart-models-master/Matlab_Process/sliceAlignmentwithBivEpi.m | 10,222 | utf_8 | 7472fc9053aa8e361502b124939956d6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% ALIGN SLICES %
% %
%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | pairwiseAlignmentwithBivEpi.m | .m | 3D-heart-models-master/Matlab_Process/pairwiseAlignmentwithBivEpi.m | 30,224 | utf_8 | 8037aa97add81bb8bece5bc9457a8bd4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% TRANSFORM MOVING SUBJECT TO REFERENCE %
% %
%%%%%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | ChangeReswithBivEpi.m | .m | 3D-heart-models-master/Matlab_Process/ChangeReswithBivEpi.m | 4,216 | utf_8 | 3f0d69d6a6e13c8e079b28012d7909ce | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%% Change Resolution
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function SEG_NewRes = ChangeReswithBivEpi(SEG)
%% Account for voxel size for SEG1
% Account for voxel size
SEG.EndoX... |
github | vildenst/3D-heart-models-master | SaveMhd.m | .m | 3D-heart-models-master/Matlab_Process/SaveMhd.m | 1,925 | utf_8 | 50fa3ebe9a24a82d93a42d24d4e56a4e | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
%%% SAVE .MHD FILE IN PROPER FORMAT %%%
% % ... |
github | vildenst/3D-heart-models-master | notTemporalResampleAlignmentwithBivEpi.m | .m | 3D-heart-models-master/Matlab_Process/notTemporalResampleAlignmentwithBivEpi.m | 3,955 | utf_8 | c5714f1fe5c3d01c8d180ae4fa8d5133 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% TEMPORAL RESAMPLING OF POINT CLOUD WITH TEMPORAL ALIGNMENT TO ES PHASE %
% %
%%%%%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | pairwiseAlignment.m | .m | 3D-heart-models-master/Matlab_Process/pairwiseAlignment.m | 23,419 | utf_8 | de84214a29b38cb85a4942827379071f | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% TRANSFORM MOVING SUBJECT TO REFERENCE %
% %
%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | cleanPointIndices.m | .m | 3D-heart-models-master/Matlab_Process/cleanPointIndices.m | 15,343 | utf_8 | c948ac7359010a8aadb16886e9176014 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% CLEAN POINT INDEXING %
% %
%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | notTemporalResampleAlignment.m | .m | 3D-heart-models-master/Matlab_Process/notTemporalResampleAlignment.m | 3,203 | utf_8 | fe8bca106d0f1d6f62541ffb47586dc0 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% TEMPORAL RESAMPLING OF POINT CLOUD WITH TEMPORAL ALIGNMENT TO ES PHASE %
% %
%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | cleanPointIndiceswithBivEpi.m | .m | 3D-heart-models-master/Matlab_Process/cleanPointIndiceswithBivEpi.m | 17,540 | utf_8 | 0b35d1c10b75c3d2ecd05bcb56ca1db5 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% CLEAN POINT INDEXING %
% %
%%%%%%%%%%%%%%%%... |
github | vildenst/3D-heart-models-master | fillWedge.m | .m | 3D-heart-models-master/Matlab_Process/Bullseye/fillWedge.m | 1,991 | utf_8 | 151b6cdd2780385e92dc40c7409c490d | % PATCHCHIDLREN = FILLWEDGE(vec,rho1,rho2,theta1,theta2) creates a
% wedge "patch" using xdata/ydata from a polar plot. The color of the patch
% is determined scaled by the value of the vector. To be used with
% createBullseye. In order to not have the vector automatically scaled, the
% max of the vector should n... |
github | vildenst/3D-heart-models-master | createBullseye.m | .m | 3D-heart-models-master/Matlab_Process/Bullseye/createBullseye.m | 2,354 | utf_8 | 28986c77cb08e385bce379f26f906fa6 | function bullseyeChild = createBullseye(data)
% CREATEBULLSEYE creates a bullseye, with the main function of creating
% an AHA 17 segment bullseye. Each row in "data" should have the
% following structure:
%
% [rho1, rho2, nSegs, thetaStart]
%
% where
% -rho1 is the... |
github | EthanZhu90/MultilayerBSMC_ICCV17-master | bsmc_loadDataset.m | .m | MultilayerBSMC_ICCV17-master/Code/BSMC/bsmc_loadDataset.m | 1,635 | utf_8 | 606df2888d974332a6fe830fc76e72c3 | function [img_template, start_frame, last_frame, options, datapath] = bsmc_loadDataset(dataset)
% global mTracksAll;
% global mLabelAll;
basedir = strrep(fileparts(mfilename('fullpath')),'\','/');
options.lookahead = 5;
options.smoothSize = 5;
res = 3;
datapath = [ basedir, '/../../Data/moseg_dataset/', dataset];
i... |
github | EthanZhu90/MultilayerBSMC_ICCV17-master | bsmc_computeSegKDE.m | .m | MultilayerBSMC_ICCV17-master/Code/BSMC/bsmc_computeSegKDE.m | 20,682 | utf_8 | 77f76f706e03ffe72fcddadc5b904ce0 | function [state] = bsmc_computeSegKDE(state, options)
debug_info = struct;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Initialize with Maximum Liklihood segmentation using graph cut.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
layer_num = length(state.layers);
label_mask = bsmc_computeGC... |
github | EthanZhu90/MultilayerBSMC_ICCV17-master | bsmc_predictModelKDE.m | .m | MultilayerBSMC_ICCV17-master/Code/BSMC/bsmc_predictModelKDE.m | 6,735 | utf_8 | 7d66ba64d2f1803f04be114e616f1f52 | function [state] = bsmc_predictModelKDE(prevState, state, options)
% addpath('/home/elqursh/Projects/Research/Libraries/Belief Propagation/gabp-src/');
if (~isfield(prevState,'layers'))
% Initialize appearance model
%fprintf('\nInitializing appearance models\n');
layer_num = ... |
github | EthanZhu90/MultilayerBSMC_ICCV17-master | bsmc_inferM.m | .m | MultilayerBSMC_ICCV17-master/Code/BSMC/bsmc_inferM.m | 3,154 | utf_8 | 6e643c4c758b092955aedcc4b4db0354 | function state = bsmc_inferM(state, options)
% Given the motion vectors for the background objects, infer the optical
% flow field. Use gaussian belief propagation GaBP.
% Compute Vxx
h = size(state.frame,1);
w = size(state.frame,2);
% n = w * h;
Vxx = bsmc_computeVxx(w,h);
Vxx = Vxx ./ (options.sig_edge^2);
layer... |
github | EthanZhu90/MultilayerBSMC_ICCV17-master | munkres.m | .m | MultilayerBSMC_ICCV17-master/Code/BSMC/munkres.m | 7,171 | utf_8 | b44ad4f1a20fc5d03db019c44a65bac3 | 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... |
github | bobbielf2/BIE2D-master | fig_lapconvK1.m | .m | BIE2D-master/doublyperiodic/fig_lapconvK1.m | 11,601 | utf_8 | c2453cbaaf467699775bd8ef1b668792 | function fig_lapconvK1
% Laplace Neu periodic BVP, convergence and soln plots. Single inclusion (K=1).
% All dense matrices, native quadr for solve, close eval for plot.
% Barnett, cleaned up from perineu2dnei1.m 5/11/16.
% Small codes broken out 6/12/16 (no longer self-contained); BIE2D 6/29/16
% X,y,r notation & non-... |
github | bobbielf2/BIE2D-master | discarray_effcond.m | .m | BIE2D-master/doublyperiodic/discarray_effcond.m | 6,827 | utf_8 | 0cd727ae0e5af132cf84c4aaab8f83c8 | function discarray_effcond
% Effective conductivity (kappa) of infinite disc array.
% Laplace BVP, single inclusion (K=1), native quad for matrix fill, ELS.
% Adapted from fig_discarray_drag. Uses helsingeffcond.m
% Barnett 9/27/17. Fixed close and reparam 9/28/17
warning('off','MATLAB:nearlySingularMatrix') % backwa... |
github | bobbielf2/BIE2D-master | tbl_discarray_effcond.m | .m | BIE2D-master/doublyperiodic/tbl_discarray_effcond.m | 6,764 | utf_8 | b925bed5cfcbc409931d694fb40dae0c | function tbl_discarray_effcond
% Make table of effective conductivity (kappa) of infinite disc array, to match
% some of Table 2 of J. Helsing, Proc Roy Lond Soc A, 1994.
% Laplace BVP, single inclusion (K=1), native quad for matrix fill, ELS.
% Adapted from fig_discarray_drag. Uses helsingeffcond.m
% Barnett 9/27/17. ... |
github | bobbielf2/BIE2D-master | fig_lapQconv.m | .m | BIE2D-master/doublyperiodic/fig_lapQconv.m | 4,226 | utf_8 | 53cb37327b9b69b670d62166e6490497 | function fig_lapQconv
% make figs for doubly periodic empty BVP convergence, Laplace case.
% All matrix-filling, native quadr.
% Barnett 5/9/16, adapted from perineu2dnei1.m. bie2d 6/29/16
warning('off','MATLAB:nearlySingularMatrix') % backward-stable ill-cond is ok!
warning('off','MATLAB:rankDeficientMatrix')
lso.RE... |
github | bobbielf2/BIE2D-master | fig_stoconvK1.m | .m | BIE2D-master/doublyperiodic/fig_stoconvK1.m | 14,350 | utf_8 | a14b0223bf06c064ce2f6832f4f9e102 | function fig_stoconvK1
% make Stokes no-slip periodic convergence and soln plots.
% Single inclusion (K=1), native quad for matrix fill, close eval for soln.
% Adapted from fig_lapconvK1.m
% Barnett 6/7/16. 6/30/16 brought into BIE2D.
% X,y,R,H notation, Gary's V=CH, Alex's nullspace fix, nonrandom. 8/17/16
warning('o... |
github | bobbielf2/BIE2D-master | tbl_discarray_drag.m | .m | BIE2D-master/doublyperiodic/tbl_discarray_drag.m | 7,934 | utf_8 | d8f267701cfcdf9fb46e2a2508f94771 | function tbl_discarray_drag
% Generate table of dimensionless drag of regular array of discs, to match
% Table 1 of Greengard-Kropinski, J. Engs. Math. 48: 157–170, 2004.
% Single inclusion (K=1), native quad for matrix fill, ELS.
% Adapted from fig_stoconvK1.m
% Barnett 8/2/16, graded parameterization 10/7/17
warning... |
github | bobbielf2/BIE2D-master | fig_stoQconv.m | .m | BIE2D-master/doublyperiodic/fig_stoQconv.m | 3,497 | utf_8 | 838064073588a49d7f6071d4c69954d6 | function fig_stoQconv
% Makes figs for doubly-periodic empty BVP convergence, Stokes.
% Barnett 5/28/16. Adapted from fig_lapQconv.m. BIE2D 6/29/16
warning('off','MATLAB:nearlySingularMatrix') % backward-stable ill-cond is ok!
warning('off','MATLAB:rankDeficientMatrix')
lso.RECT = true; % linsolve opts, forces QR ... |
github | bobbielf2/BIE2D-master | perispecint.m | .m | BIE2D-master/utils/perispecint.m | 1,392 | utf_8 | 87d49dc8e157443f20a2f45659b2f554 | function g = perispecint(f)
% PERISPECINT - use FFT to take periodic spectral antiderivative of vector
%
% g = perispecint(f) returns g an antiderivative of the spectral interpolant
% of f, which is assumed to be the values of a smooth 2pi-periodic function
% at the N gridpoints 2.pi.j/N, for j=1,..,N (or any transla... |
github | bobbielf2/BIE2D-master | showsegment.m | .m | BIE2D-master/utils/showsegment.m | 1,213 | utf_8 | 3672151c11b3e1fd043630c3b5e1bb20 | function h = showsegment(s, trlist)
% SHOWSEGMENT plot segment(s) & possibly translated copies
%
% h = showsegment(s) where s is segment struct with s.x nodes, optionally s.nx
% normal vectors, adds to the current axes a plot of the segment.
% If s is a cell array of segment structs, it plots all of them.
%
% h = s... |
github | bobbielf2/BIE2D-master | gauss.m | .m | BIE2D-master/utils/gauss.m | 287 | utf_8 | cc60b6c98d11c710bbcbce2f5a42802b | % GAUSS nodes x (Legendre points) and weights w
% for Gauss quadrature on [-1,1], for N small (<100). Trefethen book.
function [x,w] = gauss(N)
beta = .5./sqrt(1-(2*(1:N-1)).^(-2));
T = diag(beta,1) + diag(beta,-1);
[V,D] = eig(T);
x = diag(D); [x,i] = sort(x);
w = 2*V(1,i).^2;
|
github | bobbielf2/BIE2D-master | perispecinterp.m | .m | BIE2D-master/utils/perispecinterp.m | 1,118 | utf_8 | 3612c6bd058b5d08dd68ee217dfb9a24 | function g = perispecinterp(f,N)
% PERISPECINTERP resample periodically sampled function on finer uniform grid.
%
% g = perispecinterp(f,N)
% inputs: f - (row or column) vector length n (must be even) of samples
% N - desired output number of samples, must be >= n and even
% outputs: g - vector length N of ... |
github | bobbielf2/BIE2D-master | reparam_bunched.m | .m | BIE2D-master/utils/reparam_bunched.m | 1,412 | utf_8 | e7ff2d7e6e384306d05b7a1cafdbd40a | function s = reparam_bunched(s,be)
% REPARAM_BUNCHED Reparameterize a segment slowing down at 0,pi/2,pi,3pi/2.
%
% s = reparam_bunched(s,be) takes a segment struct s and returns another,
% where be is the beta parameter giving the angular range devoted to the
% central. The bunching factor is of order exp(be), or bu... |
github | bobbielf2/BIE2D-master | setupquad.m | .m | BIE2D-master/utils/setupquad.m | 4,215 | utf_8 | 0774317ae402c3f279b63eec2b2179dd | function s = setupquad(s, N)
% SETUPQUAD Set up periodic trapezoid quadrature & geom for smooth closed curve
%
% s = setupquad(s,N) where s is a struct containing a parametrization of the
% curve in the form of function s.Z from [0,2pi) to the complex plane, uses
% this to build the set of nodes, weights, speeds, cu... |
github | bobbielf2/BIE2D-master | wobblycurve.m | .m | BIE2D-master/utils/wobblycurve.m | 1,160 | utf_8 | 0dba00c5a6771d86bd120c42bdf738bc | function s = wobblycurve(r0,a,w,N)
% WOBBLYCURVE Set up a wobbly smooth closed curve ("starfish")
%
% s = wobblycurve(r0,a,w) where r0 is the mean radius (eg 1), a is amplitude of
% wobble (eg 0.3) and w is the frequency (eg 5), returns a segment struct of
% the form as in setupquad, but with s.inside being a handl... |
github | bobbielf2/BIE2D-master | perispecdiff.m | .m | BIE2D-master/utils/perispecdiff.m | 853 | utf_8 | 083247f836d7df429d48963ea3567cdb | function g = perispecdiff(f)
% PERISPECDIFF - use FFT to take periodic spectral differentiation of vector
%
% g = perispecdiff(f) returns g the derivative of the spectral interpolant
% of f, which is assumed to be the values of a smooth 2pi-periodic function
% at the N gridpoints 2.pi.j/N, for j=1,..,N (or any transl... |
github | bobbielf2/BIE2D-master | StoDLP_closeglobal.m | .m | BIE2D-master/kernels/StoDLP_closeglobal.m | 5,987 | utf_8 | f3e6f06539c4ac195862d0e1d38f6a75 | function [u p] = StoDLP_closeglobal(t, s, mu, sigma, side)
% STODLP_CLOSEGLOBAL - close-eval velocity Stokes DLP w/ global quadr curve
%
% u = StoDLP_closeglobal(t,s,mu,dens,side) returns velocities at targets t.x
% due to double-layer potential with real-valued density dens sampled on the
% nodes s.x of a smoot... |
github | bobbielf2/BIE2D-master | StoSLP.m | .m | BIE2D-master/kernels/StoSLP.m | 4,799 | utf_8 | 25b27eac66dc0b0b2ba3174216d67926 | function [u,p,T] = StoSLP(t,s,mu,dens)
% STOSLP Evaluate 2D Stokes single-layer velocity, pressure, and traction.
%
% [A,P,T] = StoSLP(t,s,mu) returns dense matrices taking single-layer
% density values on the nodes of a source curve to velocity, pressure, and
% traction on the nodes of a target curve. Native quadr... |
github | bobbielf2/BIE2D-master | StoSLP_closeglobal.m | .m | BIE2D-master/kernels/StoSLP_closeglobal.m | 5,682 | utf_8 | 94e1275fce7eed65d38ab3422727bae9 | function [u p] = StoSLP_closeglobal(t, s, mu, sigma, side)
% STOSLP_CLOSEGLOBAL - close-eval velocity Stokes SLP w/ global quadr curve
%
% u = StoSLP_closeglobal(t,s,mu,dens,side) returns velocities at targets t.x
% due to single-layer potential with real-valued density dens sampled on the
% nodes s.x of a smoot... |
github | bobbielf2/BIE2D-master | LapSLP_closeglobal.m | .m | BIE2D-master/kernels/LapSLP_closeglobal.m | 8,255 | utf_8 | e2057039f30f6ba95db0e0a61eeea742 | function [u ux uy info] = LapSLP_closeglobal(t, s, tau, side)
% LAPSLP_CLOSEGLOBAL - Laplace SLP potential & deriv w/ global close-eval quad
%
% u = LapSLP_closeglobal(t,s,dens,side) returns potentials at targets t.x
% due to single-layer potential with real-valued density dens sampled on the
% nodes s.x of a smooth ... |
github | bobbielf2/BIE2D-master | LapDLP.m | .m | BIE2D-master/kernels/LapDLP.m | 2,338 | utf_8 | af3c40315b00f14da317ca4ed61de17a | function [u un] = LapDLP(t,s,dens)
% LAPDLP Evaluate Laplace double-layer potential from curve to targets
%
% This evaluates the 2D Laplace double-layer potential for the density tau,
%
% u(x) = (1/2pi) int_gamma (n_y.(x-y))/r^2 tau(y) ds_y,
% where r:=x-y, x,y in R2,
%
% using the native quadrature rule on the... |
github | bobbielf2/BIE2D-master | LapSLP.m | .m | BIE2D-master/kernels/LapSLP.m | 2,194 | utf_8 | a059bb7d72b5cea17a636e72f1f03b63 | function [u un] = LapSLP(t,s,dens)
% LAPSLP Evaluate Laplace single-layer potential from curve to targets
%
% This evaluates the 2D Laplace single-layer potential for the density tau,
%
% u(x) = (1/2pi) int_gamma log(1/r) tau(y) ds_y, where r:=x-y, x,y in R2,
%
% using the native quadrature rule on the source s... |
github | bobbielf2/BIE2D-master | LapDLP_closeglobal.m | .m | BIE2D-master/kernels/LapDLP_closeglobal.m | 5,939 | utf_8 | 6a45d8371c9f21057986fe1eef5807ba | function [u ux uy info] = LapDLP_closeglobal(t, s, tau, side)
% LAPDLP_CLOSEGLOBAL - Laplace DLP potential & deriv w/ global close-eval quad
%
% u = LapDLP_closeglobal(t,s,dens,side) returns potentials at targets t.x
% due to double-layer potential with real-valued density dens sampled on the
% nodes s.x of a smooth ... |
github | bobbielf2/BIE2D-master | srcsum2.m | .m | BIE2D-master/kernels/srcsum2.m | 3,784 | utf_8 | 813262bbeb3de8223b1dd07456429793 | function [A B C] = srcsum2(kernel, trlist, phlist, t, s, varargin)
% SRCSUM2 Sum a kernel eval or matrix over source translations via single call
%
% This is a variant of srcsum that sums over targets in a single kernel call,
% instead of summing over sources with multiple calls. This is useful for
% periodized clo... |
github | bobbielf2/BIE2D-master | Cau_closeglobal.m | .m | BIE2D-master/kernels/Cau_closeglobal.m | 21,333 | utf_8 | 4dd051a07dc6fea05de5cbef9eb8e089 | function [vc vcp] = Cau_closeglobal(x,s,vb,side,o)
% CAU_CLOSEGLOBAL. Globally compensated barycentric int/ext Cauchy integral
%
% This is a spectrally-accurate close-evaluation scheme for Cauchy integrals.
% It returns approximate values (and possibly first derivatives) of a function
% either holomorphic inside of,... |
github | bobbielf2/BIE2D-master | srcsum.m | .m | BIE2D-master/kernels/srcsum.m | 3,271 | utf_8 | 02e5ed4b7254f5901fc6b48d2c328a98 | function [A B C] = srcsum(kernel, trlist, phlist, t, s, varargin)
% SRCSUM Sum any kernel evaluation or matrix over a set of source translations
%
% Note, unlike srcsum2 this handles self-interactions correctly
%
% [A B ...] = srcsum(kernel, trlist, phlist, t, s)
% [A B ...] = srcsum(kernel, trlist, phlist, t, s, par... |
github | bobbielf2/BIE2D-master | StoDLP.m | .m | BIE2D-master/kernels/StoDLP.m | 4,661 | utf_8 | d031357a91adbb7c5de42d4cad0c7c0e | function [u,p,T] = StoDLP(t,s,mu,dens)
% STODLP Evaluate 2D Stokes single-layer velocity, pressure, and traction.
%
% [A,P,T] = StoDLP(t,s,mu) returns dense matrices taking double-layer
% density values on the nodes of a source curve to velocity, pressure, and
% traction on the nodes of a target curve. Native quadr... |
github | bobbielf2/BIE2D-master | perivelpipe_gmres.m | .m | BIE2D-master/singlyperiodic/perivelpipe_gmres.m | 13,644 | utf_8 | a0298df440e4fe5136d64642b3649cc2 | function perivelpipe_gmres
% Longitudinal periodize 2D velocity-BC Stokes "pipe" geom w/ press drop (pgro)
% using circle of SLP proxy sources. Barnett, for Veerapaneni & Gillman 3/11/14
% Playing w/ GMRES and Schur options 3/17/15
clear; v=1; expt='t'; % verbosity=0,1,2. expt='t' test, 'd' driven no-slip demo
makefig... |
github | bobbielf2/BIE2D-master | perivelpipe.m | .m | BIE2D-master/singlyperiodic/perivelpipe.m | 12,601 | utf_8 | 685092c15e0d7d2584349abcd2fafbfd | function perivelpipe
% Longitudinal periodize 2D velocity-BC Stokes "pipe" geom w/ press drop (pgro)
% using circle of SLP proxy sources. Barnett, for Veerapaneni & Gillman 3/11/14
clear; v=2; expt='t'; % verbosity=0,1,2. expt='t' test, 'd' driven no-slip demo
makefigs = 0; % whether to write to EPS files for writeu... |
github | bobbielf2/BIE2D-master | testStokernels.m | .m | BIE2D-master/test/testStokernels.m | 5,133 | utf_8 | bcde9edae25a2ce341ecc155327ee854 | function testStokernels
% TESTSTOKERNELS plot and test properties of Stokes kernels.
%
% Plot and test 2D Stokes kernels, both velocity and pressure bits,
% check satisfies Stokes PDE, traction is correct, and
% net outflow and force on wall integrated over enclosing circle,
% Barnett 6/27/16 cleaned up from testker... |
github | SenticNet/one-class-svm-master | mog_threshold.m | .m | one-class-svm-master/dd_tools/mog_threshold.m | 1,645 | utf_8 | 52fd54f310b2cbf05db73c6e39b92de8 | %MOG_THRESHOLD Set threshold of a MoG
%
% W = MOG_THRESHOLD(W,X,FRACREJ)
%
% INPUT
% W One-class MoG mapping
% X One-class dataset
% FRACREJ Error on the target class
%
% OUTPUT
% W Updated MoG mapping
%
% DESCRIPTION
% Set the threshold of the Mixture of Gaussians mapping W. The ... |
github | SenticNet/one-class-svm-master | svdd.m | .m | one-class-svm-master/dd_tools/svdd.m | 4,393 | utf_8 | 7d15dceb9662d7101722079a0313fd3a | %SVDD Support Vector Data Description
%
% W = SVDD(A,FRACREJ,SIGMA)
% W = A*SVDD([],FRACREJ,SIGMA)
% W = A*SVDD(FRACREJ,SIGMA)
%
% INPUT
% A One-class dataset
% FRACREJ Error on the target class (default = 0.1)
% SIGMA Width parameter in the RBF kernel (default = 5)
%
%... |
github | SenticNet/one-class-svm-master | gendatoc.m | .m | one-class-svm-master/dd_tools/gendatoc.m | 1,832 | utf_8 | 2af0f2804f3cc1065009f1ed7e03a85d | %GENDATOC Generate a one-class dataset
%
% X = GENDATOC(Xt,Xo)
%
% INPUT
% Xt Data matrix
% Xo Data matrix
%
% OUTPUT
% X One-class dataset
%
% DESCRIPTION
% Generate the one-class dataset X from the two datasets Xt and Xo. Dataset
% Xt will be labelled 'target', and Xo will be labelled ... |
github | SenticNet/one-class-svm-master | dd_f1.m | .m | one-class-svm-master/dd_tools/dd_f1.m | 1,328 | utf_8 | a6ab3a364d8d2f70825d318cfd6ba1d6 | %DD_F1 compute the F1 score
%
% E = DD_F1(X,W)
% E = DD_F1(X*W)
% E = X*W*DD_F1
%
% INPUT
% X One-class dataset
% W One-class classifier
%
% OUTPUT
% E F1 performance
%
% DESCRIPTION
% Compute the F1 score of a dataset, defined as:
% 2*precision*recall
% F1 = ------------------
% ... |
github | SenticNet/one-class-svm-master | inckernel.m | .m | one-class-svm-master/dd_tools/inckernel.m | 1,254 | utf_8 | 8a1f1cc91511a0d84ee9919363086593 | %INCKERNEL Kernel definition for incsvdd/incsvc
%
% K = INCKERNEL(PAR,I,J);
%
% INPUT
% PAR structure defining kernel type and parameters
% I,J index (i,j) in kernel
%
% OUTPUT
% K kernel value K(i,j)
%
% DESCRIPTION
% Computation of the kernel function for the incremental SVDD. I... |
github | SenticNet/one-class-svm-master | unrandomize.m | .m | one-class-svm-master/dd_tools/unrandomize.m | 1,011 | utf_8 | 135113edf3db5e4d8cfb2c60a065157d | %UNRANDOMIZE 'Unrandomize' a dataset
%
% B = UNRANDOMIZE(A);
%
% INPUT
% A Dataset
%
% OUTPUT
% B Dataset
%
% DESCRIPTION
% Reorder the objects in dataset A such that objects of the two classes
% appear uniformly in the whole dataset. This is needed for the
% incremental SVC to avoid that first the SVC ... |
github | SenticNet/one-class-svm-master | rankboostc.m | .m | one-class-svm-master/dd_tools/rankboostc.m | 4,578 | utf_8 | aec9a75320d6a824b1e620eeb2ea839f | %RANKBOOSTC Binary rankboost
%
% W = RANKBOOSTC(A,FRACREJ,T)
% W = A*RANKBOOSTC([],FRACREJ,T)
% W = A*RANKBOOSTC(FRACREJ,T)
%
% INPUT
% A One-class dataset
% FRACREJ Error on the target class (default = 0.1)
% T Number of weak classifiers (default = 10)
%
% OUTPUT
% W Rankboost
%
... |
github | SenticNet/one-class-svm-master | incsvdd.m | .m | one-class-svm-master/dd_tools/incsvdd.m | 3,343 | utf_8 | cfa3e2c2bd9db67acfae61bb61eed739 | %INCSVDD Incremental Support Vector Data Description
%
% W = INCSVDD(A,FRACREJ,KTPYE,KPAR)
% W = A*INCSVDD([],FRACREJ,KTPYE,KPAR)
% W = A*INCSVDD(FRACREJ,KTPYE,KPAR)
%
% INPUT
% A One-class dataset
% FRACREJ Error on target class (default = 0.1)
% KTYPE Kernel type (default = 'p')
% KPAR ... |
github | SenticNet/one-class-svm-master | isocset.m | .m | one-class-svm-master/dd_tools/isocset.m | 544 | utf_8 | f9bb86dbf1ced69b0754506c8769c1b2 | %ISOCSET True for one-class datasets
%
% N = ISOCSET(A)
%
% INPUT
% A Dataset
%
% OUTPUT
% N 0/1 if A isn't/is a one-class dataset
%
% DESCRIPTION
% Exactly the same as IS_OCSET, so that you can use it with or without
% underscore in the name.
%
% SEE ALSO
% is_ocset
% Copyright: D.M... |
github | SenticNet/one-class-svm-master | dlpdda.m | .m | one-class-svm-master/dd_tools/dlpdda.m | 4,805 | utf_8 | 872c864b7b8f3ea5cad4550e3904156e | %DLPDDA Distance Linear Programming Data Description attracted by the Average distance
%
% W = DLPDDA(D,NU)
% W = D*DLPDDA([],NU)
% W = D*DLPDDA(NU)
%
% INPUT
% D Dissimilarity dataset
% NU Error fraction on target class (default = 0.1)
%
% OUTPUT
% W Distance LPDD
%
% DESCRIPTION
% T... |
github | SenticNet/one-class-svm-master | plotroc_update.m | .m | one-class-svm-master/dd_tools/plotroc_update.m | 4,003 | utf_8 | d8ed5dd7ae04ed502abf5bc2ff4b8cea | % PLOTROC_UPDATE(W,A)
%
% Auxiliary function containing the callbacks for the plotroc.m.
%
% SEE ALSO
% plotroc
% Copyright: D.M.J. Tax, D.M.J.Tax@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands
function plotroc_update(w,a)
if isocc(w)
if ~isocset(a)
error... |
github | SenticNet/one-class-svm-master | autoenc_dd.m | .m | one-class-svm-master/dd_tools/autoenc_dd.m | 2,643 | utf_8 | c7e0eb588df89acaff5800fe9c6fa31a | %AUTOENC_DD Auto-Encoder data description.
%
% W = AUTOENC_DD(A,FRACREJ,N)
% W = A*AUTOENC_DD([],FRACREJ,N)
% W = A*AUTOENC_DD(FRACREJ,N)
%
% INPUT
% A Dataset
% FRACREJ Fraction of target objects rejected (default = 0.1)
% N Number of hidden units (default = 5)
%
% OUTPUT
% W Auto... |
github | SenticNet/one-class-svm-master | mog_update.m | .m | one-class-svm-master/dd_tools/mog_update.m | 970 | utf_8 | d06184a26ce64866f68d4388065a7cfc | %MOG_UPDATE Train a MoG
%
% W = MOG_UPDATE(W,X,MAXITER)
%
% INPUT
% W MoG mapping
% X One-class dataset
% MAXITER Number of EM iterations
%
% OUTPUT
% W Updated MoG mapping
%
% DESCRIPTION
% Fit a Mixture of Gaussians model W to data X, for MAXITER number of EM
% steps.
%
% SEE ALS... |
github | SenticNet/one-class-svm-master | roc2hit.m | .m | one-class-svm-master/dd_tools/roc2hit.m | 1,142 | utf_8 | 3dd784d876857cb48245e1a7a420c8f3 | %ROC2HIT Conversion ROC to hit-rate/false-alarm curve
%
% P = ROC2HIT(R,N)
%
% INPUT
% R ROC curve
% N Number of target and outlier objects
%
% OUTPUT
% P Hit-rate/false-alarm curve
%
% DESCRIPTION
% Convert ROC curve R into a Hit-Rate/false-alarm graph P.
% This is only possible when you supply the ... |
github | SenticNet/one-class-svm-master | svddpath_opt.m | .m | one-class-svm-master/dd_tools/svddpath_opt.m | 4,332 | utf_8 | 42c11eaca25dae5460fadc4c5aaa0c9c | %SVDDPATH_OPT SVDD path of C
%
% [LAMBDA,ALF,B,O] = SVDDPATH_OPT(K,ENDLAMBDA)
%
% This is the optimization function for the weights in the SVDD by
% varying the lambda (C) parameter. Lambda is changed from the maximum
% (= the number of training objects) to the minimum, given by the user
% in ENDLAMBDA. The solution... |
github | SenticNet/one-class-svm-master | nparzen_dd.m | .m | one-class-svm-master/dd_tools/nparzen_dd.m | 3,087 | utf_8 | 8a29fdf04e296ad525f206c3e41a0b05 | %NPARZEN_DD Naive Parzen data description.
%
% W = NPARZEN_DD(A,FRACREJ,H)
% W = A*NPARZEN_DD([],FRACREJ,H)
% W = A*NPARZEN_DD(FRACREJ,H)
%
% INPUT
% A One-class dataset
% FRACREJ Error on the target class (default = 0.1)
% H Width parameter (default = [])
%
% OUTPUT
% W ... |
github | SenticNet/one-class-svm-master | find_target.m | .m | one-class-svm-master/dd_tools/find_target.m | 1,047 | utf_8 | 1e480b414b57be9001a0b3d74f77d256 | %FIND_TARGET extract the indices of the target and outlier objects
%
% [It,Io] = FIND_TARGET(A)
% [It,Io] = FIND_TARGET(LAB)
%
% INPUT
% A One-class dataset
% LAB A label vector with 'target' and/or 'outlier'
%
% OUTPUT
% It Indices of target objects
% Io Indices of outlier objects
%... |
github | SenticNet/one-class-svm-master | simpleprc.m | .m | one-class-svm-master/dd_tools/simpleprc.m | 2,772 | utf_8 | 8c28a91db8df0af5a61a8d015a454821 | %SIMPLEPRC Basic precision-recall characteristic curve
%
% F = SIMPLEPRC(PRED,TRUELAB)
%
% INPUT
% PRED Prediction of a classifier
% TRUELAB True labels
%
% OUTPUT
% F Precision-recall graph
%
% DESCRIPTION
% Compute the PR curve for the network output PRED, given the true
% labels TRUELAB. TR... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.