Suggests:
capushe,
methods,
- roxygen2,
- testthat
+ roxygen2
URL: http://git.auder.net/?p=valse.git
License: MIT + file LICENSE
RoxygenNote: 7.0.2
#' @param Y matrix of responses (of size n*m)
#'
#' @return a list with phiInit, rhoInit, piInit, gamInit
-#' @export
+#'
#' @importFrom methods new
#' @importFrom stats cutree dist hclust runif
+#' @export
initSmallEM <- function(k, X, Y, fast)
{
n <- nrow(X)
-#' valse
+#' runValse
#'
#' Main function
#'
#'
#' @examples
#' #TODO: a few examples
+#'
#' @export
-valse <- function(X, Y, procedure = "LassoMLE", selecMod = "DDSE", gamma = 1, mini = 10,
+runValse <- function(X, Y, procedure = "LassoMLE", selecMod = "DDSE", gamma = 1, mini = 10,
maxi = 50, eps = 1e-04, kmin = 2, kmax = 3, rank.min = 1, rank.max = 5, ncores_outer = 1,
ncores_inner = 1, thresh = 1e-08, grid_lambda = numeric(0), size_coll_mod = 10,
fast = TRUE, verbose = FALSE, plot = TRUE)
#' @param n sample size
#' @return several plots
#'
-#' @examples TODO
-#'
#' @export
-#'
plot_valse <- function(X, Y, model, n, comp = FALSE, k1 = NA, k2 = NA)
{
require("gridExtra")
#'
#' @return a list of outputs, for each lambda in grid: selected,Rho,Pi
#'
-#' @examples TODO
-#'
#' @export
-#'
selectVariables <- function(phiInit, rhoInit, piInit, gamInit, mini, maxi, gamma,
glambda, X, Y, thresh = 1e-08, eps, ncores = 3, fast)
{
+++ /dev/null
-ou alors data_test.RData, possible aussi
}
\details{
- The package devtools should be useful in development stage, since we rely on testthat for
- unit tests, and roxygen2 for documentation. knitr is used to generate the package vignette.
- Concerning the other suggested packages:
- \itemize{
- \item{parallel (generally) permits to run the bootstrap method faster.}
- }
-
- The three main functions are ...
+ Two methods are implemented to cluster data with finite mixture
+ regression models. Those procedures deal with high-dimensional covariates and
+ responses through a variable selection procedure based on the Lasso estimator.
+
+ The main function is runValse(), which calls all other functions.
+ See also plot_valse() which plots the relevant parameters after a run.
}
\author{
+++ /dev/null
-library(testthat)
-library(valse) #ou load_all()
-
-test_check("valse")
+++ /dev/null
-# Potential helpers for context 1
-help <- function()
-{
- #...
-}
+++ /dev/null
-context("Context1")
-
-test_that("function 1...",
-{
- #expect_lte( ..., ...)
-})
-
-test_that("function 2...",
-{
- #expect_equal(..., ...)
-})
+++ /dev/null
-#ignore jupyter generated file (ipynb, HTML)
-*.html
-*.ipynb
-
-#and various (pdf)LaTeX files, in case of
-*.tex
-*.pdf
-*.aux
-*.dvi
-*.log
-*.out
-*.toc
-*.synctex.gz
-/figure/
Beta[1:4,1:4,2] = -2*diag(4)
Data = generateXY(200, c(0.5,0.5), rep(0,p), Beta, diag(p), covY)
-#
+
Res = valse(Data$X,Data$Y, fast=TRUE, plot=FALSE, verbose = TRUE, kmax=3, size_coll_mod = 50, selecMod = "DDSE", mini = 50, maxi=100)
plot(Res$tableau[,3], -Res$tableau[,4])