-
Notifications
You must be signed in to change notification settings - Fork 395
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
leahmcguire
merged 19 commits into
salesforce:master
from
gerashegalov:gera/perf-regression
Aug 21, 2019
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
66a5e99
WIP
gerashegalov 77b97ee
code check fixes
gerashegalov 35b8b5c
try sparse vector clone for test fix
gerashegalov cb2dc05
Merge branch 'master' into gera/perf-regression
michaelweilsalesforce a494129
WIP
gerashegalov 1c383e5
code check fixes
gerashegalov a1d7d81
try sparse vector clone for test fix
gerashegalov f95f4bf
better names
gerashegalov a8ff84f
Skip Zeros when computing LOCOs for Text and Date fields
mweilsalesforce 709594f
Merge branch 'gera/perf-regression' of github.com:gerashegalov/Transm…
mweilsalesforce 96b2941
Fix Scalastyle
mweilsalesforce ee76053
minor fixes
gerashegalov 2248d49
zipped
gerashegalov c3f743d
redundant toArray
gerashegalov dc39cb3
Updating comments + adding extra checks
mweilsalesforce 25a6ac5
Merge branch 'master' into gera/perf-regression
leahmcguire 3b7b63a
Adding TODO
mweilsalesforce b271b74
Merge branch 'master' into gera/perf-regression
tovbinm 087b1d2
Merge branch 'master' into gera/perf-regression
leahmcguire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding TODO
- Loading branch information
commit 3b7b63adaf1086d40f8ecc8cd8f583d2c79046be
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this is true now - but may not always be true. If you want this to apply only for date unit circles should also check that one of the
parentFeatureStages
is aDateToUnitCircleTransformer
orDateToUnitCircleVectorizer
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.
This check is not consistent : Unit Circle Transformation in
DateMapVectorizer
is not reflected in the parentStages (Seq[DateMapVectorizer]
instead).I think the check on descriptor value is coherent.
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.
Or I can check the parentType instead
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.
If this change is explicitly to deal with date features that are transformed to unit circle then the check needs to be explicitly for that. Otherwise this is also applied to lat lon values (and anything else that we add later) and if we just check the type of the parent it assumes that we will always have unit circle transformation of dates - which could change at some point...
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 agree, but as I said above checking the
parentFeatureStages
won't work : for instanceDateMapVectorizer
may apply Unit circle transformationThere 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.
DateMapVectorizer does days between reference date and the date. The only two that do unit vector are DateToUnitCircleTransformer and DateToUnitCircleVectorizer
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.
Then there must be a bug in the shortcut : when
println(s"name ${history.columnName} stage ${history.parentFeatureStages} descriptor value ${history.descriptorValue}")
I getThose features both use the
.vetcorize
shortcut.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.
blarg! you are right there is a bug in the feature history that means we loose info if the same feature undergoes multiple transformations :-( https://github.com/salesforce/TransmogrifAI/blob/master/features/src/main/scala/com/salesforce/op/utils/spark/OpVectorMetadata.scala#L53
Can you put a todo to update once the bug is fixed