use of org.eclipse.collections.api.block.function.primitive.IntToFloatFunction in project narchy by automenta.
the class LivePredictorTest method test12_MLP.
@Test
public void test12_MLP() {
IntToFloatFunction ii = x -> (float) Math.sin(x / 8f);
IntToFloatFunction oo = x -> (float) Math.cos(x / 8f);
LivePredictor.MLPPredictor model = new LivePredictor.MLPPredictor(0.03f);
int iHistory = 4;
int errorWindow = 16;
int totalTime = 1024;
float maxMeanError = 0.15f;
assertCorrect(ii, oo, model, iHistory, errorWindow, totalTime, maxMeanError);
}
use of org.eclipse.collections.api.block.function.primitive.IntToFloatFunction in project narchy by automenta.
the class LivePredictorTest method test21_LSTM.
@Test
public void test21_LSTM() {
IntToFloatFunction ii = x -> (float) Math.sin(x / 4f);
IntToFloatFunction oo = x -> (float) Math.cos(x / 8f);
LivePredictor.LSTMPredictor model = new LivePredictor.LSTMPredictor(0.5f, 1);
int iHistory = 6;
int errorWindow = 16;
int totalTime = 8192 * 8;
float maxMeanError = 0.1f;
assertCorrect(ii, oo, model, iHistory, errorWindow, totalTime, maxMeanError);
}
use of org.eclipse.collections.api.block.function.primitive.IntToFloatFunction in project narchy by automenta.
the class LivePredictorTest method test1.
@Test
public void test1() {
IntToFloatFunction ii = x -> (float) Math.sin(x / 4f);
IntToFloatFunction oo = x -> (float) Math.cos(x / 4f);
LivePredictor.LSTMPredictor model = new LivePredictor.LSTMPredictor(0.1f, 1);
int iHistory = 4;
int errorWindow = 16;
int totalTime = 8192;
float maxMeanError = 0.2f;
assertCorrect(ii, oo, model, iHistory, errorWindow, totalTime, maxMeanError);
}
Aggregations