{"id":20751003,"url":"https://github.com/vaaaaanquish/label-propagation-rs","last_synced_at":"2025-07-03T20:34:06.687Z","repository":{"id":47537159,"uuid":"398284485","full_name":"vaaaaanquish/label-propagation-rs","owner":"vaaaaanquish","description":"Label Propagation Algorithm by Rust. Label propagation (LP) is graph-based semi-supervised learning (SSL). LGC and CAMLP have been implemented.","archived":false,"fork":false,"pushed_at":"2021-08-26T20:27:15.000Z","size":14,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T04:01:49.516Z","etag":null,"topics":["graph","graph-algorithms","machine-learning","machine-learning-algorithms","rust","rust-lang","semi-supervised-learning"],"latest_commit_sha":null,"homepage":"https://github.com/vaaaaanquish/label-propagation-rs","language":"Rust","has_issues":true,"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/vaaaaanquish.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":"2021-08-20T13:25:12.000Z","updated_at":"2021-09-15T00:30:20.000Z","dependencies_parsed_at":"2022-07-25T00:02:14.932Z","dependency_job_id":null,"html_url":"https://github.com/vaaaaanquish/label-propagation-rs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vaaaaanquish/label-propagation-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Flabel-propagation-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Flabel-propagation-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Flabel-propagation-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Flabel-propagation-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaaaaanquish","download_url":"https://codeload.github.com/vaaaaanquish/label-propagation-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Flabel-propagation-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263109184,"owners_count":23415008,"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":["graph","graph-algorithms","machine-learning","machine-learning-algorithms","rust","rust-lang","semi-supervised-learning"],"created_at":"2024-11-17T08:29:38.770Z","updated_at":"2025-07-03T20:34:06.654Z","avatar_url":"https://github.com/vaaaaanquish.png","language":"Rust","funding_links":[],"categories":["Machine Learning"],"sub_categories":[],"readme":"# label-propagation-rs\n\nLabel Propagation Algorithm by Rust.\n\nLabel propagation (LP) is graph-based semi-supervised learning (SSL).\n\nA simple LGC and a more advanced CAMLP have been implemented.\n\n\n# Usage\n\nYou can find the examples in the examples directory.\n\nThe label is a continuous value of `[0, class_n]`, and the result of `predict_proba` is the value of the label.\n\n```rust\nuse std::result::Result;\nuse std::error::Error;\n\nextern crate label_propagation;\nextern crate ndarray;\nextern crate ndarray_stats;\n\nuse ndarray::prelude::*;\nuse label_propagation::{CAMLP, LGC};\nuse ndarray::Array;\n\npub fn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    // make graph matrix ndarray\n    let graph = Array::from_shape_vec(\n        (3, 3),\n        vec![0.0, 0.3, 0.0, 0.3, 0.0, 0.0, 0.0, 0.0, 0.0]).unwrap();\n\n    // node index for label\n    let x = array![0, 1];\n    // label\n    let y = array![0, 1];\n\n    // make model\n    let mut model = CAMLP::new(graph).iter(30).beta(0.1);\n    // let mut model = LGC::new(graph).iter(30).alpha(0.99);\n\n    model.fit(\u0026x, \u0026y)?;\n\n    let target = array![0, 1];\n    let result = model.predict_proba(\u0026target);\n    println!(\"{:?}\", result);\n\n    Ok(())\n}\n```\n\n\n# develop\n\n```sh\ndocker build -t graph .\ndocker run -it -v $PWD:/app graph bash\n```\n\n# Thanks\n\n- Local and Global Consistency (LGC) [Zhou+, NIPS'04] https://dennyzhou.github.io/papers/LLGC.pdf\n- Core model in Confidence-Aware Modulated Label Propagation (CAMLP) [Yamaguchi+, SDM'16] https://epubs.siam.org/doi/pdf/10.1137/1.9781611974348.58\n- [yamaguchiyuto/label_propagation](https://github.com/yamaguchiyuto/label_propagation) - Implementations of label propagation like algorithms, python\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaaaaanquish%2Flabel-propagation-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaaaaanquish%2Flabel-propagation-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaaaaanquish%2Flabel-propagation-rs/lists"}