Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Machine Learning with Scala Quick Start Guide

You're reading from  Machine Learning with Scala Quick Start Guide

Product type Book
Published in Apr 2019
Publisher Packt
ISBN-13 9781789345070
Pages 220 pages
Edition 1st Edition
Languages
Authors (2):
Md. Rezaul Karim Md. Rezaul Karim
Profile icon Md. Rezaul Karim
Ajay Kumar N Ajay Kumar N
Profile icon Ajay Kumar N
View More author details

Table of Contents (9) Chapters

Preface Introduction to Machine Learning with Scala Scala for Regression Analysis Scala for Learning Classification Scala for Tree-Based Ensemble Techniques Scala for Dimensionality Reduction and Clustering Scala for Recommender System Introduction to Deep Learning with Scala Other Books You May Enjoy

NB for churn prediction

The NB classifier is based on Bayes' theorem, with the following assumptions:

  • Independence between every pair of features
  • Feature values are non-negative, such as counts

For example, if cancer is related to age, this can be used to assess the probability that a patient might have cancer. Bayes' theorem is stated mathematically as follows:

In the preceding equation, A and B are events with P (B) ≠ 0. The other terms can be described as follows:

  • P (A | B) is called the posterior or the conditional probability of observing event A, given that B is true
  • P (B| A) is the likelihood of event B given that A is true
  • P(A) is the prior and P(B) is the prior probability, also called marginal likelihood or marginal probability

Gaussian NB is a generalized version of NB that's used for classification, which is based on the binomial distribution...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}