Python Forum
Keras.Predict into Dataframe
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keras.Predict into Dataframe
(Mar-15-2020, 01:01 PM)jefsummers Wrote: predictions = []. Sorry, forgot the equal sign
It's just to define predictions as a list so you can use append

It works in some way! Big Grin

It returns a "list" of 40 "DataFrame" for each target
40 for each target? Eww. You can look at them to see how you may want to combine.
In one project I was getting restaurants in Toronto, and Foursquare limits a search result to 50. So, I had to combine a bunch of dataframes so I could get them all. Code is:
#combine the dataframes
df_r_comb = array_of_restaurant_frames[0]
df_eth = array_of_Eth[0]
for frame in array_of_restaurant_frames :
    df_r_comb = pd.concat([df_r_comb,frame], sort=False)
for frame in array_of_Eth :
    df_eth = pd.concat([df_eth,frame], sort=False)

Two sets of restaurants combined - all, and then Ethiopian (the task of the project was to find where to put a new Ethiopian restaurant)
That adds the rows of one dataframe to another. You would need to look at the frames to see if you want to add rows or columns as you combine.
Miss spelling, my bad :)
It returns a list that consist of one DataFrame for each of my targets(40).
Thank you for the help!
Can't help if the code is not provided.Just take a look at Keras tutorial and see if it helps.
P.S: I don't think providing the code is going to mess up the thesis, may be you can provide with a different dataset

Possibly Related Threads…
Thread Author Replies Views Last Post
  Which network architecture should be chosen to predict disease severity? AlekseyPython 2 232 Aug-21-2021, 07:12 PM
Last Post: jefsummers
  How to predict output in a regression problem? Rezaafz 1 614 Apr-03-2021, 04:16 PM
Last Post: jefsummers
  Understanding Keras and TensorFlow and how to use them bytecrunch 1 668 Mar-11-2021, 02:40 PM
Last Post: jefsummers
  Making a Basic Keras Model - Input Shape and Parameters MattKahn13 0 841 Aug-16-2020, 04:36 PM
Last Post: MattKahn13
  Analyze, predict the next step in a sequence. Antonio0608 0 809 Jul-23-2020, 05:53 PM
Last Post: Antonio0608
  Error when import Keras Azadfalah 1 1,003 Apr-29-2020, 04:45 AM
Last Post: buran
  Error When Using sklearn Predict Function firebird 0 839 Mar-21-2020, 04:34 PM
Last Post: firebird
  Keras + Matplotlib causing crash spearced 3 1,971 Feb-06-2020, 04:54 PM
Last Post: zljt3216
  Keras Dense layer with wrong input d1r4c 0 710 Jan-02-2020, 02:35 PM
Last Post: d1r4c
  Predict Longitude and Latitude Using Python vibeandvisualize 1 907 Dec-27-2019, 12:10 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020