kylecorry31 / ML4K-AI-Extension

Use machine learning in AppInventor, with easy training using text, images, or numbers through the Machine Learning for Kids website.
MIT License
20 stars 15 forks source link

AddNumbersTrainingData #33

Open aliizzet opened 5 years ago

aliizzet commented 5 years ago

Can you give an example to AddNumbersTrainingData?

When I try GotError gives

train invalid data

Thanks

dalelane commented 5 years ago

If you have a project with fields specified like this:

image

and labels like this:

image

then you can add training data from App Inventor like this:

image

which would result in this:

image

dalelane commented 5 years ago

However, I think you have found a valid bug here, because if you have a project with multiple choice fields like this:

image

and labels like this

image

then the App Inventor blocks don't work, because if you do this:

image

you will get an "Invalid double" error.

@kylecorry31 I think we can't assume that number values are always double because Strings are valid for multiple-choice fields. e.g. https://github.com/kylecorry31/ML4K-AI-Extension/blob/fe70bc8e5e7841718486c4b2039a831947facfab/src/com/kylecorry/ml4k/ML4K.java#L171 I think numbers there should be a List<String> and so on.