{"id":19059949,"url":"https://github.com/q-m/mlc-eval","last_synced_at":"2026-05-12T20:30:17.045Z","repository":{"id":146167272,"uuid":"81942221","full_name":"q-m/mlc-eval","owner":"q-m","description":"Classification evaluation interface","archived":false,"fork":false,"pushed_at":"2018-11-19T10:11:41.000Z","size":5732,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-02T12:24:18.001Z","etag":null,"topics":["classification","confusion-matrix","js","machine-learning","webapp"],"latest_commit_sha":null,"homepage":"https://developers.thequestionmark.org/mlc-eval/","language":"JavaScript","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/q-m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-02-14T12:16:23.000Z","updated_at":"2019-03-13T21:47:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"437153b7-cdcb-4d94-b316-1f100211915f","html_url":"https://github.com/q-m/mlc-eval","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q-m%2Fmlc-eval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q-m%2Fmlc-eval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q-m%2Fmlc-eval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q-m%2Fmlc-eval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/q-m","download_url":"https://codeload.github.com/q-m/mlc-eval/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240114326,"owners_count":19749837,"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":["classification","confusion-matrix","js","machine-learning","webapp"],"created_at":"2024-11-09T00:12:15.798Z","updated_at":"2026-05-12T20:30:16.972Z","avatar_url":"https://github.com/q-m.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MLC-Eval\n\n**A user-interface for evaluation of classification results.**\n\nWhen working with classification in machine learning, evaluation of results can be very\nuseful to check and improve. For larger datasets, existing tools remain limited.\nThis project provides a web-based user-interface for looking into classification results,\nwhich should also work with thousands of classes.\n\nThe initial focus was on [LIBSVM][] and [LIBLINEAR][], which provide a convenient way to work\nwith [support vector machines](https://en.wikipedia.org/wiki/Support_vector_machine) on\nlarge datasets, but other software and methods are also supported (as long as the relevant\nfiles are generated).\n\nVisit the [online app](https://developers.thequestionmark.org/mlc-eval/) directly.\n\n\n# Features\n\nThis project isn't fully complete in the sense that there's more useful information to\nshow. But it provides a starting point with a summary, category overview and [Confusion matrix][].\n\n![](screenshots.gif)\n\nBy default, the widely used iris dataset will be shown. It isn't a very good example to showcase\nthis tool, with just three classes. To load your own dataset, put your own `data.cm` and other files\nin `public/data/`, and add `?baseUrl=/data/data` to the url.\n\nIf you want to view data behind the training features in `data.features`, you can use the first\ncolumn in that file to indicate an id. Supply a query parameter `itemUrlTemplate=http://.../:id`\nto this web application, and the _Categories_ view will show a link in the _Training features_\npane. You can use this to improve your training data, for example.\n\n# Run\n\nThe easiest way would be to visit the [hosted app](https://developers.thequestionmark.org/mlc-eval/) directly.\n\nTo run this tool yourself, you'll need [Node.js][] to run the web application. For generating the\nconfusion matrix for LIBSVM/LIBLINEAR (see below), you need [Ruby][].\n\nTo run the web application yourself:\n```\n$ npm install\n$ npm start\n```\n\nA web browser window will open on `http://localhost:3000/` .\n\n\n# Files\n\nClassification data is read from the following files, currently served from `public/data/`:\n\n- `data.cm` - confusion matrix\n- `data.labels` - label names, to show class names instead of numbers _(optional but recommended)_\n- `data.model` - the trained model, only the header is read to show properties _(optional)_\n- `data.features` - training data features, for showing data behind trained classes _(optional)_\n\nThese files need to be created by your classification software. [LIBSVM][] generates `data.model`,\na tool for generating the confusion matrix is part of this project (see below). See [file formats](#file-formats)\nbelow for an explanation (as well as the example in `public/example`).\n\n## Generating a confusion matrix for SVM\n\nA confusion matrix can be generated after doing cross-validation on the training data.\nThis can be done with the supplied scripts `libsvm-cm.rb` or `liblinear-cm.rb` (you'll need [Ruby][]).\nOptions are the same as for `svm-train` or `liblinear-train`.\n\n```\n$ gem install rb-libsvm\n$ ruby libsvm-cm.rb public/example/data.train public/example/data.cm\n```\n\nor\n\n```\n$ gem install liblinear-ruby\n$ ruby liblinear-cm.rb public/example/data.train public/example/data.cm\n```\n\n### File formats\n\n#### `data.cm`\n\nFor reference, the confusion matrix file used here has the following format. Consider four\nclasses, `1`, `2`, `3` and `4`, with 6 training items each. Predictions are on the x-axis,\nactual classes are on the y-axis. First line and first column are headers.\nSums for each line and column are at right and bottom.\n\n    - 1 2 3 4 +\n    1 5 0 0 1 6\n    2 1 4 1 0 6\n    3 0 0 4 2 6\n    4 1 0 2 3 6\n    + 7 4 7 6 24\n\n#### `data.labels`\n\nConsists of class labels in numeric format and their human-readable representation.\n\n    1 Setosa\n    2 Versicolour\n    3 Virginica\n\n#### `data.model`\n\nThe header of this file consists of parameters, which are shown as summary. A line\ncontaining `SV` indicates the last line. A LIBSVM model file follows this format,\nbut other software could generate this (without model data) to show parameters.\n\n#### `data.features`\n\nEach line of this file contains a training item, with an item id, true class\nand the predicted class; the remainder of the line is a text-representation\nof the item's features.\n\nFor example, the following line is for a training item with id 1337, has class\nnumber 5, the predicted class is 6, and the features are `guide` and `galaxy`\n\n    1337 5 6 guide galaxy\n\nIn this case, the algorithm is likely using a bag of words, so it makes sense\nto just list the words extracted from the training source data. This is likely\nto be different for other classification problems.\n\nThe `id` is there to link to the source data, so that you can see where feature extraction\nmay need to be improved. The placeholder `:id` in the `itemUrlTemplate` query parameter\nwill be substituted by this number for each item in the _Categories_ view.\n\n# Roadmap\n\n- include example data\n- allow loading of remote urls\n- allow browsing and loading of local files\n- add more metrics, also for each class\n\n# [License](LICENSE.md)\n\n[LIBSVM]: https://www.csie.ntu.edu.tw/~cjlin/libsvm/\n[LIBLINEAR]: https://www.csie.ntu.edu.tw/~cjlin/liblinear/\n[Confusion matrix]: https://en.wikipedia.org/wiki/Confusion_matrix\n[Node.js]: https://nodejs.org/\n[Ruby]: http://www.ruby-lang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq-m%2Fmlc-eval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fq-m%2Fmlc-eval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq-m%2Fmlc-eval/lists"}