MCPcopy Create free account
hub / github.com/WenDesi/lihang_book_algorithm / predict

Method predict

AdaBoost/adaboost_cpp.py:27–37  ·  view source on GitHub ↗
(self,feature)

Source from the content-addressed store, hash-verified

25
26
27 def predict(self,feature):
28 if self.is_less>0:
29 if feature<self.index:
30 return 1.0
31 else:
32 return -1.0
33 else:
34 if feature<self.index:
35 return -1.0
36 else:
37 return 1.0
38
39
40class AdaBoost(object):

Callers 3

_w_Method · 0.45
_predict_Method · 0.45
adaboost_cpp.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected