Monday, 30 September 2013

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

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

Does anyone know where this error is coming from? I am struggling to get
any information on this. Am I missing some sort of module?
What I'm doing: I am trying to forecast data using a tested (pickled) SVM
regression model that was built on another machine. The scaling works
fine, but even trying to forecast based on the original learning sample
fails with the same error.
The error occurs on a WIN 7 64bit workstation with Python 2.7.5, Numpy
1.7.1 (MKL) and sklearn (scikit-learn 0.14.1). Both are 64bit.
EDIT:
Below is the code. And it worked on the machine that did the learning bit.
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 )

No comments:

Post a Comment