Is there a way to force the distance-transforms that these algorithms learn to not map to the complex plane? It's also inconsistent. On some folds, of the tune_knn, I have no problem, but sometimes the algorithm sends the data to C^N
running CV on <class 'dml.anmm.ANMM'>
*** Tuning Case {'num_dims': 2, 'n_friends': 1, 'n_enemies': 1} ...
** FOLD 1
** FOLD 2
** FOLD 3
Traceback (most recent call last):
File "Perovskite_DistanceLearning.py", line 217, in <module> mcml_results, mcml_best, mcml_best, mcml_detailed = tune_knn(ANMM,
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/tune.py", line 208, in tune_knn
results = cross_validate(alg, X, y, n_folds=n_folds, n_reps=n_reps, verbose=verbose, seed=seed) File "/home/jupyter/tacc-work/sd2nb/tune.py", line 82, in cross_validate
alg.fit(X_train.real, y_train.real)
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/pipeline.py", line 335,in fit
self._final_estimator.fit(Xt, y, **fit_params_last_step)
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/neighbors/_base.py", line 1131, in fit
X, y = self._validate_data(X, y, accept_sparse="csr",
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/base.py", line 432, in _validate_data
X, y = check_X_y(X, y, **check_params)
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/utils/validation.py", line 73, in inner_f
return f(**kwargs)
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/utils/validation.py", line 796, in check_X_y
X = check_array(X, accept_sparse=accept_sparse,
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/utils/validation.py", line 73, in inner_f
return f(**kwargs)
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/utils/validation.py", line 608, in check_array
_ensure_no_complex_data(array)
File "/home/jupyter/tacc-work/jupyter_packages/envs/distance/lib/python3.8/site-packages/sklearn/utils/validation.py", line 394, in _ensure_no_complex_data
raise ValueError("Complex data not supported\n"
ValueError: Complex data not supported
[[1.25992078e+04+0.j 4.53682237e+01+0.j]
[1.25992083e+04+0.j 4.15542700e+01+0.j]
[1.25992194e+04+0.j 1.35543520e+02+0.j]
...
Is there a way to force the distance-transforms that these algorithms learn to not map to the complex plane? It's also inconsistent. On some folds, of the tune_knn, I have no problem, but sometimes the algorithm sends the data to C^N
For several algorithms, I've received the following error message: