@domain case class Theta(x:Vect,y:IndexedSeq[Double])
val Thetas = Theta.Values(Vectors(2),Seqs(Doubles,3))
def obj(t:Thetas.Term) =
sum(0 until 3) { i => 4.0 * t.y(i) - t.y(i) * t.y(i)} + (t.x dot t.x)
val term = argmax(Thetas)(obj) by adaGrad(AdaGradParameters(50,1))
term()
But this doesn't
@domain case class Theta(x:Vect,y:IndexedSeq[Double])
val Thetas = Theta.Values(Vectors(2),Seqs(Doubles,3))
def obj(t:Thetas.Term) =
sum(t.y) { i => 4.0 * i - i * i} + (t.x dot t.x)
val term = argmax(Thetas)(obj) by adaGrad(AdaGradParameters(50,1))
term()
Probably difficult to fix because we need to make the sum range differentiable, not sure how this should work. But need a sensible error message and good instructions.
This works:
But this doesn't
Probably difficult to fix because we need to make the sum range differentiable, not sure how this should work. But need a sensible error message and good instructions.