[mlpack-git] [mlpack/mlpack] Adds a Train() function that only needs dataset statistics (#748)
Yannis Mentekidis
notifications at github.com
Wed Aug 3 06:45:43 EDT 2016
> + Train(logMeanx, meanLogx, meanx, tol);
> +
> + // The function above modifies the state of this object. Get the parameters
> + // it fit. (This is not very good design...).
> + tempAlpha(row) = alpha(0);
> + tempBeta(row) = beta(0);
> + }
> + alpha = tempAlpha;
> + beta = tempBeta;
> +
> +}
> +
> +// Fits an alpha and beta parameter to each dimension of the data.
> +void GammaDistribution::Train(const double logMeanx, const double meanLogx,
> + const double meanx,
> + const double tol)
You're right - I was concerned with my design using temps and having two functions changing the vectors continuously. What you propose is cleaner. Thanks :)
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/748/files/09a90ee81a8ae3b69be94d8f84ff32794af2b7d6#r73315110
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160803/ebf80d99/attachment.html>
More information about the mlpack-git
mailing list