Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
faust group
faust
Commits
c8ec97af
Commit
c8ec97af
authored
8 years ago
by
Nicolas Bellot
Committed by
hhakim
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
MEG data inutile enlever
parent
64b10c50
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
misc/demo/Brain_source_localization/BSL.m
+7
-7
7 additions, 7 deletions
misc/demo/Brain_source_localization/BSL.m
misc/test/CMakeLists.txt
+1
-1
1 addition, 1 deletion
misc/test/CMakeLists.txt
with
8 additions
and
8 deletions
misc/demo/Brain_source_localization/BSL.m
+
7
−
7
View file @
c8ec97af
...
...
@@ -76,7 +76,6 @@ nb_MEG_matrix = length(MEG_list);
%% Loading the MEG matrix and the points in the brain
load
([
BSL_data_pathName
filesep
'X_meg.mat'
]);
pts_used
=
points
(
points_used_idx
,:);
% points used in the MEG matrix
MEG_matrix
=
normalizeCol
(
X_fixed
);
% normalization of the columns of the MEG matrix
MEG_list
{
1
}
=
MEG_matrix
;
...
...
@@ -91,14 +90,14 @@ for i=1:nb_FAuST_MEG
load
([
BSL_data_pathName
filesep
MEG_FAuST_list_filename
{
i
}]);
facts
=
normalizeCol
(
facts
,
lambda
);
% normalization of the columns of the FAUST
MEG_FAuST
=
Faust
(
facts
);
% construct the FAuST from its factors
MEG_list
{
i
+
1
}
=
MEG_FAuST
;
% store the different FAuST approximations
MEG_FAuST
=
Faust
(
facts
);
% construct the FAuST from its factors
cons15_row
MEG_list
{
i
+
1
}
=
MEG_FAuST
;
% store the different FAuST approximations
cons21_col
RCG_list
(
i
)
=
RCG
(
MEG_FAuST
);
% compute the RCG of the given FAuST
end
M
=
size
(
MEG_matrix
,
2
);
% Number of points used in the MEG matrix
Ntraining
=
500
;
% Number of training vectors
Ntraining
=
500
;
% Number of training vectors
cons22_row
Sparsity
=
2
;
% Number of sources per training vector
dist_paliers
=
[
0.01
,
0.05
,
0.08
,
0.5
];
...
...
@@ -120,7 +119,7 @@ for k=1:nb_palier;
while
~
((
dist_paliers
(
k
)
<
dist_sources
)
&&
(
dist_sources
<
dist_paliers
(
k
+
1
)))
Gamma
(:,
ii
)
=
sparse_coeffs
(
MEG_matrix
,
1
,
Sparsity
);
%
idx
=
find
(
Gamma
(:,
ii
));
dist_sources
=
norm
(
p
ts_used
(
idx
(
1
),:)
-
p
ts_used
(
idx
(
2
),:));
dist_sources
=
norm
(
p
oints
(
idx
(
1
),:)
-
p
oints
(
idx
(
2
),:));
end
end
...
...
@@ -146,8 +145,8 @@ for k=1:nb_palier;
% compute the distance between the estimated source and the real one
idx_solver
=
find
(
sol_solver
);
resDist
(
j
,
k
,
1
,
i
)
=
min
(
norm
(
p
ts_used
(
idx
(
1
),:)
-
p
ts_used
(
idx_solver
(
1
),:)),
norm
(
p
ts_used
(
idx
(
1
),:)
-
p
ts_used
(
idx_solver
(
2
),:)));
resDist
(
j
,
k
,
2
,
i
)
=
min
(
norm
(
p
ts_used
(
idx
(
2
),:)
-
p
ts_used
(
idx_solver
(
1
),:)),
norm
(
p
ts_used
(
idx
(
2
),:)
-
p
ts_used
(
idx_solver
(
2
),:)));
resDist
(
j
,
k
,
1
,
i
)
=
min
(
norm
(
p
oints
(
idx
(
1
),:)
-
p
oints
(
idx_solver
(
1
),:)),
norm
(
p
oints
(
idx
(
1
),:)
-
p
oints
(
idx_solver
(
2
),:)));
resDist
(
j
,
k
,
2
,
i
)
=
min
(
norm
(
p
oints
(
idx
(
2
),:)
-
p
oints
(
idx_solver
(
1
),:)),
norm
(
p
oints
(
idx
(
2
),:)
-
p
oints
(
idx_solver
(
2
),:)));
end
end
end
...
...
@@ -162,3 +161,4 @@ save(matfile,'resDist','Sparsity','RCG_list','compute_Times','Ntraining','nb_MEG
This diff is collapsed.
Click to expand it.
misc/test/CMakeLists.txt
+
1
−
1
View file @
c8ec97af
...
...
@@ -33,7 +33,7 @@ if(BUILD_MATLAB_MEX_FILES)
add_test
(
NAME FAUST_MEG_MEX COMMAND matlab -nojvm -r
"try;testpass=0;addpath('
${
FAUST_BIN_TEST_BIN_DIR
}
','
${
FAUST_BIN_TEST_TOOLS_DIR
}
');set_path;hier_fact_test('config_MEG',22480,1);catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
add_test
(
NAME FAUST_HADAMARD_MEX COMMAND matlab -nojvm -r
"try;testpass=0;addpath('
${
FAUST_BIN_TEST_BIN_DIR
}
','
${
FAUST_BIN_TEST_TOOLS_DIR
}
');set_path;hier_fact_test('config_HADAMARD',5941,1);catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
add_test
(
NAME DEMO_MATLAB_INSTALL COMMAND matlab -nodesktop -r
"try;testpass=0;addpath('
${
FAUST_MATLAB_INSTALL_DIR
}
');setup_FAUST;run_all_demo;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
add_test
(
NAME DEMO_MATLAB_BUILD COMMAND matlab -nodesktop -r
"try;testpass=0;addpath('
${
FAUST_MATLAB_B
UILD
_DIR
}
');setup_FAUST;run_all_demo;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
add_test
(
NAME DEMO_MATLAB_BUILD COMMAND matlab -nodesktop -r
"try;testpass=0;addpath('
${
FAUST_MATLAB_B
IN
_DIR
}
');setup_FAUST;run_all_demo;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
add_test
(
NAME FAUST_MEX1 COMMAND matlab -nojvm -r
"try;testpass=0;addpath('
${
FAUST_BIN_TEST_BIN_DIR
}
','
${
FAUST_BIN_TEST_TOOLS_DIR
}
');set_path;test_matlab_faust;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
# test the matlab Faust class methods with incorrect parameter
add_test
(
NAME FAUST_MEX2 COMMAND matlab -nojvm -r
"try;testpass=0;addpath('
${
FAUST_BIN_TEST_BIN_DIR
}
','
${
FAUST_BIN_TEST_TOOLS_DIR
}
');set_path;test_matlab_faust2;catch ME ;testpass=-1;disp(getReport(ME)); end ; exit(testpass)"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment