Covariance Matrix of Seq[DenseVector[Double]] wrong?

47 views
Skip to first unread message

Chinmay Nerurkar

unread,
Nov 28, 2016, 11:59:52 PM11/28/16
to Scala Breeze
Referring to https://github.com/scalanlp/breeze/blob/master/math/src/main/scala/breeze/stats/DescriptiveStats.scala#L213

For `breeze.stats.covmat(data: Seq[DenseVector[Double]]): DenseMatrix[Double])`, if `data` has 3 vectors of with 2 elements each, the returned covariance matrix `DenseMatrix[Double]` is of size `2x2`. Shouldn't it be `3x3`?
Basically `val result = new DenseMatrix[Double](firstRow.size, firstRow.size)` should be `val result = new DenseMatrix[Double](data.size, data.size)`

David Hall

unread,
Nov 29, 2016, 12:01:07 AM11/29/16
to scala-...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Scala Breeze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-breeze+unsubscribe@googlegroups.com.
To post to this group, send email to scala-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-breeze/a02a4909-a9f4-4c03-b19d-22aacfb8850b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages