.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_simple_example.py: ========================================================= Simple example ========================================================= .. code-block:: default print(__doc__) import numpy as np from sklearn_rvm import EMRVC # General a toy dataset:s it's just a straight line with some Gaussian noise: n_samples = 100 np.random.seed(0) X = np.random.normal(size=n_samples) y = (X > 0).astype(np.float) X[X > 0] *= 4 X += .3 * np.random.normal(size=n_samples) X = X[:, np.newaxis] # Fit the classifier clf = EMRVC(kernel="linear") clf.fit(X, y) print(clf.predict(X)) print(clf.predict_proba(X)) print(clf.score(X, y)) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.000 seconds) .. _sphx_glr_download_auto_examples_simple_example.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: simple_example.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: simple_example.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_