apache-commons-math

Generating random integers within range with a probability distribution

好久不见. 提交于 2019-11-29 14:42:00
问题 I have a problem where I want to generate a set of random integer values between 1 and 5 inclusive using a probability distribution. Poisson and Inverse Gamma are two distributions that show the characteristics I am after (majority at mean, less higher numbers) that I have found. I am looking at using Apache Commons Math but I wasn't sure how to generate the numbers I wanted using the distributions available. 回答1: From your problem description, it sounds like you actually want a sample

How to use SimplexSolver or SimplexOptimizer in java apache math?

夙愿已清 提交于 2019-11-29 08:00:28
I'm trying to use the apache commons math library version 3.5+ to solve an optimization problem. Basically, I'm trying to fit a (gamma) distribution to some data points. I can't seem to find any simple examples of how to use the new (version 3.5) optimization tools, such as SimplexSolver, SimplexOptimizer, or OptimizationData, to solve a trivial optimization problem. Similar questions have been asked here before, but all the answers seem to be for older version of apache math - in 3.5 things were restructured and none of the example code I could find works. Does anyone have a working example

How to use SimplexSolver or SimplexOptimizer in java apache math?

本小妞迷上赌 提交于 2019-11-28 01:27:30
问题 I'm trying to use the apache commons math library version 3.5+ to solve an optimization problem. Basically, I'm trying to fit a (gamma) distribution to some data points. I can't seem to find any simple examples of how to use the new (version 3.5) optimization tools, such as SimplexSolver, SimplexOptimizer, or OptimizationData, to solve a trivial optimization problem. Similar questions have been asked here before, but all the answers seem to be for older version of apache math - in 3.5 things