(self)
| 93 | |
| 94 | |
| 95 | def test_dict_feature(self): |
| 96 | t = vw.VWClassifier(target="target") |
| 97 | try: |
| 98 | df = pd.DataFrame.from_dict([{"target":"1","df":{"1":0.234,"2":0.1}},{"target":"2","df":{"1":0.5}}]) |
| 99 | t.fit(df) |
| 100 | scores = t.predict_proba(df) |
| 101 | print scores |
| 102 | self.assertEquals(scores.shape[0],2) |
| 103 | self.assertEquals(scores.shape[1],2) |
| 104 | finally: |
| 105 | t.close() |
| 106 | |
| 107 | def test_list_feature(self): |
| 108 | t = vw.VWClassifier(target="target",num_iterations=10) |
nothing calls this directly
no test coverage detected