{"id":33052212,"url":"https://github.com/tmadl/sklearn-random-bits-forest","last_synced_at":"2025-11-16T16:02:02.492Z","repository":{"id":71328392,"uuid":"64600396","full_name":"tmadl/sklearn-random-bits-forest","owner":"tmadl","description":"Scikit-learn compatible wrapper of the Random Bits Forest program written by (Wang et al., 2016)","archived":false,"fork":false,"pushed_at":"2016-07-31T15:23:41.000Z","size":904,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-29T09:33:28.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/tmadl.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}},"created_at":"2016-07-31T15:17:14.000Z","updated_at":"2023-10-13T17:01:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"395d126d-6d39-4fd2-bfb8-31fc67ce5ac2","html_url":"https://github.com/tmadl/sklearn-random-bits-forest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tmadl/sklearn-random-bits-forest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmadl%2Fsklearn-random-bits-forest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmadl%2Fsklearn-random-bits-forest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmadl%2Fsklearn-random-bits-forest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmadl%2Fsklearn-random-bits-forest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmadl","download_url":"https://codeload.github.com/tmadl/sklearn-random-bits-forest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmadl%2Fsklearn-random-bits-forest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284734138,"owners_count":27054622,"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-11-16T02:00:05.974Z","response_time":65,"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-11-14T03:00:31.651Z","updated_at":"2025-11-16T16:02:02.487Z","avatar_url":"https://github.com/tmadl.png","language":"Python","funding_links":[],"categories":["Machine Learning"],"sub_categories":["Random Forests"],"readme":"sklearn-compatible Random Bits Forest\n===============\n\nScikit-learn compatible wrapper of the Random Bits Forest program written by \n[Wang et al., 2016](http://www.nature.com/articles/srep30086), available as a binary\non [Sourceforge](https://sourceforge.net/projects/random-bits-forest/). All credits \nbelong to the authors. This is just some quick and dirty wrapper and testing code.\n\nThe authors present \"*...a classification and regression algorithm called Random \nBits Forest (RBF). RBF integrates neural network (for depth), boosting (for wideness) \nand random forest (for accuracy). It first generates and selects ~10,000 small \nthree-layer threshold random neural networks as basis by gradient boosting scheme. \nThese binary basis are then feed into a modified random forest algorithm to obtain \npredictions. In conclusion, RBF is a novel framework that performs strongly especially \non data with large size.*\"\n\nNote: the executable supplied by the authors has been compiled for Linux, and for \nCPUs supporting SSE instructions. \n\n![Fig1 from Wang et al., 2016](rbfprocess.jpg)\n\nUsage\n===============\n\nUsage example of the Random Bits Forest:\n\n```python\nfrom uci_loader import *\nfrom randombitsforest import RandomBitsForest\nX, y = getdataset('diabetes')\n\nfrom sklearn.ensemble.forest import RandomForestClassifier\n\nclassifier = RandomBitsForest()\nclassifier.fit(X[:len(y)/2], y[:len(y)/2])\np = classifier.predict(X[len(y)/2:])\nprint \"Random Bits Forest Accuracy:\", np.mean(p == y[len(y)/2:])\n\nclassifier = RandomForestClassifier(n_estimators=20)\nclassifier.fit(X[:len(y)/2], y[:len(y)/2])\nprint \"Random Forest Accuracy:\", np.mean(classifier.predict(X[len(y)/2:]) == y[len(y)/2:])\n```\n\nUsage example for the UCI comparison:\n\n```python\nfrom uci_comparison import compare_estimators\nfrom sklearn.ensemble.forest import RandomForestClassifier, ExtraTreesClassifier\nfrom randombitsforest import RandomBitsForest\n\nestimators = {\n              'RandomForest': RandomForestClassifier(n_estimators=200),\n              'ExtraTrees': ExtraTreesClassifier(n_estimators=200),\n              'RandomBitsForest': RandomBitsForest(number_of_trees=200)\n            }\n\n# optionally, pass a list of UCI dataset identifiers as the datasets parameter, e.g. datasets=['iris', 'diabetes']\n# optionally, pass a dict of scoring functions as the metric parameter, e.g. metrics={'F1-score': f1_score}\ncompare_estimators(estimators)\n\n\"\"\"\n                          ExtraTrees F1score RandomBitsForest F1score RandomForest F1score\n========================================================================================\n  breastcancer (n=683)      0.960 (SE=0.003)      0.954 (SE=0.003)     *0.963 (SE=0.003)\n       breastw (n=699)     *0.956 (SE=0.003)      0.951 (SE=0.003)      0.953 (SE=0.005)\n      creditg (n=1000)     *0.372 (SE=0.005)      0.121 (SE=0.003)      0.371 (SE=0.005)\n      haberman (n=306)      0.317 (SE=0.015)     *0.346 (SE=0.020)      0.305 (SE=0.016)\n         heart (n=270)      0.852 (SE=0.004)     *0.854 (SE=0.004)      0.852 (SE=0.006)\n    ionosphere (n=351)      0.740 (SE=0.037)     *0.741 (SE=0.037)      0.736 (SE=0.037)\n          labor (n=57)      0.246 (SE=0.016)      0.128 (SE=0.014)     *0.361 (SE=0.018)\nliverdisorders (n=345)      0.707 (SE=0.013)     *0.723 (SE=0.013)      0.713 (SE=0.012)\n     tictactoe (n=958)      0.030 (SE=0.007)     *0.336 (SE=0.040)      0.030 (SE=0.007)\n          vote (n=435)     *0.658 (SE=0.012)      0.228 (SE=0.017)     *0.658 (SE=0.012)\n\"\"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmadl%2Fsklearn-random-bits-forest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmadl%2Fsklearn-random-bits-forest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmadl%2Fsklearn-random-bits-forest/lists"}