nhojpatrick commented on code in PR #215:
URL: https://github.com/apache/commons-math/pull/215#discussion_r1001424394
##########
commons-math-neuralnet/src/test/java/org/apache/commons/math4/neuralnet/MapRankingTest.java:
##########
@@ -94,15 +97,16 @@ public void testFindClosestNeuron() {
Assert.assertEquals(3, allBest.size());
}
- @Test(expected = IllegalArgumentException.class)
+ @Test
public void testRankPrecondition() {
final UniformRandomProvider rng = RandomSource.SPLIT_MIX_64.create();
final FeatureInitializer init
= new
OffsetFeatureInitializer(FeatureInitializerFactory.uniform(rng, -0.1, 0.1));
final FeatureInitializer[] initArray = {init};
- new MapRanking(new NeuronString(3, false, initArray).getNetwork(),
- new EuclideanDistance()).rank(new double[] {-1}, 0);
+ assertThrows(IllegalArgumentException.class, () ->
Review Comment:
extracted setup, so only rank is checked.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]