Python Forum
Keras.Predict into Dataframe
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keras.Predict into Dataframe
#11
(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
Reply
#12
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)

print(df_r_comb.shape)
print(df_eth.shape)
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.
Reply
#13
Miss spelling, my bad :)
It returns a list that consist of one DataFrame for each of my targets(40).
Thank you for the help!
Reply
#14
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to use .predict() method Jack90_ 4 698 Nov-03-2023, 08:21 PM
Last Post: Larz60+
  How to predict Total Hours needed with List as Input? caninan 0 761 Jan-27-2023, 04:20 PM
Last Post: caninan
  1st layer tf.keras output shape set at multiple - need help! Afrodizzyjack 0 1,782 Jun-07-2022, 04:53 PM
Last Post: Afrodizzyjack
  issue displaying summary of whole keras CNN model on TensorFlow with python Afrodizzyjack 0 1,619 Oct-27-2021, 04:07 PM
Last Post: Afrodizzyjack
  Which network architecture should be chosen to predict disease severity? AlekseyPython 2 1,956 Aug-21-2021, 07:12 PM
Last Post: jefsummers
  How to predict output in a regression problem? Rezaafz 1 2,468 Apr-03-2021, 04:16 PM
Last Post: jefsummers
  Understanding Keras and TensorFlow and how to use them bytecrunch 1 2,052 Mar-11-2021, 02:40 PM
Last Post: jefsummers
  Problems feeding live input from my microphone into a keras model (SegFault: 11) zeptozetta 1 2,539 Sep-14-2020, 03:08 AM
Last Post: zeptozetta
  Making a Basic Keras Model - Input Shape and Parameters MattKahn13 0 2,093 Aug-16-2020, 04:36 PM
Last Post: MattKahn13
  Analyze, predict the next step in a sequence. Antonio0608 0 1,970 Jul-23-2020, 05:53 PM
Last Post: Antonio0608

Forum Jump:

User Panel Messages

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