Skip to content

Commit

Permalink
Match terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Jun 11, 2024
1 parent bc86da6 commit 6dc6874
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ async function main() {
PC[p] = norm0to1(PC[p], -51.9073, 110.0535)
}
let acuteCoC = parseFloat(cocNumber.value)
acuteCoC = norm0to1(acuteCoC, -0.024243014, 0.951938077)
let acuteCoC0_1 = norm0to1(acuteCoC, -0.024243014, 0.951938077)
let lesionVolTotalML = lesionVolTotal / 1000
let ROI_volML = lesionVol / 1000
let ROI_vol0_1 = norm0to1(ROI_volML, 0, 21.625)
const input_vector = [PC[0], PC[1], PC[2], PC[3], PC[4], acuteCoC, ROI_vol0_1]
const input_vector = [PC[0], PC[1], PC[2], PC[3], PC[4], acuteCoC0_1, ROI_vol0_1]
// console.log(input_vector)
let prediction_sum = 0
for (let m = 0; m < models.length; m++) {
Expand Down Expand Up @@ -121,7 +121,7 @@ async function main() {
}
predictBtn.onclick = function () {
const [acuteCoC, acuteZ, lesionVolTotalML, ROI_volML, chronCoC, chronZ] = neglect_predict()
const str = (`Given ${lesionVolTotalML}ml lesion (with ${ROI_volML} in core neglect voxels), and acute CoC ${acuteCoC} (z= ${acuteZ}), predicted chronic CoC is ${chronCoC} (z= ${chronZ})`)
const str = (`Given ${lesionVolTotalML.toFixed(4)}ml lesion (with ${ROI_volML.toFixed(4)} in core neglect voxels), and acute CoC ${acuteCoC.toFixed(2)} (z= ${acuteZ.toFixed(4)}), predicted chronic CoC is ${chronCoC.toFixed(2)} (z= ${chronZ.toFixed(4)})`)
window.alert(str)
}
aboutBtn.onclick = function () {
Expand Down
6 changes: 3 additions & 3 deletions public/neglect_predict.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ function neglect_predict(fnm, acuteCoC)
for i = 1:5
PC(i) = norm0to1(PC(i), -51.9073, 110.0535);
end
acuteCoC = norm0to1(acuteCoC, -0.024243014, 0.951938077);
ROI_volML = norm0to1(ROI_volML, 0, 21.625);
acuteCoC01 = norm0to1(acuteCoC, -0.024243014, 0.951938077);
ROI_volML01 = norm0to1(ROI_volML, 0, 21.625);
% input_vector = [PC1, PC2, PC3, PC4, PC5, CoC, ROI_vol];
% Exemplary patient data (with outcome = 0.8155):
input_vector = [PC(1), PC(2), PC(3), PC(4), PC(5), acuteCoC, ROI_volML];
input_vector = [PC(1), PC(2), PC(3), PC(4), PC(5), acuteCoC01, ROI_volML01];
fnmModel = fullfile(mpath, 'models_5x10_diff.mat');
if ~exist(fnmPCA,'file')
error('Unable to find %s', fnmPCA)
Expand Down

0 comments on commit 6dc6874

Please sign in to comment.