weightsa = Orange.classification.svm.get_linear_svm_weights(c)
weights = [wd[f] for f in c.domain]
elif isinstance(c, Orange.classification.svm.LinearClassifier):
- #intercept is the last weight (check by Ales)!
- weights = c.weights[:-1]
+ assert len(c.weights) == 1
+ # logreg.LibLinearLogRegLearner
+ if len(c.domain.features) != len(weights):
+ #intercept is the last weight (check by Ales)!
assert len(c.domain.features) == len(weights)
weights = array(c.coefficients)