Fix glm test.
[lightning.git] / glm_test.go
index 8ca5d099f3fd7bbc77f6f486467a0c2aa48ce0f3..ec3c000f9594d51c60ea4fdd2783f69a072b287b 100644 (file)
@@ -174,7 +174,7 @@ func (s *glmSuite) TestPvalueRealDataVsPython(c *check.C) {
                }
        }
 
-       pGo := glmPvalueFunc(samples, nPCA, 1)(onehot)
+       pGo := glmPvalueFunc(samples, nPCA)(onehot)
        c.Logf("pGo = %g", pGo)
 
        var pydata bytes.Buffer
@@ -275,7 +275,7 @@ func (s *glmSuite) TestPvalue(c *check.C) {
 1, 1, 2, 1.22, 2.32
 1, 1, 3, 1.21, 2.31
 `)
-       c.Check(glmPvalueFunc(samples, npca, 1)(onehot), check.Equals, 0.002789665435066107)
+       c.Check(glmPvalueFunc(samples, npca)(onehot), check.Equals, 0.002789665435066107)
 
        samples, onehot, npca = csv2test(`
 # case=1, onehot=1, pca1, pca2, pca3
@@ -289,7 +289,7 @@ func (s *glmSuite) TestPvalue(c *check.C) {
 1, 1, 2, 1.22, 2.32
 1, 1, 3, 1.21, 2.31
 `)
-       c.Check(math.IsNaN(glmPvalueFunc(samples, npca, 1)(onehot)), check.Equals, true)
+       c.Check(math.IsNaN(glmPvalueFunc(samples, npca)(onehot)), check.Equals, true)
 }
 
 var benchSamples, benchOnehot = func() ([]sampleInfo, []bool) {
@@ -315,7 +315,7 @@ var benchSamples, benchOnehot = func() ([]sampleInfo, []bool) {
 
 func (s *glmSuite) BenchmarkPvalue(c *check.C) {
        for i := 0; i < c.N; i++ {
-               p := glmPvalueFunc(benchSamples, len(benchSamples[0].pcaComponents), 1)(benchOnehot)
+               p := glmPvalueFunc(benchSamples, len(benchSamples[0].pcaComponents))(benchOnehot)
                c.Check(p, check.Equals, 0.0)
        }
 }