-
Notifications
You must be signed in to change notification settings - Fork 33
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
cut
into Interval
s
#404
Comments
What we would need to do is to allow types from IntervalSets.jl to be category levels (now only char, string and number are allowed). But I think it would make sense to allow them. IntervalSets.jl is a relatively light package. @nalimilan - what do you think? |
I'm not sure it would really be useful. Strings are convenient and flexible, and IntervalSets could provide another function to cut a numeric variable into proper intervals. If you have intervals, you probably don't need a Also in terms of implementation, allowing |
I want to be able to use the IntervalSets.jl functions. At the moment I am just using
|
That's not what I call a concrete use case. ;-) What kind of data are you processing? For what goal? |
I assume that a basic use case is that:
Of course, all this can be done without CategoricalArrays.jl, but I assume that @jariji wants some convenience and consistency here. |
I have duration data and I'm partitioning it into intervals for a model where each interval has a parameter, something like 90-day-period fixed effects. Btw I'm using numbers for time durations but could imagine using
This might be the best solution, though I guess IntervalSets.jl doesn't have the concept of a partition, so it doesn't know that some interval |
I see. Do you then get a single new value to fit into existing intervals? Or a vector of new values? |
I'm just doing it on the array, so I don't need any special "categorize a new value" function -- I'm basically just implementing |
Currently
cut
returnsString
-valued categories butInterval
-valued categories from IntervalSets.jl could be nicer. What do you think about this?The text was updated successfully, but these errors were encountered: