source: orange/docs/reference/rst/code/svm-linear-weights.py @ 11613:1242f06bbdb4

Revision 11613:1242f06bbdb4, 431 bytes checked in by Ales Erjavec <ales.erjavec@…>, 10 months ago (diff)

Fixed changed regression tests output.

RevLine 
[10012]1from Orange import data
[9372]2from Orange.classification import svm
3
[9823]4brown = data.Table("brown-selected")
[10012]5classifier = svm.SVMLearner(brown,
6                            kernel_type=svm.kernels.Linear,
[11613]7                            normalization=False,
8                            eps=1e-9)
[9372]9
10weights = svm.get_linear_svm_weights(classifier)
[11613]11print sorted("%.4f" % w for w in weights.values())
[9372]12
13import pylab as plt
14plt.hist(weights.values())
Note: See TracBrowser for help on using the repository browser.