{"id":32152014,"url":"https://github.com/juliamatsci/cbfv.jl","last_synced_at":"2026-02-19T08:01:57.543Z","repository":{"id":42185560,"uuid":"479500477","full_name":"JuliaMatSci/CBFV.jl","owner":"JuliaMatSci","description":"A simple composition-based feature vectorization utility in Julia","archived":false,"fork":false,"pushed_at":"2022-04-20T21:25:59.000Z","size":779,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-26T14:50:51.211Z","etag":null,"topics":["data-science","machine-learning","materials-informatics","materials-science"],"latest_commit_sha":null,"homepage":"https://juliamatsci.github.io/CBFV.jl/","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaMatSci.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":"2022-04-08T18:35:36.000Z","updated_at":"2023-03-24T00:29:16.000Z","dependencies_parsed_at":"2022-08-12T08:50:37.898Z","dependency_job_id":null,"html_url":"https://github.com/JuliaMatSci/CBFV.jl","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaMatSci/CBFV.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaMatSci%2FCBFV.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaMatSci%2FCBFV.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaMatSci%2FCBFV.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaMatSci%2FCBFV.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaMatSci","download_url":"https://codeload.github.com/JuliaMatSci/CBFV.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaMatSci%2FCBFV.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29608152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["data-science","machine-learning","materials-informatics","materials-science"],"created_at":"2025-10-21T10:58:49.422Z","updated_at":"2026-02-19T08:01:57.523Z","avatar_url":"https://github.com/JuliaMatSci.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CBFV.jl : A simple composition-based feature vectorization utility in Julia\n[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliamatsci.github.io/CBFV.jl/stable) [![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliamatsci.github.io/CBFV.jl/dev) [![Build Status](https://github.com/juliamatsci/CBFV.jl/workflows/CI/badge.svg)](https://github.com/JuliaMatSci/CBFV.jl/actions)[![Coverage](https://codecov.io/gh/JuliaMatSci/CBFV.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaMatSci/CBFV.jl)\n\nThis is a Julia rewrite of the [python tool](https://github.com/kaaiian/CBFV) to create a composition-based feature vector representation for machine learning with materials science data. The ideas and methodology are discussed in the recent article:\n\n\n\u003eWang, Anthony Yu-Tung; Murdock, Ryan J.; Kauwe, Steven K.; Oliynyk, Anton O.; Gurlo, Aleksander; Brgoch, Jakoah; Persson, Kristin A.; Sparks, Taylor D., [Machine Learning for Materials Scientists: An Introductory Guide toward Best Practices](https://doi.org/10.1021/acs.chemmater.0c01907), *Chemistry of Materials* **2020**, *32 (12)*: 4954–4965. DOI: [10.1021/acs.chemmater.0c01907](https://doi.org/10.1021/acs.chemmater.0c01907).\n\nand the original python source code(s) can be found here:\n\n- [https://github.com/anthony-wang/BestPractices/tree/master/notebooks/CBFV](https://github.com/anthony-wang/BestPractices/tree/master/notebooks/CBFV)\n- [https://github.com/kaaiian/CBFV](https://github.com/kaaiian/CBFV)\n\n## Example Use\n\nThe input data set should have a least two columns with the header/names `formula` and `target`.\n\n```julia\nusing DataFrames\nusing CBFV\ndata = DataFrame(\"name\"=\u003e[\"Rb2Te\",\"CdCl2\",\"LaN\"],\"bandgap_eV\"=\u003e[1.88,3.51,1.12])\nrename!(data,Dict(\"name\"=\u003e\"formula\",\"bandgap_eV\"=\u003e\"target\"))\nfeatures = generatefeatures(data)\n```\n\nThe thing to note is you most likely will still want to post-process the generated feature data using some transformation to scale the data. The [StatsBase.jl](https://juliastats.org/StatsBase.jl/stable/transformations/) package provides some basic fetures for this, although the input needs to be `AbstractMatrix{\u003c:Real}` rather than a `DataFrame`. This can be achieved using `generatefeatures(data,returndataframe=false)`\n\n## Supported Featurization Schemes\n\nAs with the orignal CBFV python package the following element databases are available:\n\n- `oliynyk` (default): Database from A. Oliynyk.\n- `magpie`: [Materials Agnostic Platform for Informatics and Exploration](https://bitbucket.org/wolverton/magpie/src/master/)\n- `mat2vec`:  [Word embeddings capture latent knowledge from materials science](https://github.com/materialsintelligence/mat2vec)\n- `jarvis`: [Joint Automated Repository for Various Integrated Simulations provided by U.S. National Institutes of Standards and Technologies.](https://jarvis.nist.gov/)\n- `onehot`: Simple one hot encoding scheme, i.e., diagonal elemental matrix.\n- `random_200`: 200 random elemental properties (I'm assuming).\n\nHowever, `CBFV.jl` will allow you to provide your own element database to featurize with. Also, the current implementation reads the saved `.csv` file in [`databases`](@ref), however, this is prone to potential issues (ex. out of date files). To alleviate this I will change the implementation to utilize `Pkg.Artificats` with a `Artificats.toml` file that enables grabbing the datafiles needed from a server if they don't exist locally already.\n\n### Julia Dependencies\nThis is a relatively small package so there aren't a lot of dependencies. The required packages are:\n\n- CSV\n- DataFrames\n- ProgressBars\n\n## Citations\nPleae cite the following when and if you use this package in your work:\n\n```bibtex\n@misc{CBFV.jl,\n    author = {Bringuier, Stefan},\n    year = {2021},\n    title = {CBFV.jl - A simple composition based feature vectorization Julia utility},\n    url = {https://github.com/JuliaMatSci/CBFV.jl},\n}\n```\nIn addition, please also consider citing the original python implementation and tutorial paper.\n\n```bibtex\n@misc{CBFV,\n    author = {Kauwe, Steven and Wang, Anthony Yu-Tung and Falkowski, Andrew},\n    title = {CBFV: Composition-based feature vectors},\n    url = {https://github.com/kaaiian/CBFV}\n}\n```\n\n```bibtex\n@article{Wang2020bestpractices,\n    author = {Wang, Anthony Yu-Tung and Murdock, Ryan J. and Kauwe, Steven K. and Oliynyk, Anton O. and Gurlo, Aleksander and Brgoch, Jakoah and Persson, Kristin A. and Sparks, Taylor D.},\n    year = {2020},\n    title = {Machine Learning for Materials Scientists: An Introductory Guide toward Best Practices},\n    url = {https://doi.org/10.1021/acs.chemmater.0c01907},\n    pages = {4954--4965},\n    volume = {32},\n    number = {12},\n    issn = {0897-4756},\n    journal = {Chemistry of Materials},\n    doi = {10.1021/acs.chemmater.0c01907}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliamatsci%2Fcbfv.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliamatsci%2Fcbfv.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliamatsci%2Fcbfv.jl/lists"}