{"id":23029676,"url":"https://github.com/antononcube/wl-classifierensembles-paclet","last_synced_at":"2026-01-17T22:16:41.035Z","repository":{"id":252533478,"uuid":"840572454","full_name":"antononcube/WL-ClassifierEnsembles-paclet","owner":"antononcube","description":"WL paclet for making and executing classifier ensembles.","archived":false,"fork":false,"pushed_at":"2024-08-10T17:54:48.000Z","size":1898,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T20:32:49.522Z","etag":null,"topics":["classification","classifier-ensembles","machine-learning","mathematica","roc-curve","wolfram","wolfram-language"],"latest_commit_sha":null,"homepage":"https://resources.wolframcloud.com/PacletRepository/resources/AntonAntonov/ClassifierEnsembles/","language":"Mathematica","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/antononcube.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":"2024-08-10T03:46:52.000Z","updated_at":"2024-08-10T17:56:33.000Z","dependencies_parsed_at":"2025-04-02T20:30:58.691Z","dependency_job_id":"667eab43-0f4f-49e5-b95a-ec218f5fc57c","html_url":"https://github.com/antononcube/WL-ClassifierEnsembles-paclet","commit_stats":null,"previous_names":["antononcube/wl-classifierensembles-paclet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antononcube/WL-ClassifierEnsembles-paclet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FWL-ClassifierEnsembles-paclet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FWL-ClassifierEnsembles-paclet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FWL-ClassifierEnsembles-paclet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FWL-ClassifierEnsembles-paclet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antononcube","download_url":"https://codeload.github.com/antononcube/WL-ClassifierEnsembles-paclet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antononcube%2FWL-ClassifierEnsembles-paclet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28519880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"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":["classification","classifier-ensembles","machine-learning","mathematica","roc-curve","wolfram","wolfram-language"],"created_at":"2024-12-15T14:16:42.743Z","updated_at":"2026-01-17T22:16:41.020Z","avatar_url":"https://github.com/antononcube.png","language":"Mathematica","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClassifierEnsembles \n\nWL paclet for making and executing classifier ensembles.\n\n\nThis package provides functions for creation and classification with ensembles of classifiers.\nAn ensemble of classifiers is simply an Association that maps classifier IDs to classifier functions.\n\nGiven a classifier ensemble we have the obvious option to classify a record by classifier voting.\nEach classifier returns a label, we tally the returned labels, the returned label of the ensemble is\nthe label with the largest tally number.\n\nSince ClassifierFunction has the method \"Probabilities\" for a classifier ensemble we can also average\nthe probabilities for each label, and return the label with the highest average probability.\nIf a threshold is specified for a label, then we can pick that label as the classification result\nif its average probability is above the threshold.\n\nThe functions in this package are especially useful when used together with functions of\nthe paclet \n[\"ROCFunctions\"](https://resources.wolframcloud.com/PacletRepository/resources/AntonAntonov/ROCFunctions/),\n([GitHub](https://github.com/antononcube/WL-ROCFunctions-paclet)). \n\nAn attempt to import the package ROCFunctions.m is made if definitions of its functions are not found.\n\n\n## Usage examples\n\n### Getting data\n\n```mathematica\ndata = ExampleData[{\"MachineLearning\", \"Titanic\"}, \"TrainingData\"];\ndata = ((Flatten@*List) @@@ data)[[All, {1, 2, 3, -1}]];\ntrainingData = DeleteCases[data, {___, _Missing, ___}];\n\ndata = ExampleData[{\"MachineLearning\", \"Titanic\"}, \"TestData\"];\ndata = ((Flatten@*List) @@@ data)[[All, {1, 2, 3, -1}]];\ntestData = DeleteCases[data, {___, _Missing, ___}];\n```\n\n### Create a classifier ensemble\n\n```mathematica\naCLs = EnsembleClassifier[Automatic, trainingData[[All, 1 ;; -2]] -\u003e trainingData[[All, -1]]]\n```\n\n### Classify a record\n\n```mathematica\nEnsembleClassify[aCLs, testData[[1, 1 ;; -2]]]\n(* \"survived\" *)\n\nEnsembleClassifyByThreshold[aCLs, testData[[1, 1 ;; -2]], \"survived\" -\u003e 2, \"Votes\"]\n(* \"survived\" *)\n\nEnsembleClassifyByThreshold[aCLs, testData[[1, 1 ;; -2]], \"survived\" -\u003e 0.2, \"ProbabilitiesMean\"]\n(* \"survived\" *)\n```\n\n### Classify a list of records using a threshold\n\nReturn \"survived\" if it gets at least two votes\n\n```mathematica\nEnsembleClassifyByThreshold[aCLs, testData[[1 ;; 12, 1 ;; -2]], \"survived\" -\u003e 2, \"Votes\"]\n\n(* {\"survived\", \"died\", \"survived\", \"survived\", \"died\", \"survived\", \\\n   \"survived\", \"survived\", \"died\", \"survived\", \"died\", \"survived\"} *)\n```\n\nReturn \"survived\" if its average probability is at least 0.7\n\n```mathematica\nEnsembleClassifyByThreshold[aCLs, testData[[1 ;; 12, 1 ;; -2]], \"survived\" -\u003e 0.7, \"ProbabilitiesMean\"]\n\n(* {\"survived\", \"died\", \"survived\", \"died\", \"died\", \\\n   \"survived\", \"died\", \"survived\", \"died\", \"survived\", \"died\", \\\n   \"survived\"} *)\n```\n\n## Threshold classification with ROC\n\n```mathemaica\nrocRange = Range[0, 1, 0.1];\naROCs =\n  Table[(cres = EnsembleClassifyByThreshold[aCLs, testData[[All, 1 ;; -2]], \"survived\" -\u003e i];\n         ToROCAssociation[{\"survived\", \"died\"}, testData[[All, -1]], cres]),\n        {i, rocRange}];\n\nROCPlot[rocRange, aROCs]\n```\n\n----\n\nAnton Antonov   \n2016-10-12 Winderemere, FL, USA    \n2024-08-10 Winderemere, FL, USA   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fwl-classifierensembles-paclet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantononcube%2Fwl-classifierensembles-paclet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantononcube%2Fwl-classifierensembles-paclet/lists"}