{"id":30548486,"url":"https://github.com/jespb/c-stdgp","last_synced_at":"2025-08-28T03:08:05.948Z","repository":{"id":132774053,"uuid":"446777692","full_name":"jespb/C-StdGP","owner":"jespb","description":"My C implementation of the Standard Genetic Programming Algorithm.","archived":false,"fork":false,"pushed_at":"2025-07-22T02:30:09.000Z","size":53,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T04:26:32.500Z","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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-11T10:37:38.000Z","updated_at":"2025-07-22T02:30:12.000Z","dependencies_parsed_at":"2025-07-22T04:17:23.863Z","dependency_job_id":"db7bc8cd-bc1a-4787-a44d-9ee4fb0b9f74","html_url":"https://github.com/jespb/C-StdGP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jespb/C-StdGP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-StdGP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-StdGP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-StdGP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-StdGP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jespb","download_url":"https://codeload.github.com/jespb/C-StdGP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jespb%2FC-StdGP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272426363,"owners_count":24933023,"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:05.346Z","updated_at":"2025-08-28T03:08:05.934Z","avatar_url":"https://github.com/jespb.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C-StdGP\nThis is a, easy-to-use, scikit-learn inspired version of the Standard Genetic Programming (StdGP) algorithm.\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-StdGP\nCopyright ©2021-2022 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 StdGP can be used in a stand-alone fashion using the following command and flags:\n\n$ python Main_StdGP_standalone.py\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.\n\n\t[-md max_depth]\n\t\t- This flag expects an integer with the maximum initial depth for the trees;\n\t\t- By default, this value is set to 6.\t\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\t\n\t[-op operators]\n\t\t- This flag excepts a set of operators separated by \";\"\n\t\t- Allowed operators: +;-;*;/\n\t\t- By default, the used operators are the sum, subtraction, multiplication and protected division.\t\t\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\t\n\t[-ts tournament_size]\n\t\t- This flag expects an integer with the tournament size;\n\t\t- By default, this value is set to 10.\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\n\n\nHow to use this implementation:\n\t$ make\n\t$ ./exec_StdGP [parameters]\n\n\nUseful methods:\n\t$ struct StdGP_t* model = stdgp_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\nReference:\n    Poli, R., Langdon, W.B., McPhee, N.F.: A Field Guide to Genetic Programming. Lulu Enterprises, UK Ltd (2008)\n\n\n\n\n\n\n\nIf you use this implementation, please cite one of the following works where I use the Std-GP algorithm:\n\n@article{BATISTA2025101761,\n\ttitle = {Complexity, interpretability and robustness of GP-based feature engineering in remote sensing},\n\tjournal = {Swarm and Evolutionary Computation},\n\tvolume = {92},\n\tpages = {101761},\n\tyear = {2025},\n\tissn = {2210-6502},\n\tdoi = {https://doi.org/10.1016/j.swevo.2024.101761},\n\turl = {https://www.sciencedirect.com/science/article/pii/S2210650224002992},\n\tauthor = {João E. Batista and Adam K. Pindur and Ana I.R. Cabral and Hitoshi Iba and Sara Silva},\n}\n\n@article{Rodrigues2023,\n  title = {Exploring SLUG: Feature Selection Using Genetic Algorithms and Genetic Programming},\n  volume = {5},\n  ISSN = {2661-8907},\n  url = {http://dx.doi.org/10.1007/s42979-023-02106-3},\n  DOI = {10.1007/s42979-023-02106-3},\n  number = {1},\n  journal = {SN Computer Science},\n  publisher = {Springer Science and Business Media LLC},\n  author = {Rodrigues,  Nuno M. and Batista,  João E. and Cava,  William La and Vanneschi,  Leonardo and Silva,  Sara},\n  year = {2023},\n  month = dec \n}\n\n@inproceedings{10.1145/3520304.3533946,\n\tauthor = {Batista, Jo\\~{a}o E. and Silva, Sara},\n\ttitle = {Evolving a cloud-robust water index with genetic programming},\n\tyear = {2022},\n\tisbn = {9781450392686},\n\tpublisher = {Association for Computing Machinery},\n\taddress = {New York, NY, USA},\n\turl = {https://doi.org/10.1145/3520304.3533946},\n\tdoi = {10.1145/3520304.3533946},\n\tbooktitle = {Proceedings of the Genetic and Evolutionary Computation Conference Companion},\n\tpages = {55–56},\n\tnumpages = {2},\n\tlocation = {Boston, Massachusetts},\n\tseries = {GECCO '22}\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjespb%2Fc-stdgp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjespb%2Fc-stdgp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjespb%2Fc-stdgp/lists"}