Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with predict_binary_classifier(*) #5

Open
yiwang opened this issue Jan 11, 2023 · 2 comments
Open

Error with predict_binary_classifier(*) #5

yiwang opened this issue Jan 11, 2023 · 2 comments

Comments

@yiwang
Copy link

yiwang commented Jan 11, 2023

Followed the steps and failed on

SELECT *, predict_binary_classifier(*) AS PREDICTION 
  FROM (SELECT * EXCLUDE CUSTOMERID from CUSTOMER limit 100);

at https://modelstar.io/docs/tutorials/churn-prediction-inside-snowflake/#step-3-model-inference
with error message

Error: too many arguments for function [PREDICT_BINARY_CLASSIFIER("values".GENDER, "values".SENIORCITIZEN, "values".PARTNER, "values".DEPENDENTS, "values".TENURE, "values".PHONESERVICE, "values".MULTIPLELINES, "values".INTERNETSERVICE, "values".ONLINESECURITY, "values".ONLINEBACKUP, "values".DEVICEPROTECTION, "values".TECHSUPPORT, "values".STREAMINGTV, "values".STREAMINGMOVIES, "values".CONTRACT, "values".PAPERLESSBILLING, "values".PAYMENTMETHOD, "values".MONTHLYCHARGES, "values".TOTALCHARGES, "values".CHURN)] expected 19, got 20 (line 10)

Then remove the last CHURN parameter works like:

SELECT *, predict_binary_classifier("values".GENDER, "values".SENIORCITIZEN, "values".PARTNER, "values".DEPENDENTS, "values".TENURE, "values".PHONESERVICE, "values".MULTIPLELINES, "values".INTERNETSERVICE, "values".ONLINESECURITY, "values".ONLINEBACKUP, "values".DEVICEPROTECTION, "values".TECHSUPPORT, "values".STREAMINGTV, "values".STREAMINGMOVIES, "values".CONTRACT, "values".PAPERLESSBILLING, "values".PAYMENTMETHOD, "values".MONTHLYCHARGES, "values".TOTALCHARGES) AS PREDICTION 
  FROM (SELECT * EXCLUDE CUSTOMERID from CUSTOMER limit 100) as "values" ;
@helincao
Copy link
Contributor

Did you train the model using CALL TRAIN_BINARY_CLASSIFIER('CUSTOMER', 'CHURN', ['CUSTOMERID']);?

@yiwang
Copy link
Author

yiwang commented Jan 12, 2023

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants