CORR_MATRIX() error
Hi,
I'm trying to use CORR_MATRIX (simplified example, I realize CORR would work for just 2 columns) as follows:
select CORR_MATRIX("hour_7", "drops") OVER () from (
select * from (select apply_one_hot_encoder(* using parameters model_name='test_encoder', drop_first='false') from test) as Q1
) as Q2;
but getting this error:ERROR 3457: Function CORR_MATRIX(int, int) does not exist, or permission is denied for CORR_MATRIX(int, int)
I'm running vsql version 09.02.0007, built for Linux64
From JB Favre's vertica docker container
https://hub.docker.com/r/jbfavre/vertica/
The docs say CORR_MATRIX is a 9.2.x feature, but I can't find details more granular than that.
Any ideas?
Thanks,
Michael
Best Answers

The complete use case is for many columns (hour_0, hour_1,...,hour23). That was just a simplified example.
I just noticed there were 2 replies...so it's a 9.2.1 feature. Understood, and thanks!0
Leave a Comment
Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.
Answers
But as you indicated, just use CORR(), since you're just analyzing two columns.
I have this error too:
Vertica 9.3
variant1. SELECT corr_matrix(prescr_amount,total_pat_flow,target_pat_flow) OVER() FROM Baikal_Progressa_table;
ERROR: Function corr_matrix(float, float, float) does not exist, or permission is denied for corr_matrix(float, float, float)
variant2.
SELECT corr_matrix("prescr_amount","total_pat_flow","target_pat_flow") OVER() FROM Baikal_Progressa_table;
ERROR: Function corr_matrix(float, float, float) does not exist, or permission is denied for corr_matrix(float, float, float)
variant3.
SELECT corr_matrix('prescr_amount', 'total_pat_flow', 'target_pat_flow') OVER() FROM Baikal_Progressa_table;
ERROR: Function corr_matrix(unknown, unknown, unknown) does not exist, or permission is denied for corr_matrix(unknown, unknown, unknown)
Where my mistake??
Your first option should run.
SELECT CORR_MATRIX(Sepal_Length, Sepal_Width, Petal_Length, Petal_Width) OVER() FROM iris;
Perhaps it's a problem with the function. You might need to reinstall the packages associated with that function (probably the machine learning package). https://www.vertica.com/docs/9.3.x/HTML/Content/Authoring/InstallationGuide/Upgrade/PostUpgrade/UpgradingandReinstallingPackages.htm?zoom_highlight=uninstall package
Thanks!
What is the name of the machine learning package? Where can I see it?
All of the Vertica packages are located under /opt/vertica/packages.
You can reinstall the MachineLearning package like this:
Thanks. I'll tryT
It works!!