Skip to content
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

bug fixes, implementation tweaks, and additional distances #397

Merged
merged 23 commits into from
Dec 27, 2023
Merged

Conversation

yugeji
Copy link
Contributor

@yugeji yugeji commented Oct 11, 2023

PR Checklist

  • Referenced issue is linked
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Technical details

Additional context

@github-actions github-actions bot added the bug Something isn't working label Oct 11, 2023
@github-actions github-actions bot added the chore label Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (0879d41) 62.92% compared to head (128eac2) 0.00%.

❗ Current head 128eac2 differs from pull request most recent head 4b5584f. Consider uploading reports for the commit 4b5584f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #397       +/-   ##
==========================================
- Coverage   62.92%   0.00%   -62.93%     
==========================================
  Files          41      40        -1     
  Lines        4637    4900      +263     
==========================================
- Hits         2918       0     -2918     
- Misses       1719    4900     +3181     
Files Coverage Δ
pertpy/tools/_distances/_distances.py 0.00% <0.00%> (-84.22%) ⬇️

... and 46 files with indirect coverage changes

@yugeji
Copy link
Contributor Author

yugeji commented Nov 13, 2023

The tests are failing with ValueError: Found array with 0 sample(s) (shape=(0, 50)) while a minimum of 1 is required by LogisticRegression. when running for the classifier-based distances and I have no idea why because if either X or Y were zero I think the other distances should fail too?

No worries about the NotImplementedError.

@yugeji yugeji closed this Nov 13, 2023
@yugeji yugeji reopened this Nov 13, 2023
@Zethson
Copy link
Member

Zethson commented Nov 14, 2023

Fixed the above error. Now running into ValueError: This solver needs samples of at least 2 classes in the data, but the data contains only one class: 'c'

sklearn throws an error if it only has to predict a single class because well - it's too easy! So we need to find a way to add another class.

        train = np.vstack([train, train])
        label = label + ["p"]

Before fitting would fix it

Signed-off-by: zethson <lukas.heumos@posteo.net>
@Zethson Zethson merged commit 5b27242 into main Dec 27, 2023
6 of 7 checks passed
@Zethson Zethson deleted the fix/distances branch February 17, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants