Bottom Page

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
Quote
#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.
Quote
#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!
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Error when import Keras Azadfalah 1 193 Apr-29-2020, 04:45 AM
Last Post: buran
  Error When Using sklearn Predict Function firebird 0 197 Mar-21-2020, 04:34 PM
Last Post: firebird
  Keras + Matplotlib causing crash spearced 3 874 Feb-06-2020, 04:54 PM
Last Post: zljt3216
  Keras Dense layer with wrong input d1r4c 0 203 Jan-02-2020, 02:35 PM
Last Post: d1r4c
  Predict Longitude and Latitude Using Python vibeandvisualize 1 290 Dec-27-2019, 12:10 PM
Last Post: Larz60+
  How to predict with date as input for DecisionTreeRegressor sandeep_ganga 0 222 Dec-12-2019, 03:29 AM
Last Post: sandeep_ganga
  Keras: Time series classification midarq 0 370 Sep-25-2019, 09:03 AM
Last Post: midarq
  Keras. ModuleNotFoundError: No module named 'error' agatte 1 3,025 Sep-18-2019, 12:27 PM
Last Post: shivani
  Keras Target Problem inco 1 926 May-05-2019, 10:47 AM
Last Post: scidam
  keras tensor mainpulation output to next input JohnyBeGood 0 592 Nov-21-2018, 03:30 PM
Last Post: JohnyBeGood

Forum Jump:


Users browsing this thread: 1 Guest(s)