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

finalise kernel constructors in graph #571

Merged
merged 11 commits into from
Sep 22, 2023
Merged

Conversation

martinfleis
Copy link
Member

@martinfleis martinfleis commented Sep 20, 2023

  • taper is back and working properly.
  • kernel constructors are tested
  • fixed issues with conincident points
  • exposes sklearn metrics outside knn

One question:

What shall be the behaviour of kernel when k is set but the bandwidth s too small so weight is zero, eliminating the link with taper? now the affected focal has less neighbors than K without a warning. I'd say we may warn but that is about it. You can retrieve the rest using taper=False.

edited

@martinfleis martinfleis self-assigned this Sep 20, 2023
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #571 (4a149c1) into main (c8456c8) will increase coverage by 0.4%.
The diff coverage is 99.2%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main    #571     +/-   ##
=======================================
+ Coverage   81.6%   82.0%   +0.4%     
=======================================
  Files        128     128             
  Lines      14937   15156    +219     
=======================================
+ Hits       12186   12430    +244     
+ Misses      2751    2726     -25     
Files Changed Coverage Δ
libpysal/graph/_triangulation.py 98.0% <ø> (ø)
libpysal/graph/_kernel.py 88.5% <95.2%> (+17.3%) ⬆️
libpysal/graph/_contiguity.py 98.9% <100.0%> (-0.1%) ⬇️
libpysal/graph/_utils.py 93.1% <100.0%> (+0.7%) ⬆️
libpysal/graph/base.py 95.6% <100.0%> (ø)
libpysal/graph/tests/test_kernel.py 100.0% <100.0%> (ø)

... and 1 file with indirect coverage changes

@martinfleis martinfleis changed the title bring back taper, add tests of graph stuff finalise kernel constructors in graph Sep 21, 2023
@martinfleis martinfleis marked this pull request as ready for review September 21, 2023 20:23
@jGaboardi
Copy link
Member

Any idea what's going on with the failures?

@martinfleis
Copy link
Member Author

Yes, will fix

@jGaboardi
Copy link
Member

Whoops, approved too soon.

@martinfleis
Copy link
Member Author

@jGaboardi should be fixed now. I was too lazy to create an env without sklearn and it shows...

@martinfleis
Copy link
Member Author

Gonna merge and continue with triangulation. Feel free to still review this, we can fix stuff in follow-ups.

@martinfleis martinfleis merged commit a0e7a03 into pysal:main Sep 22, 2023
9 checks passed
@martinfleis martinfleis deleted the tests branch September 22, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants