8000 Implement fastpair by Mec-iS · Pull Request #142 · smartcorelib/smartcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implement fastpair #142

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
merged 18 commits into from
Aug 23, 2022
Merged

Implement fastpair #142

merged 18 commits into from
Aug 23, 2022

Conversation

Mec-iS
Copy link
Collaborator
@Mec-iS Mec-iS commented Aug 15, 2022

extract what is working from #17:

  • implement pairwise dissimiliarities
  • implement fastpair (all test-cases pass)
  • improve memory usage by avoid usage of connectivity matrix

These features can be used in the future to implement additive clustering or other novel features.

may be of interest for @danieljrmay

@Mec-iS Mec-iS requested a review from morenol August 15, 2022 17:37
@codecov-commenter
Copy link
codecov-commenter commented Aug 15, 2022

Codecov Report

Merging #142 (b650b4c) into development (d905ebe) will increase coverage by 0.32%.
The diff coverage is 94.85%.

@@               Coverage Diff               @@
##           development     #142      +/-   ##
===============================================
+ Coverage        83.39%   83.71%   +0.32%     
===============================================
  Files               78       80       +2     
  Lines             8377     8591     +214     
===============================================
+ Hits              6986     7192     +206     
- Misses            1391     1399       +8     
Impacted Files Coverage Δ
src/algorithm/neighbour/mod.rs 78.57% <ø> (ø)
src/algorithm/neighbour/distances.rs 66.66% <66.66%> (ø)
src/algorithm/neighbour/fastpair.rs 95.67% <95.67%> (ø)
src/svm/svc.rs 89.75% <0.00%> (+0.30%) ⬆️
src/error/mod.rs 56.00% <0.00%> (+8.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Mec-iS Mec-iS requested a review from VolodymyrOrlov August 16, 2022 12:50
@Mec-iS Mec-iS changed the title Implement fast pair Implement fastpair Aug 16, 2022
@Mec-iS
Copy link
Collaborator Author
Mec-iS commented Aug 16, 2022

Implemented benchmark:

FastPair/fastpair --- n_samples: 100, n_features: 10                                                                            
                        time:   [406.55 us 410.09 us 414.64 us]
Found 7 outliers among 100 measurements (7.00%)
  6 (6.00%) high mild
  1 (1.00%) high severe
FastPair/brute --- n_samples: 100, n_features: 10                                                                             
                        time:   [1.1809 ms 1.1957 ms 1.2120 ms]
Found 6 outliers among 100 measurements (6.00%)
  5 (5.00%) high mild
  1 (1.00%) high severe
----------------------------------------------------------------------------
FastPair/fastpair --- n_samples: 100, n_features: 100                                                                             
                        time:   [2.1368 ms 2.1482 ms 2.1606 ms]
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild
FastPair/brute --- n_samples: 100, n_features: 100                                                                             
                        time:   [4.2466 ms 4.2732 ms 4.3008 ms]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
----------------------------------------------------------------------------
FastPair/fastpair --- n_samples: 100, n_features: 1000                                                                            
                        time:   [21.002 ms 21.129 ms 21.272 ms]
Found 8 outliers among 100 measurements (8.00%)
  5 (5.00%) high mild
  3 (3.00%) high severe
FastPair/brute --- n_samples: 100, n_features: 1000                                                                            
                        time:   [43.918 ms 44.168 ms 44.431 ms]
Found 4 outliers among 100 measurements (4.00%)
  4 (4.00%) high mild
----------------------------------------------------------------------------
Benchmarking FastPair/fastpair --- n_samples: 1000, n_features: 10:
FastPair/fastpair --- n_samples: 1000, n_features: 10                                                                            
                        time:   [58.740 ms 59.057 ms 59.409 ms]
Found 7 outliers among 100 measurements (7.00%)
  5 (5.00%) high mild
  2 (2.00%) high severe
Benchmarking FastPair/brute --- n_samples: 1000, n_features: 10:
FastPair/brute --- n_samples: 1000, n_features: 10                                                                            
                        time:   [117.68 ms 118.20 ms 118.85 ms]
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe
----------------------------------------------------------------------------
Benchmarking FastPair/fastpair --- n_samples: 1000, n_features: 100:
FastPair/fastpair --- n_samples: 1000, n_features: 100                                                                            
                        time:   [221.43 ms 223.30 ms 225.28 ms]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking FastPair/brute --- n_samples: 1000, n_features: 100:
FastPair/brute --- n_samples: 1000, n_features: 100                                                                            
                        time:   [456.94 ms 460.50 ms 464.30 ms]
Found 7 outliers among 100 measurements (7.00%)
  5 (5.00%) high mild
  2 (2.00%) high severe
----------------------------------------------------------------------------
Benchmarking FastPair/fatpair --- n_samples: 1000, n_features:
FastPair/fastpair --- n_samples: 1000, n_features: 1000                                                                            
                        time:   [2.9984 s 3.0228 s 3.0484 s]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Benchmarking FastPair/brute --- n_samples: 1000, n_features: 1000:
FastPair/brute --- n_samples: 1000, n_features: 1000                                                                            
                        time:   [5.9347 s 5.9732 s 6.0130 s]

Copy link
Collaborator
@morenol morenol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I added a couple of comments

@Mec-iS Mec-iS force-pushed the implement-fast-pair branch from f2666be to 5073d7f Compare August 21, 2022 16:22
Copy link
Collaborator
@morenol morenol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Mec-iS Mec-iS merged commit a1c56a8 into development Aug 23, 2022
@Mec-iS Mec-iS deleted the implement-fast-pair branch August 23, 2022 15:56
morenol pushed a commit that referenced this pull request Nov 8, 2022
* initial fastpair implementation
* FastPair initial implementation
* implement fastpair
* Add random test
* Add bench for fastpair
* Refactor with constructor for FastPair
* Add serialization for PairwiseDistance
* Add fp_bench feature for fastpair bench
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0