All Projects → n3integration → classifier

n3integration / classifier

Licence: Apache-2.0 license
A general purpose text classifier

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to classifier

grasp
Essential NLP & ML, short & fast pure Python code
Stars: ✭ 58 (+87.1%)
Mutual labels:  naive-bayes, k-nearest-neighbors
machine-learning
Python machine learning applications in image processing, recommender system, matrix completion, netflix problem and algorithm implementations including Co-clustering, Funk SVD, SVD++, Non-negative Matrix Factorization, Koren Neighborhood Model, Koren Integrated Model, Dawid-Skene, Platt-Burges, Expectation Maximization, Factor Analysis, ISTA, F…
Stars: ✭ 91 (+193.55%)
Mutual labels:  naive-bayes, k-nearest-neighbors
bayes
naive bayes in php
Stars: ✭ 61 (+96.77%)
Mutual labels:  naive-bayes
Machine Learning With Python
Practice and tutorial-style notebooks covering wide variety of machine learning techniques
Stars: ✭ 2,197 (+6987.1%)
Mutual labels:  naive-bayes
Dat8
General Assembly's 2015 Data Science course in Washington, DC
Stars: ✭ 1,516 (+4790.32%)
Mutual labels:  naive-bayes
H2o 3
H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
Stars: ✭ 5,656 (+18145.16%)
Mutual labels:  naive-bayes
idnaive
🧠 A Simple Node.js Naive Bayes Library.
Stars: ✭ 26 (-16.13%)
Mutual labels:  naive-bayes
ml
经典机器学习算法的极简实现
Stars: ✭ 130 (+319.35%)
Mutual labels:  naive-bayes
Amazon-Fine-Food-Review
Machine learning algorithm such as KNN,Naive Bayes,Logistic Regression,SVM,Decision Trees,Random Forest,k means and Truncated SVD on amazon fine food review
Stars: ✭ 28 (-9.68%)
Mutual labels:  naive-bayes
sjm
Sancho McCann's PhD Thesis Research Code
Stars: ✭ 24 (-22.58%)
Mutual labels:  naive-bayes
scoruby
Ruby Scoring API for PMML
Stars: ✭ 69 (+122.58%)
Mutual labels:  naive-bayes
text-classification-cn
中文文本分类实践,基于搜狗新闻语料库,采用传统机器学习方法以及预训练模型等方法
Stars: ✭ 81 (+161.29%)
Mutual labels:  naive-bayes
sentiment-analysis-using-python
Large Data Analysis Course Project
Stars: ✭ 23 (-25.81%)
Mutual labels:  naive-bayes
GaussianNB
Gaussian Naive Bayes (GaussianNB) classifier
Stars: ✭ 17 (-45.16%)
Mutual labels:  naive-bayes
20-newsgroups text-classification
"20 newsgroups" dataset - Text Classification using Multinomial Naive Bayes in Python.
Stars: ✭ 41 (+32.26%)
Mutual labels:  naive-bayes
Machine-Learning-Models
In This repository I made some simple to complex methods in machine learning. Here I try to build template style code.
Stars: ✭ 30 (-3.23%)
Mutual labels:  naive-bayes
Heart disease prediction
Heart Disease prediction using 5 algorithms
Stars: ✭ 43 (+38.71%)
Mutual labels:  naive-bayes

classifier

General purpose text classifier (naïve bayes, k-nearest neighbors)

codecov Go Report Card Documentation

Installation

go get github.com/n3integration/classifier

Usage

Classification

There are two methods of classifying text data: io.Reader or string. To classify strings, use the TrainString or ClassifyString functions. To classify larger sources, use the Train and Classify functions that take an io.Reader as input.

package main

import (
	"fmt"
	
	"github.com/n3integration/classifier/naive"
)

func main() {
    classifier := naive.New()
    classifier.TrainString("The quick brown fox jumped over the lazy dog", "ham")
    classifier.TrainString("Earn a degree online", "ham")
    classifier.TrainString("Earn cash quick online", "spam")
    
    if classification, err := classifier.ClassifyString("Earn your masters degree online"); err == nil {
        fmt.Println("Classification => ", classification) // ham
    } else {
        fmt.Println("error: ", err)
    }	
}

Contributing

  • Fork the repository
  • Create a local feature branch
  • Run gofmt
  • Bump the VERSION file using semantic versioning
  • Submit a pull request

License

Copyright 2023 [email protected]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].