jpioug / predictionio-template-boston-house-prices

Apache License 2.0
3 stars 1 forks source link

Changing attribute from Double to String #2

Open daniel-draper opened 6 years ago

daniel-draper commented 6 years ago

I am in the process of editing this template to match my dataset needs. Most of my data is of type Double, however I have an attribute of type String as well. In Algorithm.scala I have changed the attribute types as shown below

screen shot 2018-02-22 at 11 21 16

However, when doing pio train it reads the strings for 'LSTAT' in the csv file I imported as null

screen shot 2018-02-22 at 11 44 14

And I also get the following error as it thinks LSTAT is still a Double.

screen shot 2018-02-22 at 11 44 29

Anybody know why this is still seeing LSTAT as a Double? I may have taken the wrong approach to changing the type of attributes that this engine can use when training, if so then what is the best way to edit this template to allow Double and Strings to be used in a dataset.