Skip to content

Commit 4240e74

Browse files
fix ldm windows
1 parent eea283c commit 4240e74

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src_docs/examples/tradaboost_experiments.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"metadata": {},
1515
"source": [
1616
"<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",
1818
"</div>"
1919
]
2020
},

tests/test_ldm.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
import os
23

34
from adapt.instance_based import LDM
45

@@ -16,15 +17,17 @@
1617

1718

1819
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()
2527

2628

2729
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()

0 commit comments

Comments
 (0)