X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=vignettes%2Freport.Rmd;h=cd6f4cf6d19fad59b7e64df408d5d7893e3ca1ae;hb=dad25cd2d4973d76a5b79a7041b7f66ac4a9bfe2;hp=a67223be38376248d280b6b5911ec596f2627613;hpb=cff1083b37d40af662fab47bbc698a63a001de1b;p=morpheus.git diff --git a/vignettes/report.Rmd b/vignettes/report.Rmd index a67223b..cd6f4cf 100644 --- a/vignettes/report.Rmd +++ b/vignettes/report.Rmd @@ -1,5 +1,5 @@ --- -title: morpheus........... +title: Use morpheus package output: pdf_document: @@ -13,23 +13,69 @@ knitr::opts_chunk$set(echo = TRUE, include = TRUE, out.width = "100%", fig.align = "center") ``` -0) Tell that we try to learn classification parameters in a non-EM way, using algebric manipulations. +## Introduction + -*morpheus* is a contributed R package which attempts to find the parameters of a mixture of logistic classifiers. -When the data under study come from several groups that have different characteristics, using mixture models is a very popular way to handle heterogeneity. -Thus, many algorithms were developed to deal with various mixtures models. Most of them use likelihood methods or Bayesian methods that are likelihood dependent. +*morpheus* is a contributed R package which attempts to find the parameters of a +mixture of logistic classifiers. +When the data under study come from several groups that have different characteristics, +using mixture models is a very popular way to handle heterogeneity. +Thus, many algorithms were developed to deal with various mixtures models. +Most of them use likelihood methods or Bayesian methods that are likelihood dependent. *flexmix* is an R package which implements these kinds of algorithms. -However, one problem of such methods is that they can converge to local maxima, so several starting points must be explored. -Recently, spectral methods were developed to bypass EM algorithms and they were proved able to recover the directions of the regression parameter -in models with known link function and random covariates (see [9]). -Our package extends such moment methods using least squares to get estimators of the whole parameters (with theoretical garantees, see [XX]). +However, one problem of such methods is that they can converge to local maxima, +so several starting points must be explored. +Recently, spectral methods were developed to bypass EM algorithms and they were proved +able to recover the directions of the regression parameter +in models with known link function and random covariates (see [XX]). +Our package extends such moment methods using least squares to get estimators of the +whole parameters (with theoretical garantees, see [XX]). Currently it can handle only binary output $-$ which is a common case. -1) Model. +## Model + +Let $X\in \R^{d}$ be the vector of covariates and $Y\in \{0,1\}$ be the binary output. +A binary regression model assumes that for some link function $g$, the probability that +$Y=1$ conditionally to $X=x$ is given by $g(\langle \beta, x \rangle +b)$, where +$\beta\in \R^{d}$ is the vector of regression coefficients and $b\in\R$ is the intercept. +Popular examples of link functions are the logit link function where for any real $z$, +$g(z)=e^z/(1+e^z)$ and the probit link function where $g(z)=\Phi(z),$ with $\Phi$ +the cumulative distribution function of the standard normal ${\cal N}(0,1)$. +Both are implemented in the package. + +If now we want to modelise heterogeneous populations, let $K$ be the number of +populations and $\omega=(\omega_1,\cdots,\omega_K)$ their weights such that +$\omega_{j}\geq 0$, $j=1,\ldots,K$ and $\sum_{j=1}^{K}\omega{j}=1$. +Define, for $j=1,\ldots,K$, the regression coefficients in the $j$-th population +by $\beta_{j}\in\R^{d}$ and the intercept in the $j$-th population by +$b_{j}\in\R$. Let $\omega =(\omega_{1},\ldots,\omega_{K})$, +$b=(b_1,\cdots,b_K)$, $\beta=[\beta_{1} \vert \cdots,\vert \beta_K]$ the $d\times K$ +matrix of regression coefficients and denote $\theta=(\omega,\beta,b)$. +The model of population mixture of binary regressions is given by: + +\begin{equation} +\label{mixturemodel1} +\PP_{\theta}(Y=1\vert X=x)=\sum^{K}_{k=1}\omega_k g(<\beta_k,x>+b_k). +\end{equation} + +## Algorithm, theoretical garantees + +The algorithm uses spectral properties of some tensor matrices to estimate the model +parameters $\Theta = (\omega, \beta, b)$. Under rather mild conditions it can be +proved that the algorithm converges to the correct values (its speed is known too). +For more informations on that subject, however, please refer to our article [XX]. +In this vignette let's rather focus on package usage. + +## Usage + -TODO: retrouver mon texte initial + article. -2) Algorithm (as in article) 3) Experiments: show package usage + +\subsection{Experiments} +In this section, we evaluate our algorithm in a first step using mean squared error (MSE). In a second step, we compare experimentally our moments method (morpheus package \cite{Loum_Auder}) and the likelihood method (with felxmix package \cite{bg-papers:Gruen+Leisch:2007a}). + +TODO.........