2

There is nothing "wrong" with it. First of all, R's and Python's implementations of the algorithm may differ, hence they may give different results. Second, $k$-means is a randomized algorithm. It is not fully deterministic because it starts with randomly initialized clusters, so if you run it several times you could get different results for each ...


2

CCA has inconsistent nomenclature; there are a few things that I saw being called loadings: variable weights or parameters that multiply your data and create the canonical variates. Analogous to beta^hat in linear regression, or just weights machine learning algorithms. This is probably what sci-kit learn's cca.x_loadings_ is. You can check if X * ...


Only top voted, non community-wiki answers of a minimum length are eligible