File tree 2 files changed +13
-10
lines changed
2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 14
14
"metadata" : {},
15
15
"source" : [
16
16
" <div class=\" btn btn-notebook\" role=\" button\" >\n " ,
17
- " <img src=\" ../_static/images/github_logo_32px.png\" > [View on GitHub](https://github.com/adapt-python/notebooks /blob/d0364973c642ea4880756cef4e9f2ee8bb5e8495/Two_moons .ipynb)\n " ,
17
+ " <img src=\" ../_static/images/github_logo_32px.png\" > [View on GitHub](https://github.com/adapt-python/adapt /blob/master/src_docs/examples/tradaboost_experiments .ipynb)\n " ,
18
18
" </div>"
19
19
]
20
20
},
Original file line number Diff line number Diff line change 1
1
import numpy as np
2
+ import os
2
3
3
4
from adapt .instance_based import LDM
4
5
16
17
17
18
18
19
def test_ldm ():
19
- ldm = LDM ()
20
- weights = ldm .fit_weights (Xs , Xt )
21
- ldm .fit (Xs , ys , Xt )
22
- yp = ldm .predict (Xt )
23
- assert ldm .score (Xt , yt ) > 0.9
24
- assert weights [:25 ].mean () > 10 * weights [25 :].mean ()
20
+ if os .name != 'nt' :
21
+ ldm = LDM ()
22
+ weights = ldm .fit_weights (Xs , Xt )
23
+ ldm .fit (Xs , ys , Xt )
24
+ yp = ldm .predict (Xt )
25
+ assert ldm .score (Xt , yt ) > 0.9
26
+ assert weights [:25 ].mean () > 10 * weights [25 :].mean ()
25
27
26
28
27
29
def test_ldm_diff_size ():
28
- ldm = LDM ()
29
- weights = ldm .fit_weights (Xs , Xt [:40 ])
30
- assert weights [:25 ].mean () > 10 * weights [25 :].mean ()
30
+ if os .name != 'nt' :
31
+ ldm = LDM ()
32
+ weights = ldm .fit_weights (Xs , Xt [:40 ])
33
+ assert weights [:25 ].mean () > 10 * weights [25 :].mean ()
You can’t perform that action at this time.
0 commit comments