1
$\begingroup$

I am new to Machine Learning and need help understanding how can I model the below (hypothetical) problem.

Say I record the following info about thousands of people.

For 365 days, each day I record the following info about each person.

  1. Person's weight
  2. Gender (1 for male, 0 otherwise)
  3. Calories intake
  4. Calories burnt
  5. Hour's slept

So that my complete dataset looks like this

Person1

Day weight gender cal-intake cal-burnt hours-slept
1 82 1 2010 1890 6
2 81.5 0 2050 1785 8
... 81.7 1 2055 1780 7
365 81.2 1 2060 1810 7

Person2

Day weight gender cal-intake cal-burnt hours-slept
1 ... ... ... ... ...
... ... ... ... ... ...
365 ... ... ... ... ...

and so on.

I want to train a model in python using this data. The model should be able to do the following:

I will supply 30 days of information on a new person as input to the model and it will give out a binary value indicating whether the person will loose or gain weight 7 days from now in the future. Can this be done?

Edit: I want to learn how to approach such a problem, the suitable algorithms and how to shape my data. Not worried about the accuracy of the trained model as I won't be using it in real life.

$\endgroup$
2
  • 1
    $\begingroup$ Can you use the data to train a machine learning to predict if a person will gain or lose weight in the next seven days, sure you can. The question is if it will be possible to train a model that will perform well, which you cannot really determine before starting such a project. $\endgroup$
    – Oxbowerce
    Oct 7, 2021 at 17:52
  • $\begingroup$ Edited the question. Basically this is to learn how to approach such a problem and don't care about the accuracy of the trained model. $\endgroup$
    – Dev Dutta
    Oct 7, 2021 at 18:28

1 Answer 1

1
$\begingroup$

You can use time-series forecasting for this problem. There is a an example for weather data on TensorFlow website: Their models make predictions based on a window of consecutive samples from the data. For the definition of "windows" check this step. You should be able to adapt the process to your problem.

For your data, it might be a good idea to define "calorie deficit/excess" instead of using intake/burnt separately as that will be the defining value. Also, it might be a good idea to get rid of explicit reference to gender as a categorical data. I was thinking maybe incorporate it with the weights column using something like BMI as reference point, but you don't have height info, so maybe it can be used with other numerical data using daily recommended calorie intake for a man or woman.

$\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.