Issue
I have been attempting to run a simple code with the interpvall
function but ran into the following error:
AttributeError: Can't get attribute 'EuclideanDistance' on <module 'sklearn.metrics._dist_metrics' from '/Users/adamhitchmough/opt/anaconda3/lib/python3.8/site-packages/sklearn/metrics/_dist_metrics.cpython-38-darwin.so'>
My code is the following:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sys
import os
import sklearn
interpvall = pd.read_pickle('/Users/adamhitchmough/Downloads/KNN_swi_Vall_k50000.pkl')
I have upgraded my sklearn
package as instructed to do so by other forums but this did not resolve the error.
Any help would be greatly appreciated.
Solution
Please use this version:
pip install scikit-learn==1.2.2
sklearn.metrics._dist_metrics
module has EuclideanDistance()
and EuclideanDistance32()
.
I think, version 1.3.2
has EuclideanDistance32()
and EuclideanDistance64()
, instead.
Answered By - Goku - stands with Palestine
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.