# Machine learning time intervall partition?

So I knew the basics of the ML, and now I would like to solve a task, but unfortunately I don't know how to approach, and what kind of algorithm should I looking for. I try to write the problem:

The data (a logfile) contains events:

• an event contains (timePoint, duration, other features)
• an event_i can be a sub event of the event_j (basically this is kind of directed edges in a graph)
• the same event id can occur more than once

Goal:

One logfile contains a time intervall T=(startTime, endTime), and many events and I can assign a partition of the T time intervall like:

((startTime = t0, t1), A), (t1, t2), B),..((t(N-1), t(N)=endTime),X)

A,B..,X can be the same label. All log using the same 4-5 different label.

I have some training data (few log files) and I would like to "create" a program which automatically can make a time partition (for this log file) and assign these labels.

My first impression was this is kind of classification problem, but I'm not sure. Could you give me keywords what should I looking for? I would like to solve the problem in python if it is matter :)