JuliaAI / JuliaAI/ScientificTypesBase.jl
Proposal for TimeTable scitype
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 10
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
The simplest kind of time series data consists of a table in which one "timestamp" column is a vector with some temporal eltype, and the other columns can have any type (but are named). Some ML models would require this column to be temporally ordered, and possibly uniform, but defining scitypes which need to inspect internal structure is problematic, from a performance point-of-view (detecting Missing data is a case-in-point we already encountered).
Some specific tabular formats do ensure sequential order (eg, TimeSeries.TimesArray) but we should not like to exclude ordinary DataFrames, for example, from being counted as a "TimeTable". So, checking internal structure may have to be delegated to the client (eg, ML model).
With this in mind I propose we start by defining
struct TimeTable{K,T,timestamp} <: Table{Union{K,AbstractVector{T}}} end
where K is the union of the column scitypes (excluding the timestamp column), T is the elscitype of the timestamp column, and timestamp is the name of the timestamp column (a symbol). To realise the sub-typing, we would need to change Table from struct to abstract type but I'm not immediately seeing any problems with that.
So, for example, we could then implement scitype (in MLJScientificTypes) to have this behaviour:
using TimeSeries
using Dates
dates = Date(2018, 1, 1):Day(1):Date(2018, 12, 31)
ta = TimeArray(dates, rand(length(dates)))
scitype(ta) <: TimeSeriesTable{ScientificDateTime, AbstractVector{Continuous}, :timestamp} # true
Thoughts?
cc: @svollmer
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing Table type and the scitype interface, then compare the proposal with the TimeSeries.TimeArray example and the referenced MLJScientificTypes behavior. Done would require an agreed design for TimeTable, including how Table subtyping and the timestamp column are represented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100