-
Notifications
You must be signed in to change notification settings - Fork 9
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
Strange behavior produced when transforming a date column #2
Comments
Hi Feras, thanks for pointing at the helpful context in transforms.py. From the code there, it looks to me like the numbers are correct but the suffices are being truncated: 'timestamp.month' should really be 'timestamp.mod.month', i.e. the timstamp modulo month, which is intended. That seems to make sense, since 'timestamp.day' would mean 'timestamp.mod.day' i.e. hour, which is always zero, since you only have day-resolution (Loom is wary about assuming all data has only day-resolution, and avoids dropping categorical columns with only a single value, since those columns often result from subsampling, and Loom wants inference to be invariant wrt subsampling). It looks like Loom has pretty weak test of transform name consistency, and I'm not sure where the '.mod' is elided. |
Note that Loom probably ought to transform to cyclic von Mises variables, rather than categoricals, but Loom does not implement the von Mises distribution (unlike BayesDB). |
It was elided in my transcription of
I see; since the current behavior is intended I'll close the ticket. |
Using
loom.transform
on a date field produces strange columns. The raw data and schema I provided toloom.tasks.transform
is(the actual files don't have extraneous whitespaces after commas, I put them above for easier readability).
The result in
ingest/rows_csv/dataset.csv/gz
shows a strange transform fortimestamp
:the
timestamp.month
appears to be theday
, and thetimetsamp.year
appears to be themonth
, etc.Maybe the issue is over here:
https://github.com/posterior/loom/blob/master/loom/transforms.py#L339-L343
The text was updated successfully, but these errors were encountered: