Clustering with nonlinear mixed effect modeling - cluster-analysis

I want to optimally find the clusters and assignment of each subject into the correct cohort in the nonlinear mixed effect framework. I came to know a package in R which is lcmm that calls this type of modeling a latent class mixture model. They have the clustering of the linear mixed effect model in hlme function. I am wondering if there is a package that deals with the latent class/clustering of the nonlinear mixed effect modeling? Any help is appreciated.

Related

Efficiently handle nonlinear models in Matlab (not Simulink)

I wanted to ask if there is a framework for non-linear models in Matlab, similar to that for linear dynamical systems (ss, lsim, connect, etc.). I need to create some examples for a control theory lecture and would like to compare linear and non-linear systems.
For example, I've got a nonlinear model of a simple inverted pendulum, and functions for the jacobians of the dynamics and the output map. Now I implement some controllers (state feedback, LQR, ...) at a stationary point and compare the linear and non-linear closed-loop (using ode-solvers like ode15s). I know how to do it for one single model, but i'd like to easily switch the models and stationary points. I already made some simple data structures and functions for automated plotting, controller synthesis and interconnections.
However, this took me quite some time and it's not easily adapted to other models with possibly different dimensions. So I wondered if there was an already implemented framework similar to what exists for linear systems with functions like lsim for calculating responses or connect for creating interconnections, where you can give names to inputs and outputs etc.
I'm happy about any hints on how to work with nonlinear models more efficiently :)

Fitting multivariate mixed models with continuous and ordinal dependent variables

I would like to run a multivariate mixed regression MCMC model with two response (independent) variables, namely Boldness scores (continuous variable) and Aggression ranks (ordinal ranks). Trial numbers (integers) are the fixed effect while individual ID is the random effect. I'm using a mixed model approach to partition between-individual co-variance from within-individual co-variance. I would much appreciate if someone lets me know how to do this, and which package to use, preferably in R and what priors to specify. Thank you very much in advance!

How to compare gams vs matlab in optimization

Is it possible to use Matlab instead of GAMS for optimization problems? How do they compare? In other words, can every problem solved with gams be solved with some matlab toolbox And finally what is a list of the optimization tools in Matlab.
Matlab and GAMS are very different in how they approach modeling. GAMS is organized along the concept of equations (essentially an optimization model is a collection of equations). This is both for LP, MIP, MINLP and other types of models. These equations largely resemble how you would write things down in Math. Matlab views an optimization model (LP/MIP) as a matrix (or two matrices depending on whether we deal with equalities or inequalities). You have to translate your constraints in these one or two matrices by populating them. Depending on the model this can be a difficult task. For structured models it is not so bad, but for large, complex models the GAMS approach is much more natural and convenient.
NLP problems in GAMS are just like LPs: equation based. GAMS uses automatic differentiation so no need to write gradients and GAMS targets large scale NLP problems. Matlab uses functions in their NLP solvers, and these are mostly suited for smaller problems. Gradients are provided by the user.
GAMS supports many solvers. MATLAB has an optimization toolbox, but these solvers are largely targeted to smaller and medium sized models. Having said that many state-of-the-art solvers have a Matlab interface (e.g. Cplex, Gurobi).
Not all solvers available under GAMS are directly callable from Matlab but many are (sometimes using external toolboxes).

SVM for multi-class in Matlab

I am trying to implement SVM for multiclass problems in Matlab. I know that there is an inbuilt code for SVM in matlab but I don't know how to use it. Need some help in getting started with Matlab SVM.
SVM classifies into two classes. If you want to create a multiclass SVM, you will have to hack it yourself. You could for instance do AdaBoost with SVMs as your "cheap classifiers", although they are not that cheap to train (contrary to decision trees or even decision stumps).
Speaking of AdaBoost, you'll probably end up using ensemble methods in matlab if you really don't want to program it yourself:
For classification with three or more classes:
'AdaBoostM2'
'LPBoost' (requires an Optimization Toolbox license)
'TotalBoost' (requires an Optimization Toolbox license)
'RUSBoost'
'Subspace'
'Bag'
The ensemble toolbox is really simple and there's a ton of documentation on matlab's help pages. Basically you state your X and Y, the type of learner you want (for instance SVM) and the ensemble method, which is the method you want to use to combine the different weak learners. AdaBoost is one way, but you could also just do Bagging where the majority vote of all your weak learners counts.
So some questions you can answer here or at least ask yourself are: Why do you want to to multiclass SVM? Is it a homework assignment? Do you know how SVM and other machine learning alorithms work? Do you need help picking the right algorithm?

Multiclass Classifiers

I am working on a audio multi class classification problem (noise,vessels,2 types of animals) by using MFCC features. I am getting different results with different classifiers. I tried Bayesian type, Artificial Neural Networks, MSVM and decision trees.
Can anybody tell me what are the strengths and weaknesses of each of those 4 classifiers?
Many thanks
There is no “best” classifier
http://en.wikipedia.org/wiki/No_free_lunch_theorem
Averaged over all possible types of data distributions,
all classifi ers perform the same. Th us, we cannot say which algorithm
... is the “best”. Over any given data distribution or set of
data distributions, however, there is usually a best classifi er. Th us, when
faced with real data it’s a good idea to try many classifi ers. Consider
your purpose: Is it just to get the right score, or is it to interpret the
data? Do you seek fast computation, small memory requirements, or
confi dence bounds on the decisions? Diff erent classifi ers have diff erent
properties along these dimensions.
Learning OpenCV page 465