Solving problem with variational dimension with deep learning

I have some data as below

sample_id  start end class
1        3     7   1
1        10    12  1
1        14    18  1
2        5     7   2
2        9     11  2
2        14    20  2
2        21    26  2
3        4     6   1
3        8     11  1
.....


It could be viewed as below

reference    0.............................................................30
sample 1:  3------7     10-----12   14--------18
sample 2:     5---7   9-----11      14----------------20  21---------26
sample 3:   4---6   8-------11   13---------------19  20----22  24-------28
sample 4:   4------------------12       15--17


In short, it could be described like this. Suppose, there is a 1000m long straight line. I randomly select a number n between 20-100. Then randomly select n segments from the reference line and create a sample. Similarly, for second sample, select a random number between 20-100 and take that many random segments from the reference line. Then randomly select 50% of the samples as class 1 and rest of the samples as class 2.

So, there are two types of samples, class 1 and class 2. Each sample consists of n number of segments. In above example, sample 1 consists of 3 intervals and second sample consists of 4 intervals. Number of intervals vary from sample to sample.

Now I want to use a deep learning algorithm to classify sample type as either class 1 or 2. Which deep learning algorithm should I use? Or what would be the solution for the problem using deep learning technique.

• is there any intuition for how class label is generated (you mentioned 50% of the samples are randomly selected as class 1 and 50% as class 2). For example, is the length of the interval predictive of the class label? If yes, you could use RNN and formulate this as a sequence learning problem, i.e. the inputs become interval lengths and the output is a binary label. Commented Aug 15, 2017 at 21:12
• Could you give an example or some resource? Commented Aug 15, 2017 at 21:15