|
|
@ -73,7 +73,9 @@ modelizer <- function(dfm, cores_outer, cores_grid, cores_inner, cores_feats, se
|
|
|
|
mc.cores = cores_inner
|
|
|
|
mc.cores = cores_inner
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
print(res)
|
|
|
|
print(res[1,1])
|
|
|
|
print(res[1,1])
|
|
|
|
|
|
|
|
print('inner_cv')
|
|
|
|
return(cbind(as.data.frame(t(colMeans(select(res, 1:`Balanced Accuracy`)))),params))
|
|
|
|
return(cbind(as.data.frame(t(colMeans(select(res, 1:`Balanced Accuracy`)))),params))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -96,6 +98,9 @@ modelizer <- function(dfm, cores_outer, cores_grid, cores_inner, cores_feats, se
|
|
|
|
cores_inner = cores_inner,
|
|
|
|
cores_inner = cores_inner,
|
|
|
|
mc.cores = cores_grid)
|
|
|
|
mc.cores = cores_grid)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
print(res)
|
|
|
|
|
|
|
|
print(res[1,1])
|
|
|
|
|
|
|
|
print('outer_cv')
|
|
|
|
# Determine optimum hyperparameters within outer fold training set
|
|
|
|
# Determine optimum hyperparameters within outer fold training set
|
|
|
|
optimum <- res[which.max(res[,opt_measure]),] %>%
|
|
|
|
optimum <- res[which.max(res[,opt_measure]),] %>%
|
|
|
|
select(percentiles: ncol(.))
|
|
|
|
select(percentiles: ncol(.))
|
|
|
@ -117,6 +122,9 @@ modelizer <- function(dfm, cores_outer, cores_grid, cores_inner, cores_feats, se
|
|
|
|
cores_inner = cores_inner,
|
|
|
|
cores_inner = cores_inner,
|
|
|
|
mc.cores = cores_grid)
|
|
|
|
mc.cores = cores_grid)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
print(res)
|
|
|
|
|
|
|
|
print(res[1,1])
|
|
|
|
|
|
|
|
print('line 126, final model parameter optimization')
|
|
|
|
return(res)
|
|
|
|
return(res)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|