(self,feature)
| 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 | |
| 40 | class AdaBoost(object): |
no outgoing calls
no test coverage detected