Regression overview
A common use case for machine learning is predicting the value of a numericalmetric for new data by using a model trained on similar historical data.For example, you might want to predict a house's expected sale price. By usingthe house's location and characteristics as features, you can compare this houseto similar houses that have already sold, and use their sales prices to estimatethe house's sale price.
You can use any of the following models in combination with theML.PREDICT
functionto perform regression:
- Linear regression models:uselinear regressionby setting the
MODEL_TYPE
option toLINEAR_REG
. - Boosted tree models:use agradient boosted decision treeby setting the
MODEL_TYPE
option toBOOSTED_TREE_REGRESSOR
. - Random forest models:use arandom forestby setting the
MODEL_TYPE
option toRANDOM_FOREST_REGRESSOR
. - Deep neural network (DNN) models:use aneural networkby setting the
MODEL_TYPE
option toDNN_REGRESSOR
. - Wide & Deep models:usewide & deep learningby setting the
MODEL_TYPE
option toDNN_LINEAR_COMBINED_REGRESSOR
. - AutoML models:use anAutoML classification modelby setting the
MODEL_TYPE
option toAUTOML_REGRESSOR
.
Recommended knowledge
By using the default settings in theCREATE MODEL
statements and theML.PREDICT
function, you can create and use a regression model evenwithout much ML knowledge. However, having basic knowledge aboutML development helps you optimize both your data and your model todeliver better results. We recommend using the following resources to developfamiliarity with ML techniques and processes:
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.