Results of KPCA are different for different number of CPUs the code runs on

62 Views Asked by At

I am using KPCA function of kernlab package for dimensionality reduction, I am using rpy2 to call the API from python. The problem is I am getting different output for same data when running the my python script on different number of CPU cores each time. I am using linux command "taskset" or "numactl" to run my script from terminal. For example, for 2 runs:

taskset -c 1-3 python run.py
taskset -c 1-5 python run.py

The output of above two runs would be completely different. While each of them are reproducible in itself, like it I run with 3 cores as in the 1st command, 10 times..the output will be same for all 10 times.. similarly for the 2nd command with 5 cores. But why are their outputs are different from each other? This becomes an issue since its impacting my classification performance.

Edit: Indeed I also noticed this exact same behaviour when using scikit learn kpca. Is there anything common and fundamental here regarding KPCA that I am missing ?

Please help.

0

There are 0 best solutions below