Sklearn error: object "SVR" has no attribute "_impl"

What I am doing: I am trying to predict data using a tested (pickled) SVM regression model that was built on a different machine. The scaling works fine, but even trying to predict based on the original training sample does not have the same error.

"SVR" object has no "_impl" attribute

The error occurs on a WIN 7 64 bit workstation with Python 2.7.5, Numpy 1.7.1 (MKL) and sklearn (scikit-learn 0.14.1). Both are 64 bit.

EDIT:

Below is the code. And he was working on a machine that was doing a bit of learning.

from sklearn.svm import SVR
from sklearn import preprocessing
import cPickle as cp
import numpy as np
model = cp.load(open('model.pkl', 'rb'))
scaler = cp.load(open('scaler.pkl', 'rb'))
theData = np.genfromtxt(open('inputData.csv','rb'), delimiter=',')
scaledXs = scaler.transform( theData )
result = model.predict( scaledXs )

      

EDIT 2: FYI: The tutorial part was done on piCloud which uses version 0.13.1. Could this be the problem?

+1


source to share


1 answer


I finally figured it out. It looks like the model generated on piCloud using sklearn 0.13.1 is not compatible with the 0.14.1 library !



Since the AMD64 0.13.1 binary is nowhere to be found, I ended up retraining the model using the 0.14.1 library on a new machine and it works fine now. I also tried running the old model on a machine with the 0.13.1 library and it worked fine.

+3


source







All Articles