case class WeightedAverage(weightSum: Weight, value: Double) extends Product with Serializable
This is of course extremely similar to the averaged value implementation in Algebird... it just keeps track of a numerator AND denominator
- Source
- WeightedAverage.scala
- Alphabetic
- By Inheritance
- WeightedAverage
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
+(that: Double): WeightedAverage
Returns a new instance that averages
that
into this instance.Returns a new instance that averages
that
into this instance.- that
value to average into this instance
- returns
an instance representing the mean of this instance and
that
.
-
def
+(r: WeightedAverage): WeightedAverage
Averages this instance with another WeightedAverage instance.
Averages this instance with another WeightedAverage instance.
- r
the other instance
- returns
an instance representing the mean of this instance and
r
.
-
def
-(r: WeightedAverage): WeightedAverage
Averages this instance with the *opposite* of the supplied WeightedAverage instance, effectively subtracting out that instance's contribution to the mean.
Averages this instance with the *opposite* of the supplied WeightedAverage instance, effectively subtracting out that instance's contribution to the mean.
- r
the instance to subtract
- returns
an instance with
r
's stream subtracted out
- def plus(that: Double, weight: Weight): WeightedAverage
-
def
unary_-: WeightedAverage
Returns a copy of this instance with a negative value.
Returns a copy of this instance with a negative value. Note that
a + -b == a - b
- val value: Double
- val weightSum: Weight
edit this text on github
ScalaRL
This is the API documentation for the ScalaRL functional reinforcement learning library.
Further documentation for ScalaRL can be found at the documentation site.
Check out the ScalaRL package list for all the goods.