{"id":31704701,"url":"https://github.com/markmelnic/scalg","last_synced_at":"2025-10-08T22:55:47.847Z","repository":{"id":57464138,"uuid":"259575772","full_name":"markmelnic/scalg","owner":"markmelnic","description":"List scoring algorithm. Analyse data using a range based procentual proximity algorithm.","archived":false,"fork":false,"pushed_at":"2022-09-07T13:46:22.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T15:51:26.708Z","etag":null,"topics":["algorithm","data-analysis","pypi","pypi-package","score","scorer","scoring","scoring-algorithm"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/scalg/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markmelnic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-28T08:23:28.000Z","updated_at":"2025-04-28T13:14:20.000Z","dependencies_parsed_at":"2022-09-05T06:01:32.295Z","dependency_job_id":null,"html_url":"https://github.com/markmelnic/scalg","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/markmelnic/scalg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmelnic%2Fscalg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmelnic%2Fscalg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmelnic%2Fscalg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmelnic%2Fscalg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmelnic","download_url":"https://codeload.github.com/markmelnic/scalg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmelnic%2Fscalg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000693,"owners_count":26082850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","data-analysis","pypi","pypi-package","score","scorer","scoring","scoring-algorithm"],"created_at":"2025-10-08T22:55:44.251Z","updated_at":"2025-10-08T22:55:47.843Z","avatar_url":"https://github.com/markmelnic.png","language":"Python","readme":"\n# Scoring Algorithm (SCALG)\n\nThis algorithm works based on a percentual range proximity principle. Initially it was developed for a personal project, however later I found out it is a form of Newton's method used in statistics to solve maximum likelihood equations.\n\n## Usage\n\n    pip install scalg\n\nAs of __15 september 2020__ it contains two methods (`score` and `score_columns`) which will be described and demonstrated in the examples below.\n\n    import scalg\n\n## Examples\n\nThis will be the sample dataset used as source_data withing the examples with the corresponding indexes and column weights.\n\n    Columns -\u003e  0     1      2      3\n    Weights -\u003e  1     0      0      1\n            1[[2016 ,21999 ,62000  ,181],\n    Sets -\u003e 2 [2013 ,21540 ,89000  ,223],\n            3 [2015 ,18900 ,100000 ,223],\n            4 [2013 ,24200 ,115527 ,223],\n            5 [2016 ,24990 ,47300  ,223]]\n\n### Score Method\n\nThe output if you pass in source_data and weights:\n\n`scalg.score(source_data, [1, 0, 0, 1])`\n\n    [[2016, 21999, 62000,  181, 2.2756757812463335],\n     [2013, 21540, 89000,  223, 1.9553074815952338],\n     [2015, 18900, 100000, 223, 2.894245191297678],\n     [2013, 24200, 115527, 223, 1.1297208538587848],\n     [2016, 24990, 47300,  223, 3.0]]\n\nThe output if you pass in source_data, weights and get_scores=True:\n\n`scalg.score(source_data, [1, 0, 0, 1], get_scores=True)`\n\n    [2.2756757812463335, 1.9553074815952338, 2. 894245191297678, 1.1297208538587848, 3.0]\n\nThe output if you pass in source_data, weights and get_score_lists=True:\n\n`scalg.score(source_data, [1, 0, 0, 1], get_score_lists=True)`\n\n    [[1.0                 ,0.0, 0.6666666666666666 ,0.0                      ,1.0]\n     [0.49113300492610834 ,0.5665024630541872      ,1.0, 0.12972085385878485 ,0.0]\n     [0.7845427763202251  ,0.38880501854104677     ,0.22757852463101114      ,0.0]\n     [0.0                 ,1.0                     ,1.0                      ,1.0]]\n\nThis gives out the score of each element in the list compared to other elements, keeping it's position.\n\n### Score Columns Method\n\nHere you may use the same weights which you would use in `scalg.score`, or you may specify the weights of each column in the corresponding order. In this example using the weights argument `[1, 0, 0, 1]` or `[0, 1]` would make no difference.\n\nThe output if you pass in source_data, columns and weights:\n\n`scalg.score_columns(source_data, [0, 1], [1, 0, 0, 1])`\n\n     Scored columns            Scores for corresponding columns\n       0|    1|                  |\n    [[2016 ,21999 ,62000  ,181 ,1.4911330049261085],\n     [2013 ,21540 ,89000  ,223 ,0.5665024630541872],\n     [2015 ,18900 ,100000 ,223 ,1.6666666666666665],\n     [2013 ,24200 ,115527 ,223 ,0.12972085385878485],\n     [2016 ,24990 ,47300  ,223 ,1.0]]\n\nThe score was computed only based on columns 0 and 1.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmelnic%2Fscalg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmelnic%2Fscalg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmelnic%2Fscalg/lists"}