Categories
Misc

Adding value rules to a tf model(noob)

Hello all

TLDR: 4 columns in df, sequential model, LSTM, how to add rule column a > column b for all a,b, and get a return for all 4 columns

Thanks for your help in advance.

I’m working on a sequential model. In python. Pretty much teaching myself as I go so I apologize for any incorrect jargon or naïveté.

Assume we have a list of families histories with family members weights x each in column, heaviest to lightest.

Ie Generation. Heaviest. Med heavy. Med light. Lightest

  1. 275. 225. 180. 145
  2. 300. 250. 225. 165

I have tried two approaches to guess the weights of the next generation. I have 100 generations to iterate over.

The first approach is to just feed the whole df into tf sequential model with lstm. Now maybe I don’t understand exactly what’s happening when I do that, which I don’t, but it returns a single value, not 4. (And I’m not sure it knows that column ‘heaviest’ >’lightest’ for all generations.) So as a work around I thought oh, just split it up and pass each column through its own model and then look at the values. I’m obviously loosing way to many connections because I’m only using 25% of the data at a time and the results are well, not ordered really.

So my long short question is……. if I pass the entire 4 column df, and I want tf to guess each value of the next generation, what do I need to add to force it to guess all 4? And is there a way to simply pass a rule I already know about the data?

submitted by /u/obibongcannobi
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *