Skip to content

Commit

Permalink
✨ Move test from pimms to njab
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry committed May 2, 2024
1 parent ef64675 commit 0d3b503
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/njab/sklearn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import pandas as pd
import sklearn
import sklearn.model_selection

from mrmr import mrmr_classif

from .types import Splits, ResultsSplit, Results, AucRocCurve, PrecisionRecallCurve
from . import scoring
from .pca import run_pca
from .preprocessing import StandardScaler
from . import scoring
from .types import (AucRocCurve, PrecisionRecallCurve, Results, ResultsSplit,
Splits)

__all__ = [
'run_model',
Expand Down
12 changes: 12 additions & 0 deletions test/test_sklearn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import numpy as np
import numpy.testing as npt
import pandas as pd
import sklearn.preprocessing as preprocessing

from njab.sklearn.preprocessing import StandardScaler


def test_StandardScaler():
X = pd.DataFrame(np.array([[2, None], [3, 2], [4, 6]]))
npt.assert_almost_equal(preprocessing.StandardScaler().fit(X).transform(X),
StandardScaler().fit(X).transform(X).to_numpy())

0 comments on commit 0d3b503

Please sign in to comment.