Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid creating SparseVectors for LOCO #377

Merged
merged 19 commits into from
Aug 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
zipped
  • Loading branch information
gerashegalov committed Aug 8, 2019
commit 2248d493ce55e3e89f84d54b251d5df80c0c15c9
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class RecordInsightsLOCO[T <: Model[T]]
baseScore: Array[Double]
): Array[Double] = {
val score = modelApply(labelDummy, featureSparse.toOPVector).score
baseScore.zip(score).map { case (b, s) => b - s }
(baseScore, score).zipped.map { case (b, s) => b - s }
}

private def sumArrays(left: Array[Double], right: Array[Double]): Array[Double] = {
Expand Down