0
$\begingroup$

I'm trying to find causes for my lack of sleep through data. I'm hoping to be able to input information throughout the day like "drank coffee", "Exercised", "meditation","what I ate for dinner"... and log the amount/quality of sleep. I would finish with something like this data wise:

Day |  Coffee   | Baby cried :( | Sleep
1   |  yes(9am) | yes(2am-1hr)  | 4hrs
2   |  yes(8am) | no            | 6hrs
3   |  yes(4pm) | no            | 3hrs
4   |  no(9am)  | yes(3am-2hr)  | 8hrs

(This data example is small and missing columns and is a simple example) The idea is to see what influences my sleep most, it might be to stop caffeine after 12pm...OR working out for 2days in a row, or a combination of those, means I get better sleep.

Can anybody point me in the right direction for this, what method could make guesses on what leads to longer sleep or shorter sleeps? Bearing in mind that it's not going to be a huge amount of data (if a person logs a year for example, it would be 365 data points).

thanks.

$\endgroup$

2 Answers 2

1
$\begingroup$

Something you should look into is Principal Component Analysis, it seems like what you're attempting to achieve. Plotly has a tutorial on the subject you should look into. There is an interesting paper from Princeton on the topic as well.

$\endgroup$
1
$\begingroup$

If you want a rule-based interpretable answer, a very simple way to start off is to use decision tree (and next step to use random forest).

Decision tree would be able to select the most relevant features (caffeine, workout) and explain in better detail what value of these features causes the label to be Yes or No (or probabilities using regression tree).

I would use simpler models for a smaller dataset instead of going for neural network architectures (following the principle of "Occam's razor")

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.