question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

svm.SVR has no _n_support

See original GitHub issue

Description

svm.SVR has no _n_support but has n_support_ as its property. The other part of the member functions still use _n_support.

  File "/home/ubuntu/.pyenv/versions/3.7.5/lib/python3.7/site-packages/sklearn/svm/_base.py", line 317, in predict
    return predict(X)
  File "/home/ubuntu/.pyenv/versions/3.7.5/lib/python3.7/site-packages/sklearn/svm/_base.py", line 335, in _dense_predict
    X, self.support_, self.support_vectors_, self._n_support,
AttributeError: 'SVR' object has no attribute '_n_support'

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

System: python: 3.7.5 (default, Nov 20 2019, 04:09:21) [GCC 7.4.0] executable: /home/ubuntu/.pyenv/versions/3.7.5/bin/python machine: Linux-4.15.0-1056-aws-x86_64-with-debian-buster-sid

Python dependencies: pip: 19.3.1 setuptools: 41.6.0 sklearn: 0.22 numpy: 1.17.4 scipy: 1.3.3 Cython: None pandas: 0.25.3 matplotlib: 3.1.1 joblib: 0.14.0

Built with OpenMP: True

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
KowsalyaR97commented, Mar 25, 2020

Use this link https://ibex.readthedocs.io/en/latest/_modules/sklearn/svm/base.html and change the _base.py file in a directory C:\Users.…\site-packages\sklearn\svm_base.py .

1reaction
jnothmancommented, Dec 18, 2019

Agreed. See the model persistence documentation for potential solutions

Read more comments on GitHub >

github_iconTop Results From Across the Web

sklearn.svm.SVR — scikit-learn 1.2.0 documentation
Epsilon-Support Vector Regression. The free parameters in the model are C and epsilon. The implementation is based on libsvm. The fit time complexity...
Read more >
SVR without support vectors is not possible? - Cross Validated
But if SVR profile matches with the true profile, there are no support vectors (as all points lie strictly within the epsilon tube)....
Read more >
SVR estimator contains no support vectors after training
When I use Scikit learn's SVR to fit some own data, the trained estimator ends up containing no support vectors and thus predicting...
Read more >
Support Vector Regression Or SVR - Medium
This post is about SUPPORT VECTOR REGRESSION. Those who are in Machine Learning or Data Science are quite familiar with the term SVM...
Read more >
An Introduction to Support Vector Regression (SVR)
Support Vector Machines (SVMs) are well known in classification problems. The use of SVMs in regression is not as well documented, however.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found