{"id":21182623,"url":"https://github.com/fandreuz/vsr-behavior-characterization","last_synced_at":"2026-04-17T00:02:24.259Z","repository":{"id":107377512,"uuid":"439999192","full_name":"fandreuz/vsr-behavior-characterization","owner":"fandreuz","description":"Application of Unsupervised Learning algorithms to recognize patterns in the behavior of VSR.","archived":false,"fork":false,"pushed_at":"2022-01-26T22:21:55.000Z","size":10431,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T19:51:20.201Z","etag":null,"topics":["machine-learning","python","robotics","sklearn","unsupervised-learning","voxel-based"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/fandreuz.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":"2021-12-20T00:27:28.000Z","updated_at":"2023-01-02T13:34:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c55dac39-1ba0-490e-b840-0d505952c3c7","html_url":"https://github.com/fandreuz/vsr-behavior-characterization","commit_stats":null,"previous_names":["fandreuz/vsr-behavior-characterization"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fandreuz/vsr-behavior-characterization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fvsr-behavior-characterization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fvsr-behavior-characterization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fvsr-behavior-characterization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fvsr-behavior-characterization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fandreuz","download_url":"https://codeload.github.com/fandreuz/vsr-behavior-characterization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandreuz%2Fvsr-behavior-characterization/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31909235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["machine-learning","python","robotics","sklearn","unsupervised-learning","voxel-based"],"created_at":"2024-11-20T17:57:31.420Z","updated_at":"2026-04-17T00:02:24.214Z","avatar_url":"https://github.com/fandreuz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vsr-behavior-characterization\nIn this small project we apply an Unsupervised Learning technique (`KMeans`) to find\nrecurrent behaviors in a dataset of Voxel-Based Soft Robots (VSR).\n\n## Structure of the project\nThe folder `src` contains the core of the project, in particular the file\n`behavior_classification.py` is responsible for the execution of the\nexperiments. The other files are auxiliary functions/classes used to clean\nthe code.\n\nThe folder `dataset` contains the data which we arw willing to clusterize.\n`best.[0-9].txt` contain the predictors on which we apply KMeans, please refer to\n[this](https://medvet.inginf.units.it/teaching/2122-intro-ml-er/project/#vsrs-behavior-characterization)\nwebpage for an overview of their meaning. The files `supervised_clusters*.py`\ncontain two different versions of verification datasets that we prepared by\nhand via the manual inspection of videos available alongside the datasets.\n\n## Example run and output\nNavigate to the root folder of the project (you should see both `src` and\n`dataset`). To run an experiment, use the following command\n\n```python\npython3 src/behavior_classification.py N\n```\n\nwhere `N` is the desired number of clusters. Note that at the moment we support\nonly `N=3` and `N=4` since these are the only values for which we managed to\ngenerate two supervised datasets \"by hand\", in which we classified the behavior\nof the robots according to our opinion. This allows us to select the best\ncombination of the weights we introduced in our approach (and which we wish to\noptimize in order to obtain improved results). Therefore, new supervised\ndatasets are needed to increase the domain of `N`. Have a look at the files\n`dataset/supervised_clusters*.py` to see how we represented the supervised\nclusters.\n\nThe script tries a wide set of possible values for the weights, and for each\ncombination produces the following output:\n![Combos](res/all_combo_weights.png)\n\nThis first step may last up to one hour, depending on your device. When all the combination have been tested, an ouput similar to following is printed (we set `N=3` for this example):\n![Combos](res/results.png)\n\nAs you can see you receive immediately a clear overview of the results for the optimal combination, along with an in-depth comparison between supervised and unsupervised clusters (i.e. clusters built \"by hand\" and clusters built by the algorithm `KMeans`).\n\n## Authors\n+ Francesco Andreuzzi\n+ Luca Filippi\n\n## Implementation details\nWe coded the experiment using Python, along with the scientific libraries NumPy and scikit-learn.\n\n## References\n1. Ferigo et al. 2021, *Beyond body shape and brain: evolving the sensory apparatus of voxel-based soft robots.*\n2. Hastie, Tibshirani, Friedman, 2009, *An introduction to statistical learning.*\n3. Medvet et al. 2020, *Design, validation, and case studies of 2d-vsr-sim, an optimization-friendly simulator of 2-d voxel-based soft robots.*\n4. Medvet et al. 2021, *Biodiversity in evolved voxel-based soft robots.*\n5. Panday et al. 2018, *Feature weighting as a tool for unsupervised feature selection.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandreuz%2Fvsr-behavior-characterization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffandreuz%2Fvsr-behavior-characterization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandreuz%2Fvsr-behavior-characterization/lists"}