sql-machine-learning / sqlflow

Brings SQL and AI together.
https://sqlflow.org
Apache License 2.0
5.11k stars 703 forks source link

Keras model prediction supports saving the column data which is not inside the features #3090

Closed sneaxiy closed 4 years ago

sneaxiy commented 4 years ago

The following SQL programs would raise an error when predicting. It is because we do not support saving the column data which is not inside the features (i.e., petal_width in the following example).

SELECT sepal_length, sepal_width, petal_length
FROM iris.train
TO TRAIN sqlflow_models.OneClassSVM
WITH model.kernel = "rbf"
INTO iris.my_model;

SELECT sepal_length, sepal_width, petal_length, petal_width
FROM iris.train
TO PREDICT iris.predict_result.label
USING iris.my_model;