-
Notifications
You must be signed in to change notification settings - Fork 394
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
Time based aggregators #167
Conversation
features/src/main/scala/com/salesforce/op/aggregators/TimeBasedAggregator.scala
Outdated
Show resolved
Hide resolved
|
||
private[op] abstract class TimeBasedAggregator[T <: FeatureType] | ||
( | ||
val compareFun: (Long, Long) => Boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any particular reason in making this function a value argument?
features/src/main/scala/com/salesforce/op/aggregators/TimeBasedAggregator.scala
Outdated
Show resolved
Hide resolved
features/src/main/scala/com/salesforce/op/aggregators/TimeBasedAggregator.scala
Outdated
Show resolved
Hide resolved
val ftFactory = FeatureTypeFactory[T]() | ||
|
||
val monoid: Monoid[(Long, T#Value)] = new Monoid[(Long, T#Value)] { | ||
val zero = timeZero -> emptyValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you dont need to pass zeroValue, instead simply:
val zero = timeZero -> FeatureTypeDefaults.default[T].value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to remove support for RealNN since it doesn't have a default - but that may be better anyway
@leahmcguire scalastyle is not happy. |
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
==========================================
+ Coverage 85.81% 86.22% +0.41%
==========================================
Files 303 304 +1
Lines 9914 9920 +6
Branches 338 551 +213
==========================================
+ Hits 8508 8554 +46
+ Misses 1406 1366 -40
Continue to review full report at Codecov.
|
Made aggregators for first and last event value for all feature types.