O'Reilly logo

C# Machine Learning Projects by Yoon Hyup Hwang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logistic regression versus Naive Bayes for email spam filtering

We have come a long way to finally build our very first ML models in C#. In this section, we are going to train logistic regression and Naive Bayes classifiers to classify emails into spam and ham. We are going to run cross-validations with those two learning algorithms to estimate and get a better understanding of how our classification models will perform in practice. As discussed briefly in the previous chapter, in k-fold cross-validation, the training set is divided into k equally sized subsets and one of those k subsets is held out as a validation set, and the rest of the k-1 subsets are used to train a model. It then repeats this process k times, where different subsets ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required