{"id":30548498,"url":"https://github.com/jespb/c-ga","last_synced_at":"2025-08-28T03:08:08.587Z","repository":{"id":211274755,"uuid":"728609294","full_name":"jespb/C-GA","owner":"jespb","description":"C implementation of the Genetic Algorithm","archived":false,"fork":false,"pushed_at":"2023-12-18T16:26:14.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-18T18:49:07.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jespb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-07T10:02:56.000Z","updated_at":"2023-12-07T13:48:38.000Z","dependencies_parsed_at":"2023-12-18T17:59:48.021Z","dependency_job_id":null,"html_url":"https://github.com/jespb/C-GA","commit_stats":null,"previous_names":["jespb/c-ga"],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/jespb/C-GA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-GA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-GA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-GA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-GA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jespb","download_url":"https://codeload.github.com/jespb/C-GA/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-GA/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272426365,"owners_count":24933024,"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-08-28T02:00:10.768Z","response_time":74,"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":[],"created_at":"2025-08-28T03:08:08.117Z","updated_at":"2025-08-28T03:08:08.581Z","avatar_url":"https://github.com/jespb.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C-GA\nThis is a, easy-to-use, scikit-learn inspired version of the Genetic Algorithm (GA).\n\n\nBy using this file, you are agreeing to this product's EULA\nThis product can be obtained in https://github.com/jespb/C-GA\nCopyright ©2023 J. E. Batista\n\n\nThis file contains information about the command and flags used in the stand-alone version of this implementation and an explanation on how to import, use and edit this implementation.\n\n\nThis implementation of GA can be used in a stand-alone fashion using the following command and flags:\n\n$ exec_GA\n\t\n\t[-d datasets] \n\t\t- This flag expects a set of csv dataset names separated by \";\" (e.g., a.csv;b.csv)\n\t\t- By default, the heart.csv dataset is used\t\t\n\n\t[-dsdir dir] \n\t\t- States the dataset directory. \n\t\t- By default \"datasets/\" is used \n\t\t- Use \"-dsdir ./\" for the root directory\t\n\n\t[-es elite_size]\n\t\t- This flag expects an integer with the elite size;\n\t\t- By default, the elite has size 1.\t\n\n\t[-mg max_generation]\n\t\t- This flag expects an integer with the maximum number of generations;\n\t\t- By default, this value is set to 100.\n\n\t[-odir dir] \n\t\t- States the output directory. \n\t\t- By default \"results/\" is used \n\t\t- Use \"-odir ./\" for the root directory\n\n\t[-ps population_size]\n\t\t- This flag expects an integer with the size of the population;\n\t\t- By default, this value is set to 500.\n\n\t[-runs number_of_runs] \n\t\t- This flag expects an integer with the number of runs to be made;\n\t\t- By default, this values is set to 30\n\t\n\t[-tf train_fraction]\n\t\t- This flag expects a float [0;1] with the fraction of the dataset to be used in training;\n\t\t- By default, this value is set to 0.70\n\n\t[-t number_of_threads]\n\t\t- This flag expects an integer with the number of threads to use while evaluating the population;\n\t\t- If the value is set to 1, the multiprocessing library will not be used \n\t\t- By default, this value is set to 1.\n\n\n\n\nHow to use this implementation:\n\t$ make\n\t$ ./exec_GA [parameters]\n\n\nUseful methods:\n\t$ GA model = ga_create( ... )\t\t-\u003e creates the population;\n\t$ fit(model)\t\t\t\t\t\t-\u003e trains the model;\n\t$ predict_classification(model, X, No_of_samples)\t-\u003e Returns a list with the prediction of the given dataset.\n\t$ predict_regression(model, X, No_of_samples)   \t-\u003e Returns a list with the prediction of the given dataset.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjespb%2Fc-ga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjespb%2Fc-ga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjespb%2Fc-ga/lists"}