Commit e197ed88 by Mustafa Tekpinar

Added more user error flexibility to normWeightMode variable in computePred.R

parent 4c796a06
...@@ -99,7 +99,7 @@ normWeightMode="trace" ...@@ -99,7 +99,7 @@ normWeightMode="trace"
#This part of the code obtains max values of Trace, PC, or CV for weighting the #This part of the code obtains max values of Trace, PC, or CV for weighting the
#normalized results. #normalized results.
trace = c() trace = c()
if(normWeightMode=="trace+pc"){ if((normWeightMode=="trace+pc") | (normWeightMode=="pc+trace")){
print(paste("Using ", normWeightMode)) print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){ if(sum(colnames(jet)=="traceMax")==1){
...@@ -108,7 +108,7 @@ if(normWeightMode=="trace+pc"){ ...@@ -108,7 +108,7 @@ if(normWeightMode=="trace+pc"){
trace<-append(trace, max(jet[row, "trace"], jet[row, "pc"])) trace<-append(trace, max(jet[row, "trace"], jet[row, "pc"]))
} }
} }
} else if (normWeightMode=="trace+cv"){ } else if ((normWeightMode=="trace+cv") | (normWeightMode=="cv+trace")){
print(paste("Using ", normWeightMode)) print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){ if(sum(colnames(jet)=="traceMax")==1){
...@@ -117,7 +117,7 @@ if(normWeightMode=="trace+pc"){ ...@@ -117,7 +117,7 @@ if(normWeightMode=="trace+pc"){
trace<-append(trace, max(jet[row, "trace"], jet[row, "cv"])) trace<-append(trace, max(jet[row, "trace"], jet[row, "cv"]))
} }
} }
} else if (normWeightMode=="trace+pc+cv"){ } else if ((normWeightMode=="trace+pc+cv")|(normWeightMode=="trace+cv+pc")){
print(paste("Using ", normWeightMode)) print(paste("Using ", normWeightMode))
for (row in 1:nrow(jet)) { for (row in 1:nrow(jet)) {
if(sum(colnames(jet)=="traceMax")==1){ if(sum(colnames(jet)=="traceMax")==1){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment