pyod icon indicating copy to clipboard operation
pyod copied to clipboard

Locally Selective Combination (LSCP) ValueError: x and y must have length at least 2

Open shenjian5 opened this issue 4 years ago • 8 comments

while use compare_all_models.py file,it comes with the following bug:

raise ValueError('x and y must have length at least 2.') ValueError: x and y must have length at least 2.

shenjian5 avatar Apr 12 '20 10:04 shenjian5

Thanks for the note. I will say just rerun it. I tried to reproduce on my end and it went through. if possible, could you share me the code and the screenshot of the message to reproduce? thanks

yzhao062 avatar Apr 13 '20 00:04 yzhao062

I just download the last code,and run compare_all_models.py file . Then I meet the error below:

error of compare_all_models.py file

shenjian5 avatar Apr 19 '20 02:04 shenjian5

I meet the same problem. image I think this error is only in some data.

laetella avatar May 16 '20 09:05 laetella

Problem acknowledged. Looks like there are some update on the dependent libraries.

yzhao062 avatar May 18 '20 20:05 yzhao062

as shown https://github.com/yzhao062/pyod/pull/192, just change line 74 to random_state = 42 There are some underlying changes in numpy and sklearn, which cause the issue. A PR will be merged soon.

yzhao062 avatar May 18 '20 23:05 yzhao062

When I run LSCP on my own data with random_state = 42, the issue persists.

jaketimothy avatar May 23 '20 17:05 jaketimothy

Yes, I also met this issue. For this error, I fund that the length of local_pseudo_ground_truth and local_train_socres[:,d] were both 1 when calculating pearsonr in LSCP.py.

WLiK avatar Jun 30 '20 09:06 WLiK

Has this issue being solved? I am still facing this issue.

SaqlainHussainShah avatar Jul 05 '21 11:07 SaqlainHussainShah