{"id":25126191,"url":"https://github.com/cmry/omesa","last_synced_at":"2025-04-23T07:15:29.285Z","repository":{"id":57448587,"uuid":"42242637","full_name":"cmry/omesa","owner":"cmry","description":"Experiment, Storage and Visualization Framework for Machine Learning research.","archived":false,"fork":false,"pushed_at":"2021-05-19T13:19:05.000Z","size":33571,"stargazers_count":31,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-23T07:15:19.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmry.png","metadata":{"files":{"readme":"README.rst","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":"2015-09-10T12:18:20.000Z","updated_at":"2023-10-25T01:10:46.000Z","dependencies_parsed_at":"2022-09-16T13:50:49.437Z","dependency_job_id":null,"html_url":"https://github.com/cmry/omesa","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/cmry%2Fomesa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmry%2Fomesa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmry%2Fomesa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmry%2Fomesa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmry","download_url":"https://codeload.github.com/cmry/omesa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250386840,"owners_count":21422040,"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":[],"created_at":"2025-02-08T09:19:23.736Z","updated_at":"2025-04-23T07:15:29.265Z","avatar_url":"https://github.com/cmry.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Omesa\n=====\n\n.. image:: https://travis-ci.org/cmry/omesa.svg?branch=master\n    :target: https://travis-ci.org/cmry/omesa\n    :alt: Travis-CI\n\n.. image:: https://readthedocs.org/projects/omesa/badge/?version=latest\n    :target: http://omesa.readthedocs.org/en/latest/?badge=latest\n    :alt: Docs\n\n.. image:: https://landscape.io/github/cmry/omesa/master/landscape.svg?style=flat\n    :target: https://landscape.io/github/cmry/omesa/master\n    :alt: Landscape\n\n.. image:: https://img.shields.io/badge/python-3.5-blue.svg\n    :alt: Python 3.4\n\n.. _scikit-learn: http://scikit-learn.org/stable/\n.. _readthedocs: http://omesa.readthedocs.org/\n\nA small framework for easily deployable, reproducible machine learning research that largely builds\non top the scikit-learn_ API. Its goal is to make common research procedures templated, optimized,\nand well recorded. To this end it features:\n\n- Flexible wrappers to plug in your tools and features of choice.\n- Sparse and multi-threaded pipeline through hashing and pooling - from data to feature space.\n- Storage of all settings and fitted parts of the entire experiment, promoting reproducibility.\n- Dump an easily deployable version of the final model for plug-and-play demos.\n- Visual overview in an web-environment for comparison and intepretation of experiments.\n\nRead the documentation at readthedocs_.\n\nImportant Note\n''''''''''''''\n\nThis repository is currently in alpha development, and is therefore not stable.\n\nWhy use Omesa?\n''''''''''''''\n\nOmesa can be used in various scenarios:\n\n- As an end-to-end template-to-results framework.\n- As several fast classes to aid your machine learning workflow.\n- As a storage and overview for your experiments.\n\nAs such, you can vary between restricted options and little code, and many options (thus more code)\nthat require some restricted storage format. Either way, Omesa aids in structuring and comparing\nexperiments.\n\nFront-end Preview\n'''''''''''''''''''\n\n.. _dev: https://github.com/cmry/omesa/tree/dev\n.. _lime: https://github.com/marcotcr/lime\n\nThe front-end provides visualization and comparison of model performance. Currently only the\n'Results' section works, preview below:\n\n.. image:: https://onyx.uvt.nl/toku/static/omesa.png\n    :alt: Front\n\n.. image:: https://onyx.uvt.nl/toku/static/omesa_prop.png\n    :alt: Front Prop\n\nTo test, do the following:\n\n.. code-block:: shell\n\n    $ cd /dir/to/omesa/examples\n    $ python3 n_gram.py\n    $ cd ../front\n    $ python3 ./app.wsgi\n\nAnd follow the ``localhost`` link that is shown to access the web app. Please\nnote that this part can be quite unstable. Bug reports are welcome.\n\n\nDependencies\n''''''''''''\n\n.. _Frog: https://languagemachines.github.io/frog/\n.. _LaMachine: https://proycon.github.io/LaMachine/\n.. _spaCy: https://spacy.io/\n\nOmesa currently heavily relies on ``numpy``, ``scipy`` and ``sklearn``. To use\nFrog_ as a Dutch back-end, we strongly recommend using LaMachine_. For\nEnglish, there is a spaCy_ wrapper available.\n\nOmesa Only - End-To-End In 2 Minutes\n------------------------------------\n\nWith the end-to-end ``Experiment`` pipeline and a configuration dictionary,\nseveral experiments or set-ups can be ran and evaluated with a very minimal\npiece of code. One of the test examples provided is that of n-gram\nclassification of Wikipedia documents. In this experiment, we are provided with\na toy set n_gram.csv that features 10 articles about Machine Learning, and 10\nrandom other articles. To run the experiment, the following configuration is used:\n\nExample\n'''''''\n\n.. _`n-gram classification`: https://github.com/cmry/omesa/blob/master/examples/n_gram.py\n.. _`n_gram.csv`: https://github.com/cmry/omesa/blob/master/examples/n_gram.csv\n\nWith the end-to-end ``Experiment`` pipeline and a configuration dictionary,\nseveral experiments or set-ups can be ran and evaluated with a very minimal\npiece of code. One of the test examples provided is that of `n-gram classification`_\nof Wikipedia documents. In this experiment, we are provided with a toy set\n`n_gram.csv`_ that features 10 articles about Machine Learning, and 10 random\nother articles. To run the experiment, the following configuration is used:\n\n.. code-block:: python\n\n        from omesa.experiment import Experiment\n        from omesa.featurizer import Ngrams\n        from omesa.containers import Pipe\n        from omesa.components import Vectorizer, Evaluator\n        from sklearn.naive_bayes import MultinomialNB\n\n    Experiment(\n        project=\"unit_tests\",\n        name=\"20_news_grams\",\n        data=[CSV(\"n_gram.csv\", data=\"intro\", label=\"label\")],\n        pipeline=[\n            Vectorizer(\n                features=[\n                    Ngrams(level='char', n_list=[3])\n                ]),\n            Pipe('clf', MultinomialNB()),\n            Evaluator(scoring='f1', average='micro',\n                      lime_docs=CSV(\"n_gram.csv\", data=\"intro\", label=\"label\")),\n        ],\n        save=(\"model\", \"db\")\n    )\n\nThis will cross validate performance on the ``.csv``, selecting text\nand label columns and indicating a header is present in the ``.csv`` document.\nWe provide the ``Ngrams`` function and parameters to be used as features, and\nstore the log.\n\nOutput\n''''''\n\nThe log file will be printed during run time, as well as stored in the\nscript's directory. A sample from the output of the current experiment is as\nfollows:\n\n.. code-block:: shell\n\n    ---- Omesa ----\n\n     Config:\n\n            feature:   char_ngram\n            n_list:    [3]\n\n    \tname: gram_experiment\n    \tseed: 42\n\n     Sparse train shape: (20, 1301)\n\n     Performance on test set:\n\n                 precision    recall  f1-score   support\n\n             DF       0.83      0.50      0.62        10\n             ML       0.64      0.90      0.75        10\n\n    avg / total       0.74      0.70      0.69        20\n\n\n     Experiment took 0.2 seconds\n\n    ----------\n\nAdding own Features\n-------------------\n\nHere's an example of the most minimum word frequency feature class:\n\n.. code-block:: python\n\n    class SomeFeaturizer(object):\n\n        def __init__(self, some_params):\n            \"\"\"Set parameters for SomeFeaturizer.\"\"\"\n            self.name = 'hookname'\n            self.some_params = some_params\n\n        def transform(self, raw, parse):\n            \"\"\"Return a dictionary of feature values.\"\"\"\n            return Counter([x for x in raw])\n\nThis returns a ``{word: frequency}`` dict per instance that can easily be\ntransformed into a sparse matrix.\n\nAcknowledgements\n----------------\n\n.. _AMiCA: http://www.amicaproject.be/\n\nPart of the work on Omesa was carried out in the context of the\nAMiCA_ (IWT SBO-project 120007) project, funded by the government agency for\nInnovation by Science and Technology (IWT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmry%2Fomesa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmry%2Fomesa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmry%2Fomesa/lists"}