0

I have a pretty simple .csv table: enter image description here

I use this table as an input parameter when creating a model in Create ML, where the target is PRICE, CITY and DATE are feature columns.

I need to get a price prediction for a giving date in the future for a particular city.

The code below gives a different price for different dates, as it should work, however, it gives the same result regardless of the given city:

let prediction = try? model.prediction(
 CITY: name, DATE: date
)

let price = prediction?.PRICE

The price for a given date in the future in Paris should not be equal to the price for the same date in New York.
Do I really need to create 2 different models for each of the cities?
Thank you!

instback
  • 131
  • 2
  • 15

2 Answers2

0

Is this all the data your are giving it? You're going to need to give it a lot more to go off of.

Scott
  • 91
  • 6
0

So, it was a bug in the .csv file, it looks like the CITY column was recorded with invisible characters.

instback
  • 131
  • 2
  • 15