- Notifications
You must be signed in to change notification settings - Fork 537
Pytest with 89% coverage #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 1 commit
Commits
Show all changes
36 commits Select commit Hold shift + click to select a range
b2f91f2 full coveragre utils
rflamary c6e648f test parmap python 3.5
rflamary a31d3c2 map to list
rflamary f8e822c test sinkhorn with empty marginals
rflamary 7d9c5e7 add test optim
rflamary 709d8cb add dr tests
rflamary 83ecc6d bregman coverage
rflamary 64cf2fc tets barycenter
rflamary 33f3d30 clean pep8
rflamary bd705ed add test yunmlix and bary
rflamary f204e98 add test da 58% coverage
rflamary 5aad08a add test plot
rflamary a8d7301 add test plot and dataset
rflamary e11b1d1 test plot with no X
rflamary 11f0652 matplotlib travis
rflamary 46f297f import nmpy before ot
rflamary 68d7490 numpy assert + n_bins
rflamary 67b011a numpy assert test_da
rflamary 347e628 n to n_samples
rflamary 4a45135 dr +gpu numpy assert
rflamary 2bc41ad rng gpu
rflamary 6a02db0 test_optim
rflamary 86418eb test_optim allclose
rflamary 286de0a clean test_ot
rflamary 0e06129 Merge branch 'pytest' of github.com:rflamary/POT into pytest
rflamary 81118f2 test_ot random state
rflamary 109fc2a flake8
rflamary e0fa14b flake8
rflamary d101e08 nearly all review done
rflamary 77037cc gitignore
rflamary fac003d author and license for tets files
rflamary 0097017 add license and authors on all modules
rflamary 251af8e add author to all examples
rflamary 84aa318 pep8
rflamary 96f8b96 valid flake8
rflamary 838550e last stuff
rflamary File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add test plot and dataset
- Loading branch information
commit a8d7301c132a225b5e4d78cae64683a5e08eae7f
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -12,22 +12,17 @@ | |
| @pytest.mark.skipif(nogo, reason="Missing modules (autograd or pymanopt)") | ||
| def test_fda(): | ||
| | ||
| n = 100 # nb samples in source and target datasets | ||
| nz = 0.2 | ||
| n = 90 # nb samples in source and target datasets | ||
| np.random.seed(0) | ||
| Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use RandomState | ||
| | ||
| # generate circle dataset | ||
| t = np.random.rand(n) * 2 * np.pi | ||
| ys = np.floor((np.arange(n) * 1.0 / n * 3)) + 1 | ||
| xs = np.concatenate( | ||
| (np.cos(t).reshape((-1, 1)), np.sin(t).reshape((-1, 1))), 1) | ||
| xs = xs * ys.reshape(-1, 1) + nz * np.random.randn(n, 2) | ||
| xs, ys = ot.datasets.get_data_classif('gaussrot', n) | ||
| | ||
| nbnoise = 8 | ||
| ||
| | ||
| xs = np.hstack((xs, np.random.randn(n, nbnoise))) | ||
| | ||
| p = 2 | ||
| p = 1 | ||
| | ||
| Pfda, projfda = ot.dr.fda(xs, ys, p) | ||
| | ||
| | ||
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now it says autograd and pymanopt :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corrected the comment top of the test file.