CREATE DATABASE example_db WITH ENGINE = "postgres", PARAMETERS = { "user": "demo_user", "password": "demo_password", "host": "3.220.66.106", "port": "5432", "database": "demo" };
home_rentals
CREATE MODEL mindsdb.adjust_home_rentals_model FROM example_db (SELECT * FROM demo_data.home_rentals WHERE days_on_market < 10) PREDICT rental_price;
Query successfully completed
SELECT * FROM mindsdb.models WHERE name = 'adjust_home_rentals_model';
SELECT rental_price, rental_price_explain FROM mindsdb.adjust_home_rentals_model WHERE sqft = 1000 AND location = 'great' AND neighborhood = 'berkeley_hills' AND number_of_rooms = 2 AND number_of_bathrooms = 1 AND days_on_market = 40;
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | rental_price | rental_price_explain | +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | 2621 | {"predicted_value": 2621, "confidence": 0.99, "anomaly": null, "truth": null, "confidence_lower_bound": 2523, "confidence_upper_bound": 2719} | +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------+
FINETUNE mindsdb.adjust_home_rentals_model FROM example_db (SELECT * FROM demo_data.home_rentals WHERE days_on_market >= 10);
SELECT name, engine, project, active, version, status FROM mindsdb.models_versions WHERE name = 'adjust_home_rentals_model';
+---------------------------+-----------+---------+--------+---------+----------+ | name | engine | project | active | version | status | +---------------------------+-----------+---------+--------+---------+----------+ | adjust_home_rentals_model | lightwood | mindsdb | false | 1 | complete | | adjust_home_rentals_model | lightwood | mindsdb | true | 2 | complete | +---------------------------+-----------+---------+--------+---------+----------+
rental_price
+---------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | rental_price | rental_price_explain | +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------+ | 2055 | {"predicted_value": 2055, "confidence": 0.99, "anomaly": null, "truth": null, "confidence_lower_bound": 1957, "confidence_upper_bound": 2153} | +---------------+-----------------------------------------------------------------------------------------------------------------------------------------------+