{"id":19463080,"url":"https://github.com/aajanki/sequence-classification","last_synced_at":"2026-03-17T04:38:23.986Z","repository":{"id":138589678,"uuid":"117444085","full_name":"aajanki/sequence-classification","owner":"aajanki","description":"Scikit-learn compatible sequence classifier","archived":false,"fork":false,"pushed_at":"2018-02-15T19:35:34.000Z","size":29,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-25T08:43:30.112Z","etag":null,"topics":["machine-learning","scikit-learn","sequence-classification"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aajanki.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,"zenodo":null}},"created_at":"2018-01-14T15:53:16.000Z","updated_at":"2023-08-31T13:39:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dfaa9c4-11b5-467c-889f-ad2d688b489e","html_url":"https://github.com/aajanki/sequence-classification","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aajanki/sequence-classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aajanki%2Fsequence-classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aajanki%2Fsequence-classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aajanki%2Fsequence-classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aajanki%2Fsequence-classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aajanki","download_url":"https://codeload.github.com/aajanki/sequence-classification/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aajanki%2Fsequence-classification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30610267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-16T23:44:20.790Z","status":"online","status_checked_at":"2026-03-17T02:00:07.764Z","response_time":56,"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":["machine-learning","scikit-learn","sequence-classification"],"created_at":"2024-11-10T18:08:11.689Z","updated_at":"2026-03-17T04:38:23.980Z","avatar_url":"https://github.com/aajanki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sequence classifier with a scikit-learn interface\n\n[![Build Status](https://travis-ci.org/aajanki/sequence-classification.svg?branch=master)](https://travis-ci.org/aajanki/sequence-classification)\n[![PyPI version](https://badge.fury.io/py/sklearn-sequence-classifiers.svg)](https://badge.fury.io/py/sklearn-sequence-classifiers)\n[![Sponsored](https://img.shields.io/badge/chilicorn-sponsored-brightgreen.svg)](http://spiceprogram.org/oss-sponsorship/)\n\nConvolutional neural network sequence classifier in the spirit of [`[1]`](#references). Wraps a Keras implementation as a scikit-learn classifier.\n\n## Software requirements\n\n* Python (2.7 or \u003e= 3.5)\n* scikit-learn (tested on 0.19)\n* Keras (tested on 2.0.5, with the Theano 0.9.0 backend)\n\n## Installation\n\n[Install Keras](https://keras.io/#installation). This has been tested on the Theano backend, should work on other backends, too.\n\n```\npip3 install --user sklearn-sequence-classifiers\n```\n\nInstalling from the source code:\n\n```\ngit clone git@github.com:aajanki/sequence-classification.git\ncd sequence-classification\npython3 setup.py install --user\n```\n\n## Running tests\n\n```\npython3 setup.py test\n```\n\n## Usage example\n\nPredicting IMDB review sentiments.\n\n```python\nfrom keras.datasets import imdb\nfrom keras.preprocessing import sequence\nfrom sequence_classifiers import CNNSequenceClassifier\n\nmaxlen = 400\n(x_train, y_train), (x_test, y_test) = imdb.load_data(num_words=5000)\nx_train = sequence.pad_sequences(x_train, maxlen=maxlen)\nx_test = sequence.pad_sequences(x_test, maxlen=maxlen)\n\nclf = CNNSequenceClassifier(epochs=2)\nclf.fit(x_train, y_train)\nprint(clf.score(x_test, y_test))\n```\n\n## License\n\nBSD\n\n## References\n\n[1] Yoon Kim: [Convolutional Neural Networks for Sentence Classification](https://arxiv.org/abs/1408.5882)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faajanki%2Fsequence-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faajanki%2Fsequence-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faajanki%2Fsequence-classification/lists"}