Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Armin Rauschenberger
joinet
Commits
258b4761
Commit
258b4761
authored
Jan 17, 2019
by
Armin Rauschenberger
Browse files
automation
parent
beaeb072
Changes
10
Hide whitespace changes
Inline
Side-by-side
.Rhistory
deleted
100644 → 0
View file @
beaeb072
#################
### cornet ###
#################
#--- generate toydata ----------------------------------------------------------
set.seed
(
1
)
#toydata <- NULL
#save(toydata,file=file.path("C:/Users/armin.rauschenberger/Desktop/package/cornet/data/toydata.R"))
#--- compile package -----------------------------------------------------------
rm
(
list
=
ls
())
name
<-
"cornet"
#load("D:/cornet/package/toydata.RData")
pkg
<-
"C:/Users/armin.rauschenberger/Desktop/cornet/cornet"
setwd
(
dir
=
pkg
)
devtools
::
as.package
(
x
=
pkg
,
create
=
FALSE
)
devtools
::
load_all
(
path
=
pkg
)
#usethis::use_data(toydata,overwrite=TRUE)
devtools
::
document
(
pkg
=
pkg
)
unlink
(
file.path
(
pkg
,
"vignettes"
,
"figure"
),
recursive
=
TRUE
)
all
<-
dir
(
file.path
(
pkg
,
"vignettes"
))
#delete <- "..."
#sapply(delete,function(x) file.remove(file.path(pkg,"vignettes",x)))
setwd
(
dir
=
pkg
)
unlink
(
file.path
(
pkg
,
"docs"
),
recursive
=
TRUE
)
pkgdown
::
build_site
(
pkg
=
pkg
)
file.remove
(
file.path
(
pkg
,
".Rbuildignore"
))
usethis
::
use_build_ignore
(
files
=
c
(
"Readme.Rmd"
,
".travis.yml"
,
"_pkgdown.yml"
,
"docs"
,
"cran-comments.md"
,
"appveyor.yml"
))
devtools
::
check
(
pkg
=
pkg
,
quiet
=
FALSE
,
manual
=
TRUE
)
devtools
::
install
(
pkg
=
pkg
,
upgrade
=
FALSE
)
#################
### cornet ###
#################
#--- generate toydata ----------------------------------------------------------
set.seed
(
1
)
#toydata <- NULL
#save(toydata,file=file.path("C:/Users/armin.rauschenberger/Desktop/package/cornet/data/toydata.R"))
#--- compile package -----------------------------------------------------------
rm
(
list
=
ls
())
name
<-
"cornet"
#load("D:/cornet/package/toydata.RData")
pkg
<-
"C:/Users/armin.rauschenberger/Desktop/cornet/cornet"
setwd
(
dir
=
pkg
)
devtools
::
as.package
(
x
=
pkg
,
create
=
FALSE
)
devtools
::
load_all
(
path
=
pkg
)
#usethis::use_data(toydata,overwrite=TRUE)
devtools
::
document
(
pkg
=
pkg
)
unlink
(
file.path
(
pkg
,
"vignettes"
,
"figure"
),
recursive
=
TRUE
)
all
<-
dir
(
file.path
(
pkg
,
"vignettes"
))
#delete <- "..."
#sapply(delete,function(x) file.remove(file.path(pkg,"vignettes",x)))
setwd
(
dir
=
pkg
)
unlink
(
file.path
(
pkg
,
"docs"
),
recursive
=
TRUE
)
pkgdown
::
build_site
(
pkg
=
pkg
)
file.remove
(
file.path
(
pkg
,
".Rbuildignore"
))
usethis
::
use_build_ignore
(
files
=
c
(
"Readme.Rmd"
,
".travis.yml"
,
"_pkgdown.yml"
,
"docs"
,
"cran-comments.md"
,
"appveyor.yml"
))
devtools
::
check
(
pkg
=
pkg
,
quiet
=
FALSE
,
manual
=
TRUE
)
devtools
::
install
(
pkg
=
pkg
,
upgrade
=
FALSE
)
remove.packages
(
"colasso"
)
remove.packages
(
"available"
)
remove.packages
(
"bilasso"
)
remove.packages
(
"cornet"
)
remove.packages
(
"conet"
)
#################
### cornet ###
#################
#--- generate toydata ----------------------------------------------------------
set.seed
(
1
)
#toydata <- NULL
#save(toydata,file=file.path("C:/Users/armin.rauschenberger/Desktop/package/cornet/data/toydata.R"))
#--- compile package -----------------------------------------------------------
rm
(
list
=
ls
())
name
<-
"cornet"
#load("D:/cornet/package/toydata.RData")
pkg
<-
"C:/Users/armin.rauschenberger/Desktop/cornet/cornet"
setwd
(
dir
=
pkg
)
devtools
::
as.package
(
x
=
pkg
,
create
=
FALSE
)
devtools
::
load_all
(
path
=
pkg
)
#usethis::use_data(toydata,overwrite=TRUE)
devtools
::
document
(
pkg
=
pkg
)
unlink
(
file.path
(
pkg
,
"vignettes"
,
"figure"
),
recursive
=
TRUE
)
all
<-
dir
(
file.path
(
pkg
,
"vignettes"
))
#delete <- "..."
#sapply(delete,function(x) file.remove(file.path(pkg,"vignettes",x)))
setwd
(
dir
=
pkg
)
unlink
(
file.path
(
pkg
,
"docs"
),
recursive
=
TRUE
)
pkgdown
::
build_site
(
pkg
=
pkg
)
file.remove
(
file.path
(
pkg
,
".Rbuildignore"
))
usethis
::
use_build_ignore
(
files
=
c
(
"Readme.Rmd"
,
".travis.yml"
,
"_pkgdown.yml"
,
"docs"
,
"cran-comments.md"
,
"appveyor.yml"
))
devtools
::
check
(
pkg
=
pkg
,
quiet
=
FALSE
,
manual
=
TRUE
)
devtools
::
install
(
pkg
=
pkg
,
upgrade
=
FALSE
)
#################
### cornet ###
#################
#--- generate toydata ----------------------------------------------------------
set.seed
(
1
)
#toydata <- NULL
#save(toydata,file=file.path("C:/Users/armin.rauschenberger/Desktop/package/cornet/data/toydata.R"))
#--- compile package -----------------------------------------------------------
rm
(
list
=
ls
())
name
<-
"cornet"
#load("D:/cornet/package/toydata.RData")
pkg
<-
"C:/Users/armin.rauschenberger/Desktop/cornet/cornet"
setwd
(
dir
=
pkg
)
devtools
::
as.package
(
x
=
pkg
,
create
=
FALSE
)
devtools
::
load_all
(
path
=
pkg
)
#usethis::use_data(toydata,overwrite=TRUE)
devtools
::
document
(
pkg
=
pkg
)
unlink
(
file.path
(
pkg
,
"vignettes"
,
"figure"
),
recursive
=
TRUE
)
all
<-
dir
(
file.path
(
pkg
,
"vignettes"
))
#delete <- "..."
#sapply(delete,function(x) file.remove(file.path(pkg,"vignettes",x)))
setwd
(
dir
=
pkg
)
unlink
(
file.path
(
pkg
,
"docs"
),
recursive
=
TRUE
)
pkgdown
::
build_site
(
pkg
=
pkg
)
file.remove
(
file.path
(
pkg
,
".Rbuildignore"
))
usethis
::
use_build_ignore
(
files
=
c
(
"Readme.Rmd"
,
".travis.yml"
,
"_pkgdown.yml"
,
"docs"
,
"cran-comments.md"
,
"appveyor.yml"
))
devtools
::
check
(
pkg
=
pkg
,
quiet
=
FALSE
,
manual
=
TRUE
)
devtools
::
install
(
pkg
=
pkg
,
upgrade
=
FALSE
)
remove.packages
(
"colasso"
)
NAMESPACE
View file @
258b4761
...
...
@@ -3,5 +3,5 @@
S3method(coef,cornet)
S3method(plot,cornet)
S3method(predict,cornet)
export(.compare)
export(cornet)
export(cornet_compare)
NEWS.md
View file @
258b4761
## co
lasso
0.0.0 (2019-01-
08
)
## co
rnet
0.0.0 (2019-01-
17
)
*
Added functions
\ No newline at end of file
R/functions.R
View file @
258b4761
...
...
@@ -21,6 +21,10 @@
#' numeric matrix with \eqn{n} rows (samples)
#' and \eqn{p} columns (variables)
#'
#' @param alpha
#' elastic net mixing parameter\strong{:}
#' numeric between \eqn{0} (ridge) and \eqn{1} (lasso)
#'
#' @param foldid
#' fold identifiers\strong{:}
#' vector with entries between \eqn{1} and \code{nfolds};
...
...
@@ -64,7 +68,7 @@
#' X <- matrix(rnorm(n*p),nrow=n,ncol=p)
#' net <- cornet(y=y,cutoff=0,X=X)
#' ### Add ... to all glmnet::glmnet calls !!! ###
cornet
<-
function
(
y
,
cutoff
,
X
,
npi
=
101
,
pi
=
NULL
,
nsigma
=
99
,
sigma
=
NULL
,
nfolds
=
10
,
foldid
=
NULL
,
type.measure
=
"deviance"
,
...
){
cornet
<-
function
(
y
,
cutoff
,
X
,
alpha
=
1
,
npi
=
101
,
pi
=
NULL
,
nsigma
=
99
,
sigma
=
NULL
,
nfolds
=
10
,
foldid
=
NULL
,
type.measure
=
"deviance"
,
...
){
#--- temporary ---
# cutoff <- 0; npi <- 101; pi <- NULL; nsigma <- 99; sigma <- NULL; nfolds <- 10; foldid <- NULL; type.measure <- "deviance"; logistic <- TRUE
...
...
@@ -77,6 +81,7 @@ cornet <- function(y,cutoff,X,npi=101,pi=NULL,nsigma=99,sigma=NULL,nfolds=10,fol
if
(
all
(
y
%in%
c
(
0
,
1
))){
warning
(
"Binary response."
,
call.
=
FALSE
)}
cornet
:::
.check
(
x
=
cutoff
,
type
=
"scalar"
,
min
=
min
(
y
),
max
=
max
(
y
))
cornet
:::
.check
(
x
=
X
,
type
=
"matrix"
)
cornet
:::
.check
(
x
=
alpha
,
type
=
"scalar"
,
min
=
0
,
max
=
1
)
if
(
length
(
y
)
!=
nrow
(
X
)){
stop
(
"Contradictory sample size."
,
call.
=
FALSE
)}
cornet
:::
.check
(
x
=
npi
,
type
=
"scalar"
,
min
=
1
)
cornet
:::
.check
(
x
=
pi
,
type
=
"vector"
,
min
=
0
,
max
=
1
,
null
=
TRUE
)
...
...
@@ -98,8 +103,8 @@ cornet <- function(y,cutoff,X,npi=101,pi=NULL,nsigma=99,sigma=NULL,nfolds=10,fol
#--- model fitting ---
fit
<-
list
()
fit
$
gaussian
<-
glmnet
::
glmnet
(
y
=
y
,
x
=
X
,
family
=
"gaussian"
)
fit
$
binomial
<-
glmnet
::
glmnet
(
y
=
z
,
x
=
X
,
family
=
"binomial"
)
fit
$
gaussian
<-
glmnet
::
glmnet
(
y
=
y
,
x
=
X
,
family
=
"gaussian"
,
alpha
=
alpha
)
fit
$
binomial
<-
glmnet
::
glmnet
(
y
=
z
,
x
=
X
,
family
=
"binomial"
,
alpha
=
alpha
)
#--- sigma sequence ---
if
(
is.null
(
sigma
)){
...
...
@@ -150,14 +155,14 @@ cornet <- function(y,cutoff,X,npi=101,pi=NULL,nsigma=99,sigma=NULL,nfolds=10,fol
X1
<-
X
[
foldid
==
k
,,
drop
=
FALSE
]
# linear regression
net
<-
glmnet
::
glmnet
(
y
=
y0
,
x
=
X0
,
family
=
"gaussian"
)
net
<-
glmnet
::
glmnet
(
y
=
y0
,
x
=
X0
,
family
=
"gaussian"
,
alpha
=
alpha
)
temp_y
<-
stats
::
predict
(
object
=
net
,
newx
=
X1
,
type
=
"response"
,
s
=
fit
$
gaussian
$
lambda
)
pred
$
y
[
foldid
==
k
,
seq_len
(
ncol
(
temp_y
))]
<-
temp_y
cvm
<-
cornet
:::
.loss
(
y
=
y1
,
fit
=
temp_y
,
family
=
"gaussian"
,
type.measure
=
"deviance"
)[[
1
]]
y_hat
<-
temp_y
[,
which.min
(
cvm
)]
# logistic regression
net
<-
glmnet
::
glmnet
(
y
=
z0
,
x
=
X0
,
family
=
"binomial"
)
net
<-
glmnet
::
glmnet
(
y
=
z0
,
x
=
X0
,
family
=
"binomial"
,
alpha
=
alpha
)
temp_z
<-
stats
::
predict
(
object
=
net
,
newx
=
X1
,
type
=
"response"
,
s
=
fit
$
binomial
$
lambda
)
pred
$
z
[
foldid
==
k
,
seq_len
(
ncol
(
temp_z
))]
<-
temp_z
cvm
<-
cornet
:::
.loss
(
y
=
z1
,
fit
=
temp_z
,
family
=
"binomial"
,
type.measure
=
type.measure
)[[
1
]]
...
...
@@ -399,7 +404,7 @@ predict.cornet <- function(object,newx,type="probability",...){
#' @examples
#' NA
#'
cornet_
compare
<-
function
(
y
,
cutoff
,
X
,
nfolds
=
5
,
foldid
=
NULL
,
type.measure
=
"deviance"
){
.
compare
<-
function
(
y
,
cutoff
,
X
,
alpha
=
1
,
nfolds
=
5
,
foldid
=
NULL
,
type.measure
=
"deviance"
){
z
<-
1
*
(
y
>
cutoff
)
if
(
is.null
(
foldid
)){
...
...
@@ -415,7 +420,7 @@ cornet_compare <- function(y,cutoff,X,nfolds=5,foldid=NULL,type.measure="devianc
select
<-
list
()
for
(
i
in
seq_len
(
nfolds
)){
fit
<-
cornet
::
cornet
(
y
=
y
[
fold
!=
i
],
cutoff
=
cutoff
,
X
=
X
[
fold
!=
i
,],
logistic
=
TRUE
,
type.measure
=
type.measure
)
fit
<-
cornet
::
cornet
(
y
=
y
[
fold
!=
i
],
cutoff
=
cutoff
,
X
=
X
[
fold
!=
i
,],
alpha
=
alpha
,
logistic
=
TRUE
,
type.measure
=
type.measure
)
tryCatch
(
expr
=
cornet
:::
plot.cornet
(
fit
),
error
=
function
(
x
)
NULL
)
#cornet:::plot.cornet(fit)
temp
<-
cornet
:::
predict.cornet
(
fit
,
newx
=
X
[
fold
==
i
,])
...
...
docs/news/index.html
View file @
258b4761
...
...
@@ -101,9 +101,9 @@
<small>
Source:
<a
href=
'https://github.com/rauschenberger/colasso/blob/master/NEWS.md'
><code>
NEWS.md
</code></a></small>
</div>
<div
id=
"co
lasso
-0-0-0-2019-01-
08
"
class=
"section level2"
>
<div
id=
"co
rnet
-0-0-0-2019-01-
17
"
class=
"section level2"
>
<h2
class=
"hasAnchor"
>
<a
href=
"#co
lasso
-0-0-0-2019-01-
08
"
class=
"anchor"
></a>
co
lasso
0.0.0 (2019-01-
08
)
</h2>
<a
href=
"#co
rnet
-0-0-0-2019-01-
17
"
class=
"anchor"
></a>
co
rnet
0.0.0 (2019-01-
17
)
</h2>
<ul>
<li>
Added functions
</li>
</ul>
...
...
@@ -114,7 +114,7 @@
<div
id=
"tocnav"
>
<h2>
Contents
</h2>
<ul
class=
"nav nav-pills nav-stacked"
>
<li><a
href=
"#co
lasso
-0-0-0-2019-01-
08
"
>
0.0.0
</a></li>
<li><a
href=
"#co
rnet
-0-0-0-2019-01-
17
"
>
0.0.0
</a></li>
</ul>
</div>
</div>
...
...
docs/reference/cornet.html
View file @
258b4761
...
...
@@ -111,7 +111,7 @@
</div>
<pre
class=
"usage"
><span
class=
'fu'
>
cornet
</span>
(
<span
class=
'no'
>
y
</span>
,
<span
class=
'no'
>
cutoff
</span>
,
<span
class=
'no'
>
X
</span>
,
<span
class=
'kw'
>
npi
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
101
</span>
,
<span
class=
'kw'
>
pi
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'kw'
>
NULL
</span>
,
<span
class=
'kw'
>
nsigma
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
99
</span>
,
<pre
class=
"usage"
><span
class=
'fu'
>
cornet
</span>
(
<span
class=
'no'
>
y
</span>
,
<span
class=
'no'
>
cutoff
</span>
,
<span
class=
'no'
>
X
</span>
,
<span
class=
'kw'
>
alpha
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
1
</span>
,
<span
class=
'kw'
>
npi
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
101
</span>
,
<span
class=
'kw'
>
pi
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'kw'
>
NULL
</span>
,
<span
class=
'kw'
>
nsigma
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
99
</span>
,
<span
class=
'kw'
>
sigma
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'kw'
>
NULL
</span>
,
<span
class=
'kw'
>
nfolds
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
10
</span>
,
<span
class=
'kw'
>
foldid
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'kw'
>
NULL
</span>
,
<span
class=
'kw'
>
type.measure
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'st'
>
"deviance"
</span>
,
<span
class=
'no'
>
...
</span>
)
</pre>
...
...
@@ -133,6 +133,11 @@ value between <code>min(y)</code> and <code>max(y)</code></p></td>
<td><p>
covariates
<strong>
:
</strong>
numeric matrix with \(n\) rows (samples)
and \(p\) columns (variables)
</p></td>
</tr>
<tr>
<th>
alpha
</th>
<td><p>
elastic net mixing parameter
<strong>
:
</strong>
numeric between \(0\) (ridge) and \(1\) (lasso)
</p></td>
</tr>
<tr>
<th>
npi
</th>
...
...
docs/reference/
cornet_
compare.html
→
docs/reference/
dot-
compare.html
View file @
258b4761
...
...
@@ -6,7 +6,7 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Comparison —
cornet_
compare • cornet
</title>
<title>
Comparison —
.
compare • cornet
</title>
<!-- jquery -->
<script
src=
"https://code.jquery.com/jquery-3.1.0.min.js"
integrity=
"sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq"
crossorigin=
"anonymous"
></script>
...
...
@@ -30,7 +30,7 @@
<meta
property=
"og:title"
content=
"Comparison —
cornet_
compare"
/>
<meta
property=
"og:title"
content=
"Comparison —
.
compare"
/>
<meta
property=
"og:description"
content=
"Compares models for a continuous response with a cutoff value"
/>
<meta
name=
"twitter:card"
content=
"summary"
/>
...
...
@@ -102,7 +102,7 @@
<div
class=
"page-header"
>
<h1>
Comparison
</h1>
<small
class=
"dont-index"
>
Source:
<a
href=
'https://github.com/rauschenberger/colasso/blob/master/R/functions.R'
><code>
R/functions.R
</code></a></small>
<div
class=
"hidden name"
><code>
cornet_
compare.Rd
</code></div>
<div
class=
"hidden name"
><code>
dot-
compare.Rd
</code></div>
</div>
<div
class=
"ref-description"
>
...
...
@@ -111,7 +111,7 @@
</div>
<pre
class=
"usage"
><span
class=
'fu'
>
cornet_
compare
</span>
(
<span
class=
'no'
>
y
</span>
,
<span
class=
'no'
>
cutoff
</span>
,
<span
class=
'no'
>
X
</span>
,
<span
class=
'kw'
>
nfolds
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
5
</span>
,
<span
class=
'kw'
>
foldid
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'kw'
>
NULL
</span>
,
<pre
class=
"usage"
><span
class=
'fu'
>
.
compare
</span>
(
<span
class=
'no'
>
y
</span>
,
<span
class=
'no'
>
cutoff
</span>
,
<span
class=
'no'
>
X
</span>
,
<span
class=
'kw'
>
alpha
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
1
</span>
,
<span
class=
'kw'
>
nfolds
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'fl'
>
5
</span>
,
<span
class=
'kw'
>
foldid
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'kw'
>
NULL
</span>
,
<span
class=
'kw'
>
type.measure
</span>
<span
class=
'kw'
>
=
</span>
<span
class=
'st'
>
"deviance"
</span>
)
</pre>
<h2
class=
"hasAnchor"
id=
"arguments"
><a
class=
"anchor"
href=
"#arguments"
></a>
Arguments
</h2>
...
...
@@ -132,6 +132,11 @@ value between <code>min(y)</code> and <code>max(y)</code></p></td>
<td><p>
covariates
<strong>
:
</strong>
numeric matrix with \(n\) rows (samples)
and \(p\) columns (variables)
</p></td>
</tr>
<tr>
<th>
alpha
</th>
<td><p>
elastic net mixing parameter
<strong>
:
</strong>
numeric between \(0\) (ridge) and \(1\) (lasso)
</p></td>
</tr>
<tr>
<th>
nfolds
</th>
...
...
docs/reference/index.html
View file @
258b4761
...
...
@@ -130,15 +130,15 @@
</tr><tr>
<td>
<p><code><a
href=
"
cornet_compare.html"
>
cornet_compare
()
</a></code>
</p>
<p><code><a
href=
"
dot-check.html"
>
.check
()
</a></code>
</p>
</td>
<td><p>
Comparison
</p></td>
<td><p>
Arguments
</p></td>
</tr><tr>
<td>
<p><code><a
href=
"dot-c
heck
.html"
>
.c
heck
()
</a></code>
</p>
<p><code><a
href=
"dot-c
ompare
.html"
>
.c
ompare
()
</a></code>
</p>
</td>
<td><p>
Arguments
</p></td>
<td><p>
Comparison
</p></td>
</tr><tr>
<td>
...
...
man/cornet.Rd
View file @
258b4761
...
...
@@ -4,7 +4,7 @@
\alias{cornet}
\title{Logistic regression with a continuous response}
\usage{
cornet(y, cutoff, X, npi = 101, pi = NULL, nsigma = 99,
cornet(y, cutoff, X,
alpha = 1,
npi = 101, pi = NULL, nsigma = 99,
sigma = NULL, nfolds = 10, foldid = NULL,
type.measure = "deviance", ...)
}
...
...
@@ -19,6 +19,9 @@ value between \code{min(y)} and \code{max(y)}}
numeric matrix with \eqn{n} rows (samples)
and \eqn{p} columns (variables)}
\item{alpha}{elastic net mixing parameter\strong{:}
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}
\item{npi}{number of \code{pi} values}
\item{pi}{pi sequence\strong{:}
...
...
man/
cornet_
compare.Rd
→
man/
dot-
compare.Rd
View file @
258b4761
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{
cornet_
compare}
\alias{
cornet_
compare}
\name{
.
compare}
\alias{
.
compare}
\title{Comparison}
\usage{
cornet_
compare(y, cutoff, X, nfolds = 5, foldid = NULL,
.
compare(y, cutoff, X,
alpha = 1,
nfolds = 5, foldid = NULL,
type.measure = "deviance")
}
\arguments{
...
...
@@ -18,6 +18,9 @@ value between \code{min(y)} and \code{max(y)}}
numeric matrix with \eqn{n} rows (samples)
and \eqn{p} columns (variables)}
\item{alpha}{elastic net mixing parameter\strong{:}
numeric between \eqn{0} (ridge) and \eqn{1} (lasso)}
\item{nfolds}{number of folds}
\item{foldid}{fold identifiers\strong{:}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment