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

Time based aggregators #167

Merged
merged 10 commits into from
Oct 31, 2018
Merged

Time based aggregators #167

merged 10 commits into from
Oct 31, 2018

Conversation

leahmcguire
Copy link
Collaborator

Made aggregators for first and last event value for all feature types.


private[op] abstract class TimeBasedAggregator[T <: FeatureType]
(
val compareFun: (Long, Long) => Boolean,
Copy link
Collaborator

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?

val ftFactory = FeatureTypeFactory[T]()

val monoid: Monoid[(Long, T#Value)] = new Monoid[(Long, T#Value)] {
val zero = timeZero -> emptyValue
Copy link
Collaborator

@tovbinm tovbinm Oct 27, 2018

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

Copy link
Collaborator Author

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

@tovbinm
Copy link
Collaborator

tovbinm commented Oct 31, 2018

@leahmcguire scalastyle is not happy.

@codecov
Copy link

codecov bot commented Oct 31, 2018

Codecov Report

Merging #167 into master will increase coverage by 0.41%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...alesforce/op/aggregators/TimeBasedAggregator.scala 100% <100%> (ø)
...es/src/main/scala/com/salesforce/op/OpParams.scala 85.71% <0%> (-4.09%) ⬇️
...la/com/salesforce/op/features/FeatureBuilder.scala 34.26% <0%> (+6.99%) ⬆️
...sforce/op/features/types/FeatureTypeDefaults.scala 96.11% <0%> (+11.65%) ⬆️
...ala/com/salesforce/op/aggregators/CutOffTime.scala 28.57% <0%> (+28.57%) ⬆️
.../salesforce/op/aggregators/FeatureAggregator.scala 100% <0%> (+88.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77f1920...21b0b43. Read the comment docs.

@tovbinm tovbinm merged commit 0ad3c28 into master Oct 31, 2018
@tovbinm tovbinm deleted the lm/timeAgg branch October 31, 2018 21:08
ericwayman pushed a commit that referenced this pull request Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants