From 765cbbb01e06a5e5cd913b04d467e80ec8cd5bc7 Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Wed, 31 Oct 2012 17:27:38 -0400 Subject: Output CCI's into a seperate txt file from all the folds --- fly-tools/cci-calculator/LeastSquareSolution.m | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'fly-tools/cci-calculator') diff --git a/fly-tools/cci-calculator/LeastSquareSolution.m b/fly-tools/cci-calculator/LeastSquareSolution.m index 85d1326..1e4d822 100644 --- a/fly-tools/cci-calculator/LeastSquareSolution.m +++ b/fly-tools/cci-calculator/LeastSquareSolution.m @@ -17,6 +17,8 @@ function [x, e] = LeastSquareSolution(fileNameA, fileNameB, output) solution=[]; + cci_output_file = strcat(output, '/CCIs_combined.txt'); + for i=0:(total_folds-1) % debug @@ -84,26 +86,20 @@ function [x, e] = LeastSquareSolution(fileNameA, fileNameB, output) %saving the calculated cis CI = [CI; ci]; % store the ci values - - %fid_debug = fopen(debug_file,'w'); - %fprintf(fid_debug, '%s\n','Train data'); - %fprintf(fid_debug, '%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f', A_); -% fprintf(fid_debug, '%s\n','Test data'); -% fprintf(fid_debug, '%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f\t%8.6f', test_data); fid_debug = fopen(debug_file,'w'); -% fprintf(fid_debug, '%s\n\n','Test data'); - fprintf(fid_debug, '%s\n\n','new CI'); fprintf(fid_debug, '%8.6f\n', ci); + %output our cci's A.K.A. "new CI" into a seperate file as well. + fprintf(cci_output_file, '%8.6f\n', ci); + fprintf(fid_debug, '%s\n\n','actual CI'); actual_ci = b(test,:); fprintf(fid_debug, '%8.6f\n', actual_ci); fprintf(fid_debug, '%s\n\n','error'); fprintf(fid_debug, '%8.6f\n', (ci-actual_ci)); -% fprintf(fid_debug, '%s\n\n','Train data'); fclose(fid_debug); @@ -119,8 +115,6 @@ function [x, e] = LeastSquareSolution(fileNameA, fileNameB, output) fprintf(fid_ci, '%8.6f\n', CI); fclose(fid_ci); - %fid_solution_vectors = fopen('Solution_vectors.txt', 'w'); dlmwrite('Solution_vectors.txt', solution, 'delimiter', '\t'); - %fclose(fid_solution_vectors); -- cgit v1.2.3 From 039ef3345967fe291b1487a9a588a37909531af0 Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Wed, 31 Oct 2012 17:29:05 -0400 Subject: add a note to the README about the ordering --- fly-tools/cci-calculator/README.markdown | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fly-tools/cci-calculator') diff --git a/fly-tools/cci-calculator/README.markdown b/fly-tools/cci-calculator/README.markdown index 065563c..1578fc2 100644 --- a/fly-tools/cci-calculator/README.markdown +++ b/fly-tools/cci-calculator/README.markdown @@ -28,3 +28,8 @@ If we have 21 specimen per fold, use number of folds + 2 for the head argument, and the number of folds for the tail. This will give you proper results! for i in Fold_*.txt; do head $i -n 23 | tail -n 21 >> output.txt; echo $i; done; + +The output of the file is in the order of your input, so just copy your data +back into whatever spreadsheet you are using and it be good. If you notice +that the numbers don't match up, make sure your ordering correctly! + -- cgit v1.2.3