Hi,
I am trying to execute the Machine Learning Example of Vertica. I have created the schema and copied the data.
Now when i am creating the Logistic Model using the below query
SELECT logistic_Reg('logistic_reg_mtcars', 'mtcars_train', 'am', 'cyl, wt' USING PARAMETERS exclude_columns='hp');
I get error. The Error message is:
ERROR 3457: Function logisticReg(unknown, unknown, unknown, unknown) does not exist, or permission is denied for logisticReg(unknown, unknown, unknown, unknown)
HINT: No function matches the given name and argument types. You may need to add explicit type casts
If anyone can help please.
Thanks,
Neha
Vertica Logistic Reg Function
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Vertica Logistic Reg Function
Hi,
The privileges on the ML functions must not be granted to PUBLIC.
Have the admin user run the following script in vsql to reinstall the ML Package:
vsql -f /opt/vertica/packages/MachineLearning/ddl/install.sql
After re-installing you should see the EXECUTE privilege granted to PUBLIC:
dbadmin=> SELECT * FROM grants WHERE object_name = 'predict_linear_reg';
grant_id | grantor_id | grantor | privileges_description | object_schema | object_name | object_id | object_type | grantee_id | grantee
-------------------+-------------------+---------+------------------------+---------------+--------------------+-------------------+-------------+-------------------+---------
45035996273716036 | 45035996273704962 | dbadmin | EXECUTE* | public | predict_linear_reg | 45035996273716034 | PROCEDURE | 45035996273704962 | dbadmin
45035996273716038 | 45035996273704962 | dbadmin | EXECUTE | public | predict_linear_reg | 45035996273716034 | PROCEDURE | 45035996273704964 | public
(2 rows)
The privileges on the ML functions must not be granted to PUBLIC.
Have the admin user run the following script in vsql to reinstall the ML Package:
vsql -f /opt/vertica/packages/MachineLearning/ddl/install.sql
After re-installing you should see the EXECUTE privilege granted to PUBLIC:
dbadmin=> SELECT * FROM grants WHERE object_name = 'predict_linear_reg';
grant_id | grantor_id | grantor | privileges_description | object_schema | object_name | object_id | object_type | grantee_id | grantee
-------------------+-------------------+---------+------------------------+---------------+--------------------+-------------------+-------------+-------------------+---------
45035996273716036 | 45035996273704962 | dbadmin | EXECUTE* | public | predict_linear_reg | 45035996273716034 | PROCEDURE | 45035996273704962 | dbadmin
45035996273716038 | 45035996273704962 | dbadmin | EXECUTE | public | predict_linear_reg | 45035996273716034 | PROCEDURE | 45035996273704964 | public
(2 rows)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.