[mlpack-git] [mlpack/mlpack] Adds a Train() function that only needs dataset statistics (#748)

Ryan Curtin notifications at github.com
Tue Aug 2 13:23: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)

Hmm, do you think that instead of taking `const double`s here, we should take `const arma::vec&`, and fit all dimensions at once? That would remove the need to call this overload multiple times in the `Train()` overload that takes data, and `tempAlpha` and `tempBeta` would be unnecessary in that method.

---
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#r73198805
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160802/f3a30226/attachment-0001.html>


More information about the mlpack-git mailing list