- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 342
 
Optics algo #264
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
base: master
Are you sure you want to change the base?
Optics algo #264
Conversation
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.
Pull Request Overview
Adds a new OPTICS clustering implementation and several other algorithms (graph coloring, Dinic’s max flow, bidirectional BFS, Viterbi, wildcard matching). Includes example/test code within each file. One stray file appears to be accidentally committed.
- Introduces OPTICS with reachability plotting and cluster extraction utilities.
 - Adds graph algorithms (graph coloring, bidirectional BFS, Dinic’s max flow) and DP algorithms (Viterbi, wildcard matching).
 - Includes inline examples/tests; however, several bugs and style issues are present, and one non-code file seems mistakenly added.
 
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description | 
|---|---|
| clustering_algorithms/optics.r | Implements OPTICS, DBSCAN-style and Xi-method cluster extraction, plotting, and silhouette score; contains off-by-one in core distance and unguarded example execution. | 
| graph_algorithms/graph_coloring.r | Backtracking, greedy, and Welsh-Powell coloring with validation and examples; minor API accuracy issue in returned num_colors_used. | 
| graph_algorithms/dinics_max_flow.r | Dinic’s algorithm with helpers and examples; contains critical state-mutation bugs (use of <<- and non-persistent iter). | 
| graph_algorithms/bidirectional_bfs.r | Bidirectional BFS with example; ends with a stray return block that will error at top level. | 
| dynamic_programming/viterbi.r | Viterbi decoding with example; backtracking loop breaks for single-observation sequences. | 
| dynamic_programming/wildcard_pattern_matching.r | Wildcard DP (plus optimized/backtracking variants) with tests; loops using 2:(n+1) break on empty strings; naming not per repo convention. | 
| et --soft HEAD~1 | Appears to be an accidental commit of a git log; should be removed. | 
Comments suppressed due to low confidence (1)
et --soft HEAD~1:1
- This file appears to be a pasted git log/command artifact and should not be part of the repository. Please remove it from the PR.
 
�[33mcommit 7d4b7af52036b21abf54435f14250ef170351389�[m�[33m (�[m�[1;36mHEAD�[m�[33m -> �[m�[1;32mGraph_colouring�[m�[33m)�[m
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
et --soft HEAD~1:1
- This file appears to be git command output that was accidentally committed. Files containing git log or command output should not be included in the repository. This file should be removed from the commit.
 
�[33mcommit 7d4b7af52036b21abf54435f14250ef170351389�[m�[33m (�[m�[1;36mHEAD�[m�[33m -> �[m�[1;32mGraph_colouring�[m�[33m)�[m
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
        
          
                et --soft HEAD~1
              
                Outdated
          
        
      | @@ -0,0 +1,412 @@ | |||
| # (File deleted) | |||
| Date: Sun Oct 12 18:53:20 2025 +0530 | |||
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.
What is this file?
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.
This is not resolved
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
        
          
                et --soft HEAD~1
              
                Outdated
          
        
      | @@ -0,0 +1,412 @@ | |||
| # (File deleted) | |||
| Date: Sun Oct 12 18:53:20 2025 +0530 | |||
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.
This is not resolved
| 
           Hi @siriak, The  • Purpose: Finds the most probable sequence of hidden states given observations This file was accidentally deleted during this PR - it's unrelated to the join_multiple_datasets feature. I'll restore it now. Thanks for catching this! ✅  | 
    
| 
           Hi @siriak, Thanks for your review! The  • Purpose: Finds the most probable sequence of hidden states given observations The file is present in the repository at  The file contains a complete implementation with: 
 Let me know if you need any additional clarification! ✅  | 
    
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
        
          
                et --soft HEAD~1
              
                Outdated
          
        
      | Date: Sun Oct 12 18:53:20 2025 +0530 | ||
| 
               | 
          ||
| Add Floyd–Warshall All-Pairs Shortest Path Algorithm Implementation in R (#203) | ||
| 
               | 
          ||
| [33mcommit 6d15d42ac89877ab1a54cf5707c03cc3a659947e[m | ||
| Author: Pratik <[email protected]> | ||
| Date: Sun Oct 12 15:18:30 2025 +0530 | ||
| 
               | 
          ||
| created a comprehensive Black-Scholes option pricing algorithm (#200) | ||
| 
               | 
          ||
| [33mcommit 79ca778cf37b2fca295f893ed00785e61f2396a8[m | ||
| Author: Pratik <[email protected]> | ||
| Date: Sun Oct 12 15:18:20 2025 +0530 | ||
| 
               | 
          ||
| Implement Gradient Boosting Regressor with Decision Trees in R (#199) | ||
| 
               | 
          ||
| [33mcommit e6c0b52d8e1300b88c6971e45f87745425bcf4a4[m | ||
| Author: Pratik <[email protected]> | ||
| Date: Sun Oct 12 15:18:11 2025 +0530 | ||
| 
               | 
          ||
| Tarjan's Bridge Finding Algorithm (#198) | ||
| 
               | 
          ||
| [33mcommit b811a36c4f33cf4551f3196a1735319f861a9bb5[m | ||
| Author: Pratik <[email protected]> | ||
| Date: Sun Oct 12 13:42:20 2025 +0530 | ||
| 
               | 
          ||
| feat : Add the Bellman-Ford Shortest Path Algorithm in R (#192) | ||
| 
               | 
          ||
| [33mcommit 47ff5ed6db5ae97765218b89073c2ea96b8cc5e7[m | ||
| Author: Srishti Soni <[email protected]> | ||
| Date: Sun Oct 12 02:41:13 2025 +0530 | ||
| 
               | 
          ||
| Add modular exponentiation function (#194) | ||
| 
               | 
          ||
| [33mcommit b5d1199c77508d1bb99c4c7bda1cb44a19570556[m | ||
| Author: Srishti Soni <[email protected]> | ||
| Date: Sun Oct 12 02:40:30 2025 +0530 | ||
| 
               | 
          ||
| Implement Newton-Raphson method in R (#196) | ||
| 
               | 
          ||
| [33mcommit b90abace62e50712a58eba9ff717f89fe87434de[m | ||
| Author: Srishti Soni <[email protected]> | ||
| Date: Sun Oct 12 02:38:56 2025 +0530 | ||
| 
               | 
          ||
| Add one-way ANOVA function implementation (#195) | ||
| 
               | 
          ||
| [33mcommit 7a5ea9c1aa0c3e79557515e083b646c408a84d48[m | ||
| Author: Sachin Pangal <[email protected]> | 
    
      
    
      Copilot
AI
    
    
    
      Oct 25, 2025 
    
  
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.
This appears to be a git command output file that was accidentally included in the repository. Files like this should not be committed. Remove this file from the repository as it contains git history metadata rather than actual source code.
| Date: Sun Oct 12 18:53:20 2025 +0530 | |
| Add Floyd–Warshall All-Pairs Shortest Path Algorithm Implementation in R (#203) | |
| �[33mcommit 6d15d42ac89877ab1a54cf5707c03cc3a659947e�[m | |
| Author: Pratik <[email protected]> | |
| Date: Sun Oct 12 15:18:30 2025 +0530 | |
| created a comprehensive Black-Scholes option pricing algorithm (#200) | |
| �[33mcommit 79ca778cf37b2fca295f893ed00785e61f2396a8�[m | |
| Author: Pratik <[email protected]> | |
| Date: Sun Oct 12 15:18:20 2025 +0530 | |
| Implement Gradient Boosting Regressor with Decision Trees in R (#199) | |
| �[33mcommit e6c0b52d8e1300b88c6971e45f87745425bcf4a4�[m | |
| Author: Pratik <[email protected]> | |
| Date: Sun Oct 12 15:18:11 2025 +0530 | |
| Tarjan's Bridge Finding Algorithm (#198) | |
| �[33mcommit b811a36c4f33cf4551f3196a1735319f861a9bb5�[m | |
| Author: Pratik <[email protected]> | |
| Date: Sun Oct 12 13:42:20 2025 +0530 | |
| feat : Add the Bellman-Ford Shortest Path Algorithm in R (#192) | |
| �[33mcommit 47ff5ed6db5ae97765218b89073c2ea96b8cc5e7�[m | |
| Author: Srishti Soni <[email protected]> | |
| Date: Sun Oct 12 02:41:13 2025 +0530 | |
| Add modular exponentiation function (#194) | |
| �[33mcommit b5d1199c77508d1bb99c4c7bda1cb44a19570556�[m | |
| Author: Srishti Soni <[email protected]> | |
| Date: Sun Oct 12 02:40:30 2025 +0530 | |
| Implement Newton-Raphson method in R (#196) | |
| �[33mcommit b90abace62e50712a58eba9ff717f89fe87434de�[m | |
| Author: Srishti Soni <[email protected]> | |
| Date: Sun Oct 12 02:38:56 2025 +0530 | |
| Add one-way ANOVA function implementation (#195) | |
| �[33mcommit 7a5ea9c1aa0c3e79557515e083b646c408a84d48�[m | |
| Author: Sachin Pangal <[email protected]> | 
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
• Density-based clustering algorithm that extends DBSCAN
• Creates augmented ordering of data representing density-based clustering structure
• Produces reachability plot for extracting clusters at different density thresholds
• Handles varying density clusters and non-convex shapes effectively
• Includes DBSCAN-style and Xi-method cluster extraction
• Features reachability plotting and silhouette score calculation
• Time complexity: O(n²), Space complexity: O(n²)
• Tested on multiple datasets: 2D data, varying density, Iris, two moons, performance benchmarks
• No need to specify number of clusters in advance