-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement gridsearch from lcmm? #126
Comments
Thanks for the suggestion. I will implement this in the coming weeks Note that for repeated fitting with automatic selection of the best result you can already use the lcFitRepMin method modifier. Still, the gridsearch approach will be faster since it does an initial quick exploration for different random starts. library(latrend)
data(latrendData)
method <- lcMethodLcmmGMM(
fixed = Y ~ Time,
mixture = ~ Time,
random = ~ 1,
id = "Id",
time = "Time", ,
nClusters = 2
)
# fit the method but only get the best result out of 10 fits
gmm <- latrend(
lcFitRepMin(method, rep = 10, metric = 'BIC'),
data = latrendData
)
|
@knokknok I've implemented gridsearch initialization, including parallel computation support. See the Example specification: method <- lcMethodLcmmGMM(
fixed = Y ~ Time,
mixture = ~ Time,
random = ~ 1,
id = "Id",
time = "Time",
nClusters = 3,
init = "gridsearch",
gridsearch.maxiter = 10,
gridsearch.rep = 50,
gridsearch.parallel = TRUE
) Let me know if you run into any issues. |
Thanks! |
Mainly because I already had a custom implementation that I created 4 years ago for a simulation study (see here), which was the basis for creating this package. I (probably) had a good reason for it at the time but which I don't quite remember haha. Most likely an issue with the Anyways, using the same parallel back-end as the rest of the latrend package is a nice bonus :) |
Sorry to reopen but I get an error when the number of clusters includes 1 in
|
Thanks, I've added this as a test case. Gridsearch init is now ignored for |
Unfortunately I submitted the 1.5.1 CRAN release a couple of hours ago so this fix will not be pushed to CRAN until 2 weeks later at minimum. |
Since there was a problem with the CRAN submission this fix will be on the 1.5.1 CRAN release. |
No description provided.
The text was updated successfully, but these errors were encountered: