MCPcopy Create free account
hub / github.com/datastream/libsvm / be_shrunk

Method be_shrunk

svm.go:777–795  ·  view source on GitHub ↗
(i int, Gmax1, Gmax2 float64)

Source from the content-addressed store, hash-verified

775}
776
777func (this *Solver) be_shrunk(i int, Gmax1, Gmax2 float64) bool {
778 var rst bool
779 if this.is_upper_bound(i) {
780 if this.y[i] == +1 {
781 rst = -this.G[i] > Gmax1
782 } else {
783 rst = -this.G[i] > Gmax2
784 }
785 } else if this.is_lower_bound(i) {
786 if this.y[i] == +1 {
787 rst = this.G[i] > Gmax2
788 } else {
789 rst = this.G[i] > Gmax1
790 }
791 } else {
792 rst = false
793 }
794 return rst
795}
796
797func (this *Solver) do_shrinking() {
798 var i int

Callers 1

do_shrinkingMethod · 0.95

Calls 2

is_upper_boundMethod · 0.95
is_lower_boundMethod · 0.95

Tested by

no test coverage detected