Commit db4da5c6 authored by Rauschenberger's avatar Rauschenberger
Browse files

automation

parent b8cc222a
......@@ -243,8 +243,8 @@ colasso_weighted_correlation <- function(X,w=NULL){
colasso_moderate <- function(y,X,pi,plot=FALSE){
pvalue <- colasso_marginal_significance(y=y,X=X)
weight <- colasso_covariate_weights(x=pvalue)
cor <- abs(colasso_weighted_correlation(t(X),w=weight)) # robust
#cor <- abs(weights::wtd.cors(t(X),weight=weight)) # fast
#cor <- abs(colasso_weighted_correlation(t(X),w=weight)) # robust
cor <- abs(weights::wtd.cors(t(X),weight=weight)) # fast
Y <- matrix(data=NA,nrow=length(y),ncol=length(pi),dimnames=list(NULL,pi))
for(i in seq_along(y)){
for(j in seq_along(pi)){
......
......@@ -122,7 +122,7 @@ https://en.wikipedia.org/wiki/List_of_datasets_for_machine_learning_research#Mic
<a class="sourceLine" id="cb1-26" data-line-number="26"> </a>
<a class="sourceLine" id="cb1-27" data-line-number="27"> <span class="co">#----- CROSS-VALIDATE -----</span></a>
<a class="sourceLine" id="cb1-28" data-line-number="28"> </a>
<a class="sourceLine" id="cb1-29" data-line-number="29"> loss &lt;-<span class="st"> </span><span class="kw"><a href="../reference/colasso_compare.html">colasso_compare</a></span>(<span class="dt">y=</span>y,<span class="dt">X=</span>X)</a>
<a class="sourceLine" id="cb1-29" data-line-number="29"> loss &lt;-<span class="st"> </span><span class="kw"><a href="../reference/colasso_compare.html">colasso_compare</a></span>(<span class="dt">y=</span>y,<span class="dt">X=</span>X,<span class="dt">nfolds.int=</span><span class="dv">5</span>)</a>
<a class="sourceLine" id="cb1-30" data-line-number="30"> </a>
<a class="sourceLine" id="cb1-31" data-line-number="31"> <span class="co"># fold &lt;- sample(x=rep(x=seq_len(5),length.out=length(y)))</span></a>
<a class="sourceLine" id="cb1-32" data-line-number="32"> <span class="co"># pred &lt;- matrix(data=NA,nrow=length(y),ncol=8)</span></a>
......
......@@ -43,7 +43,7 @@ for(rep in 1:4){
#----- CROSS-VALIDATE -----
loss <- colasso_compare(y=y,X=X)
loss <- colasso_compare(y=y,X=X,nfolds.int=5)
# fold <- sample(x=rep(x=seq_len(5),length.out=length(y)))
# pred <- matrix(data=NA,nrow=length(y),ncol=8)
......
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