あなたが達成しようとしていることを誤解しない限り、単純な問題を複雑にしているようです。
あなたの問題を解決する最も簡単な方法は、Linear Regression問題としてそれを扱い、このような何かをSimpleRegressionのApache Commonsのクラスを使用することです:
import org.apache.commons.math3.stat.regression.SimpleRegression;
public class MySimpleRegression {
public static void main(String[] args) {
// create a Simple Regression object
SimpleRegression simpleRegression = new SimpleRegression();
// create your data object with various instances of x, y - make the
// variable you want to predict the 'y' in your data
// i.e. if you wanna predict the time at a given temperature,
// 'x' would be temperature and 'y' time
double[][] data = { { 25, 0 }, {27, 10 }, {33, 17 }, {40, 20 }};
// pass this data to your simple regression object
simpleRegression.addData(data);
// and then you can predict the time at a given temperature value
System.out.println("Predicted Time: " + simpleRegression.predict(35));
// You can also get the slope and intercept from your data
System.out.println("slope = " + simpleRegression.getSlope());
System.out.println("intercept = " + simpleRegression.getIntercept());
}
}
これはあなたのを解決するために、より簡単な方法のように思えます問題。うまくいけば、これはあなたや他の人に役立ちます。
P.S .:これを実行しませんでした。しかし、うまくいくはずです。
既知のデータに基づいてパターンを作成し、最後にパターンを使用する必要があるようです。これは機械学習にとって最も簡単な問題です。 WEKAを試すことができます。 –