Skip to content

Instantly share code, notes, and snippets.

Created November 7, 2020 10:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save amankharwal/2cf78d19be33ed5d92e38ab32813150c to your computer and use it in GitHub Desktop.
import mindsdb
predictor = mindsdb.Predictor(name='home_rental_predictor')
predictor.learn(from_data='home_rentals.csv', to_predict='rental_price')
result = mdb_predict.predict(when={'number_of_rooms': 2,'number_of_bathrooms':1, 'sqft': 1190})
# you can now print the results
print('The predicted price is ${price} with {conf} confidence'.format(price=result[0]['rental_price'], conf=result[0]['rental_price_confidence']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment