stripe-archive / brushfire

Distributed decision tree ensemble learning in Scala
Other
391 stars 50 forks source link

`Voter` trait #14

Closed avibryant closed 9 years ago

avibryant commented 9 years ago

To encapsulate the various strategies for combining predictions from multiple trees. Probably something like:

trait Voter[T] {
   type V
   def create(target: T): V
   def monoid: Monoid[V]
   def result(votes: V): T
}

with subclasses like class Plurality[L] extends Voter[Map[L, Long]], class SoftVote[L] extends Voter[Map[L, Long]], and so on.

avibryant commented 9 years ago

This would then leave the Error trait to take only a single predicted: T value instead of a sequence of them.