Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 11, 2025

Summary

This PR addresses issue #[issue_number] by reorganizing misplaced algorithm files into their appropriate directories, improving the repository structure and making algorithms easier to find.

Changes Made

Files Moved to Correct Locations

String Manipulation Algorithms (previously misplaced in root and mathematics):

  • levenshtein.r: Moved from root directory to string_manipulation/
    • Levenshtein distance is a string distance metric that calculates the minimum number of single-character edits needed to change one string into another
  • hamming_distance.r: Moved from mathematics/ to string_manipulation/
    • Hamming distance measures the number of positions at which corresponding symbols differ between two strings of equal length

Classification Algorithms (previously in regression_algorithms):

  • logistic_regression.r: Moved from regression_algorithms/ to classification_algorithms/
  • logistic_regression_2.r: Moved from regression_algorithms/ to classification_algorithms/
    • Despite the name containing "regression", logistic regression is a binary/multiclass classification algorithm, not a regression algorithm

Duplicate Files Removed

The following files existed in multiple directories with identical content and have been consolidated:

  • knn.r: Removed from regression_algorithms/ (kept in classification_algorithms/)
    • K-Nearest Neighbors is primarily a classification algorithm
  • gradient_boosting_algorithms.r: Removed from regression_algorithms/ (kept in classification_algorithms/)
    • The implementation contained classification examples (binary classification with GBM, XGBoost, LightGBM, and CatBoost)
  • light_gbm.r: Removed from regression_algorithms/ (kept in classification_algorithms/)
    • The implementation was specifically for binary classification tasks
  • lasso.r: Removed from classification_algorithms/ (kept in data_preprocessing/)
    • Lasso is a regularization technique used for feature selection and preprocessing, not a classification algorithm itself

Documentation Updated

  • DIRECTORY.md has been updated to reflect all file movements and removals
  • Entries are now correctly categorized under their respective sections
  • The standalone Levenshtein entry has been removed and integrated into String Manipulation section

Rationale

These changes improve the repository organization by:

  1. Placing string distance algorithms together: Levenshtein and Hamming distance are now both in string_manipulation/ where they logically belong
  2. Correctly categorizing classification vs regression: Logistic regression and other classification algorithms are now properly placed
  3. Eliminating redundancy: Removed duplicate files that created confusion and maintenance burden
  4. Improving discoverability: Algorithms are now easier to find in their correct categorical folders

Fixes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Some algorithms are misplaced</issue_title>
<issue_description>All algorithms must be in the correct folder, but some are misplaced</issue_description>

<agent_instructions>Move the most misplaced files to correct folders</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #187


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: siriak <29201949+siriak@users.noreply.github.com>
Copilot AI changed the title [WIP] Move misplaced algorithms to correct folders Move misplaced algorithms to correct folders Oct 11, 2025
Copilot AI requested a review from siriak October 11, 2025 09:59
@siriak siriak marked this pull request as ready for review October 11, 2025 10:07
Copilot AI review requested due to automatic review settings October 11, 2025 10:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reorganizes misplaced algorithm files to improve repository structure by moving algorithms to their correct categorical directories and removing duplicate files.

Reviewed Changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
regression_algorithms/light_gbm.r Removed duplicate file (kept in classification_algorithms/)
regression_algorithms/knn.r Removed duplicate file (kept in classification_algorithms/)
regression_algorithms/gradient_boosting_algorithms.r Removed duplicate file (kept in classification_algorithms/)
classification_algorithms/lasso.r Removed file (moved to data_preprocessing/)
DIRECTORY.md Updated documentation to reflect file movements and categorizations

@siriak siriak merged commit 66bc83f into master Oct 11, 2025
@siriak siriak deleted the copilot/move-misplaced-algorithms branch October 11, 2025 10:13
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.

Some algorithms are misplaced

3 participants