7178ab901cbe8283288c69836af2e9aa69fd24d4,umap/tests/test_parametric_umap.py,,test_inverse_transform,#,16
Before Change
def norm(x):
return (x - np.min(x)) / (np.max(x) - np.min(x))
X, y = make_moons(100)
X = norm(X)
embedder = ParametricUMAP(parametric_reconstruction=True)
embedding = embedder.fit_transform(X)
Z = embedder.transform(X)
After Change
X_r = embedder.inverse_transform(Z)
// completes successfully
assert X_r is not None
assert X_r.shape == X.shape
@tf_only
def test_nonparametric(moon_dataset):
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 3
Instances
Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_inverse_transform
Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_create_model
Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_validation
Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_nonparametric
Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_save_load
Project Name: lmcinnes/umap
Commit Name: 7178ab901cbe8283288c69836af2e9aa69fd24d4
Time: 2021-02-09
Author: valerio.maggio@gmail.com
File Name: umap/tests/test_parametric_umap.py
Class Name:
Method Name: test_custom_encoder_decoder