{"id":24998914,"url":"https://github.com/thiswillbeyourgithub/taguchigridsearchconverter","last_synced_at":"2025-04-12T07:52:49.397Z","repository":{"id":271933262,"uuid":"915044847","full_name":"thiswillbeyourgithub/TaguchiGridSearchConverter","owner":"thiswillbeyourgithub","description":"TaguchiGridSearchConverter: Optimize hyperparameter search with Taguchi array principles, reducing experiments while effectively exploring the parameter space.","archived":false,"fork":false,"pushed_at":"2025-01-13T12:19:13.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T07:52:43.707Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thiswillbeyourgithub.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-10T21:05:25.000Z","updated_at":"2025-01-13T12:19:16.000Z","dependencies_parsed_at":"2025-01-10T21:16:03.691Z","dependency_job_id":"fe657dbf-f813-4917-a897-34768022aab2","html_url":"https://github.com/thiswillbeyourgithub/TaguchiGridSearchConverter","commit_stats":null,"previous_names":["thiswillbeyourgithub/taguchigridsearchconverter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FTaguchiGridSearchConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FTaguchiGridSearchConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FTaguchiGridSearchConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thiswillbeyourgithub%2FTaguchiGridSearchConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thiswillbeyourgithub","download_url":"https://codeload.github.com/thiswillbeyourgithub/TaguchiGridSearchConverter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537034,"owners_count":21120690,"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","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":[],"created_at":"2025-02-04T18:52:17.376Z","updated_at":"2025-04-12T07:52:49.356Z","avatar_url":"https://github.com/thiswillbeyourgithub.png","language":"Python","readme":"\n# TaguchiGridSearchConverter\n\nA Python package for optimizing hyperparameter search using Taguchi array principles. Inspired by [NightHawkInLight's video on Taguchi arrays](https://www.youtube.com/watch?v=5oULEuOoRd0\u0026pp=ygUPdGFndXNoaSBhcnJhYXlz).\n\n**Do fewer experiments than grid search, but do the right ones using Taguchi orthogonal arrays!**\n\n## Why use TaguchiGridSearchConverter?\n\nThis library is designed to work seamlessly with scikit-learn's ParameterGrid, providing a drop-in replacement that can significantly reduce your hyperparameter search space.\n\nWhen tuning machine learning models, traditional grid search can require an exponentially large number of experiments. TaguchiGridSearchConverter helps reduce the number of experiments needed while still effectively exploring the parameter space.\n\nInstead of testing every possible combination of parameters (which can be computationally expensive), this package uses Taguchi array principles to:\n1. Reduce the number of experiments needed\n2. Maintain good coverage of the parameter space\n3. Identify significant parameters efficiently\n\n## Getting started\n\n### Installation\n\n* From PyPI:\n    * Via uv: `uv pip install TaguchiGridSearchConverter`\n    * Via pip: `pip install TaguchiGridSearchConverter`\n* From GitHub:\n    * Clone this repo then `pip install .`\n\n### Basic Usage\n\n```python\nfrom sklearn.model_selection import ParameterGrid\nfrom TaguchiGridSearchConverter import TaguchiGridSearchConverter\n\ngrid_converter = TaguchiGridSearchConverter()\n\nsample_grid = {\n    'kernel': ['linear', 'rbf', 'poly'],\n    'C': [0.1, 1, 10],\n    'gamma': ['scale', 'auto'],\n    'verbose': [True],  # also handles length 1 lists for fixed params\n}\n\nfull_grid = ParameterGrid(sample_grid)\n\nreduced_grid = grid_converter.fit_transform(sample_grid)\n# Alternative way:\n# reduced_grid = grid_converter.fit_transform(full_grid)\n\n# Use the reduced grid in your experiments\nfor params in reduced_grid:\n    # Your training/evaluation code here\n    print(params)\n```\n\nIn the above experiment, the reduced experiments list is only this:\n```python\n[{'C': 0.1, 'gamma': 'scale', 'kernel': 'linear', 'verbose': True},\n {'C': 1, 'gamma': 'auto', 'kernel': 'rbf', 'verbose': True},\n {'C': 10, 'gamma': 'scale', 'kernel': 'poly', 'verbose': True}]\n```\n\n# The full experiments list would have been that long:\n```python\n[{'C': 0.1, 'gamma': 'scale', 'kernel': 'linear', 'verbose': True},\n {'C': 0.1, 'gamma': 'scale', 'kernel': 'rbf', 'verbose': True},\n {'C': 0.1, 'gamma': 'scale', 'kernel': 'poly', 'verbose': True},\n {'C': 0.1, 'gamma': 'auto', 'kernel': 'linear', 'verbose': True},\n {'C': 0.1, 'gamma': 'auto', 'kernel': 'rbf', 'verbose': True},\n {'C': 0.1, 'gamma': 'auto', 'kernel': 'poly', 'verbose': True},\n {'C': 1, 'gamma': 'scale', 'kernel': 'linear', 'verbose': True},\n {'C': 1, 'gamma': 'scale', 'kernel': 'rbf', 'verbose': True},\n {'C': 1, 'gamma': 'scale', 'kernel': 'poly', 'verbose': True},\n {'C': 1, 'gamma': 'auto', 'kernel': 'linear', 'verbose': True},\n {'C': 1, 'gamma': 'auto', 'kernel': 'rbf', 'verbose': True},\n {'C': 1, 'gamma': 'auto', 'kernel': 'poly', 'verbose': True},\n {'C': 10, 'gamma': 'scale', 'kernel': 'linear', 'verbose': True},\n {'C': 10, 'gamma': 'scale', 'kernel': 'rbf', 'verbose': True},\n {'C': 10, 'gamma': 'scale', 'kernel': 'poly', 'verbose': True},\n {'C': 10, 'gamma': 'auto', 'kernel': 'linear', 'verbose': True},\n {'C': 10, 'gamma': 'auto', 'kernel': 'rbf', 'verbose': True},\n {'C': 10, 'gamma': 'auto', 'kernel': 'poly', 'verbose': True}]\n```\n\nSo only 3 experiments instead of 18!\n\n\n## How it works\n\nThe converter takes a parameter grid (similar to scikit-learn's ParameterGrid) and:\n1. Determines the number of levels for each parameter\n2. Calculates the minimum number of experiments needed\n3. Creates a reduced set of parameter combinations using modulo cycling\n4. Ensures the reduced set is smaller than the full grid\n\nThis approach is particularly useful when:\n- You have limited computational resources\n- You need quick insights into parameter importance\n- You want to reduce experiment time without sacrificing too much accuracy\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Ftaguchigridsearchconverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthiswillbeyourgithub%2Ftaguchigridsearchconverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthiswillbeyourgithub%2Ftaguchigridsearchconverter/lists"}