r/GeneticProgramming • • Nov 21 '22

Genetic program for classifying time-series data with discrete classes

My dataset consists of data collected from various sensors over time, with three discrete outcomes. This data was collected from multiple volunteers. Something like this (there's a lot more data points in the real dataset):

TimeSensor1Sensor2Classification
5ms0.7546540.875612ClassOne
10ms0.7546540.875612ClassOne
5ms0.4848750.18484ClassTwo
10ms0.484840.184616ClassTwo

My initial idea for fitness function was to compute the individual using each of the sensor data points and return whether the sign of the result matches the sign assigned to the class, like this:

Individual: cos(x) + sin(y)

cos(0.754654) + sin(0.875612) = 1.4964442580137667 (sign = +, and + is assigned to ClassOne)

This idea does not work (best fitness I get is around 49%). I've played around with different primitives. Does anyone have any suggestions or readings that might help me figure this out? How should I handle time-related data?

2 Upvotes

8 comments sorted by

View all comments

1

u/[deleted] Nov 21 '22

Hm, didn't get what the role of GP here. What to fit?

1

u/Atlas_will_prevail Nov 21 '22

I'm trying to use the GP as a classifier