Skip to content

Commit ee81c41

Browse files
committed
Corrections to setState of Polynomial Kernel
1 parent 08895a4 commit ee81c41

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.sbt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import sbt._
2-
import NativePackagerHelper._
32
import java.io.File
43

54
maintainer := "Mandar Chandorkar <[email protected]>"
@@ -16,7 +15,7 @@ val dataDirectory = settingKey[File]("The directory holding the data files for r
1615
lazy val commonSettings = Seq(
1716
name := "DynaML",
1817
organization := "io.github.mandar2812",
19-
version := "v1.4-beta.6",
18+
version := "v1.4-beta.7",
2019
scalaVersion in ThisBuild := "2.11.7",
2120
mainClass in Compile := Some("io.github.mandar2812.dynaml.DynaML"),
2221
fork in run := true,

src/main/scala/io/github/mandar2812/dynaml/kernels/PolynomialKernel.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class PolynomialKernel(
3232

3333
override def setHyperParameters(h: Map[String, Double]) = {
3434
super.setHyperParameters(h)
35-
state += ("offset" -> math.abs(h("offset")))
35+
if(h contains "offset")
36+
state += ("offset" -> math.abs(h("offset")))
3637
this
3738
}
3839
}

0 commit comments

Comments
 (0)