MCPcopy Create free account
hub / github.com/scikit-learn/scikit-learn / test_invserse_box_cox

Function test_invserse_box_cox

sklearn/preprocessing/tests/test_data.py:2514–2519  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2512
2513
2514def test_invserse_box_cox():
2515 # output nan if the input is invalid
2516 pt = PowerTransformer(method="box-cox", standardize=False).fit([[1.0], [2.0]])
2517 pt.lambdas_ = [0.5]
2518 X_inv = pt.inverse_transform([[-2.1]])
2519 assert np.isnan(X_inv)
2520
2521
2522def test_yeo_johnson_darwin_example():

Callers

nothing calls this directly

Calls 3

PowerTransformerClass · 0.90
fitMethod · 0.45
inverse_transformMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…