Skip to content

Commit

Permalink
Improvements to speed of DecomposableKernel class
Browse files Browse the repository at this point in the history
Achieved via changes to `breezeDVSplitEncoder` implementation in
`DynaMLPipe`
  • Loading branch information
mandar2812 committed Dec 20, 2016
1 parent 86d40bd commit d80192f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ object DynaMLPipe {
* */
val breezeDVSplitEncoder = (n: Int) => Encoder((v: DenseVector[Double]) => {
optimize {
v.toArray.grouped(n).map(DenseVector(_)).toArray
//v.toArray.grouped(n).map(DenseVector(_)).toArray
Array.tabulate(v.length/n)(i => v(i*n until math.min((i+1)*n, v.length)))
}
}, (vs: Array[DenseVector[Double]]) => {
optimize {
Expand Down

0 comments on commit d80192f

Please sign in to comment.