Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pritishsingla/nbsvm_sklearn
Scikit-learn style wrapper for the NBSVM algorithm for text classification
https://github.com/pritishsingla/nbsvm_sklearn
machine-learning nbsvm nbsvm-classifier nlp python scikit-learn text-classification
Last synced: 3 days ago
JSON representation
Scikit-learn style wrapper for the NBSVM algorithm for text classification
- Host: GitHub
- URL: https://github.com/pritishsingla/nbsvm_sklearn
- Owner: Pritishsingla
- License: mit
- Created: 2019-07-28T12:25:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T05:56:25.000Z (about 2 years ago)
- Last Synced: 2025-02-16T11:54:56.260Z (4 days ago)
- Topics: machine-learning, nbsvm, nbsvm-classifier, nlp, python, scikit-learn, text-classification
- Language: Python
- Size: 20.5 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nbsvm-sklearn
A Scikit-learn wrapper for the NBSVM algorithm. To read more about the same, go [here](https://www.aclweb.org/anthology/P12-2018)
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install nbsvm-sklearn.
```bash
pip install nbsvm-sklearn
```
Code has been tested on python>=3.6## Usage
```python
from nbsvm import NBSVMClassifierclf = NBSVMClassifier() # initialize the model
clf.fit(X, y) # train the classifier; y{0,1}
clf.predict(X) # get binary predictions```
Full Code documentation available [here](nbsvm/nbsvm.py)## Updates
Version 0.0.5: Added Platt-scaling
## Future Work
* Add support for multi-class classification
* Handle sparse matrices as inputs
* Handle ```pd.Series``` input format for labels## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.
## License
[MIT](https://choosealicense.com/licenses/mit/)