emma.lucy33
emma.lucy33

Reputation: 1

Using a dataframe as input for MLP (tensorflow)

I have created/manipulated a large pandas dataframe about flights of the following form:

  origin  dep_delay temp    dewp    humid   wind_dir wind_speed visib   late
0   EWR     19.0    39.02   28.04   64.43   260.0    12.65858   10.0     True
1   LGA     4.0     39.92   24.98   54.81   250.0    14.96014   10.0     False
2   JFK     18.0    39.02   26.96   61.63   260.0    14.96014   10.0     True
3   JFK     -8.0    39.02   26.96   61.63   260.0    14.96014   10.0     False
4   LGA     -6.0    39.92   24.98   54.81   260.0    16.11092   10.0     False

I would like to use MLP (multi-layer perceptron ideally with tensorflow), to predict which flights will be late given the input values of (dep_delay, temp, humid etc.). I think MLP is sensible but let me know if I am mistaken.

I'm not too sure how to approach this as I have only used MLP on images, could anyone help me out?

I know I have to convert the dataframe to a more sensible data type first like a numpy array but I'm not sure how to get started.

Upvotes: 0

Views: 391

Answers (1)

Georgios Livanos
Georgios Livanos

Reputation: 536

You have to know the type of data you want to prepare and feed your model. The origin and late columns for example are categorical whilst all the other columns seems to be numerical. One of the many ways to prepare your data is using keras preprocessing layers.

Upvotes: 0

Related Questions