source: orange/docs/reference/rst/code/svm-linear-weights.py @ 10304:a7e4c281c527

Revision 10304:a7e4c281c527, 394 bytes checked in by mstajdohar, 2 years ago (diff)

Trimmed some test results.

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,
[9372]7                            normalization=False)
8
9weights = svm.get_linear_svm_weights(classifier)
[10304]10print sorted("%.10f" % w for w in weights.values())
[9372]11
12import pylab as plt
13plt.hist(weights.values())
Note: See TracBrowser for help on using the repository browser.