Can someone explain the decision tree modeling in Matlab? I saw the help in Matlab, but they have provided an example without explaining how to use the parameters in the classficationtree.template function. I have started my research which involves decision tree implementation. Any help to explain the use of classficationtree.template with its parameters will be appreciated.
Related
I am wondering what does the scipy.sparse.csgraph.connected_components() do under the hood. In connected component labeling (CCL), one has many graph-traversing algorithms e.g. flood fill or iterative algorithm [Haralick1981] or two-scan algorithm [Rosenfeld1966], and so on. I am completely new to CCL, I would appreciate your help.
Even after looking into the code, I couldn't figure out, for example, what the _connected_components_undirected() is doing. Can one find a reference to this algorithm to understand the CCL methods better?
I am currently learning the usage of the MIT Drake library for optimization and would like to formulate a nonlinear model predictive control problem. I notice that the pydrake examples show the methods to add nonlinear costs and constraints in a nonlinear program problem. However, I am not sure how to integrate nonlinear (and maybe even switching) system dynamics into the optimization problem. Are there any related examples or useful hints? Any help would be much appreciated.
Thanks,
Keran
We have a set of "trajectory optimization" classes that make it easy to set up a MathematicalProgram for this case. I'd recommend looking at http://underactuated.csail.mit.edu/trajopt.html.
The switching case needs more care, depending on exactly how you formulate it. I would need more details to advise. But planning through contact is similar: http://underactuated.csail.mit.edu/contact.html .
I'm trying to uncover the transition parameters of data of a hidden Markov Model using MATLAB. Using the built in hmmtrain function, I can estimate the parameters quite well (I already know what they are supposed to be as it's simulated data for now), but they are always off by a little. So what I want to do is construct a confidence interval for these parameters.
Now, I've searched the web for this quite a bit and it seems as if this is not easy to do. The 'easiest' solution appears to be bootstrapping, but I personally don't know how to go about and implement something like that in MATLAB, for a model as complex as a HMM. Does anyone have any references I could look at that could help me write a script for this, or does anyone know of a package out there that already has this built in?
Edit:
The main issue I have is that I wouldn't know how a bootstrap method would tackle the problem of HMM. Isn't the whole idea of HMM that you get a specific sequence from which you learn about the parameters? Wouldn't cutting it up for the purpose of bootstrapping automatically create some errors?
Could anyone please help in providing an example showing how ANCOVA (analysis of covariance) can be done in scipy/statsmodel, with python?
I am not sure if I am asking too much, but a quick search showed me this which is not informative enough for me.
Thanks!
Statsmodels uses the linear model, OLS, to estimate ANOVA. So, having additional continuous regressors as in ANCOVA does not change the analysis.
Here are a few links to the relevant documentation
Anova helper functions and examples for ANCOVA interactions
http://statsmodels.sourceforge.net/devel/examples/generated/example_interactions.html
using formulas to create the design matrix
http://statsmodels.sourceforge.net/devel/example_formulas.html
the core OLS model
http://statsmodels.sourceforge.net/devel/generated/statsmodels.regression.linear_model.OLS.html
Now, I would like to practice some problem solving by use RCGA (Real Code Genetic Algorithms) in MATLAB. Could any helper provide me some example project matlab files about that ?
Thank you very much.
I wrote an article a few years ago on an application of genetic algorithms in MATLAB, which comes with example data and MATLAB code. Although the example doesn't use real-coding, it does demonstrate how to apply a custom chromosomal coding, so perhaps it would be a starting point for you that you could adapt.