Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Advanced Analytics with R and Tableau

You're reading from   Advanced Analytics with R and Tableau Advanced analytics using data classification, unsupervised learning and data visualization

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781786460110
Length 178 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Roberto Rösler Roberto Rösler
Author Profile Icon Roberto Rösler
Roberto Rösler
Ruben Oliva Ramos Ruben Oliva Ramos
Author Profile Icon Ruben Oliva Ramos
Ruben Oliva Ramos
Jen Stirrup Jen Stirrup
Author Profile Icon Jen Stirrup
Jen Stirrup
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Advanced Analytics with R and Tableau FREE CHAPTER 2. The Power of R 3. A Methodology for Advanced Analytics Using Tableau and R 4. Prediction with R and Tableau Using Regression 5. Classifying Data with Tableau 6. Advanced Analytics Using Clustering 7. Advanced Analytics with Unsupervised Learning 8. Interpreting Your Results for Your Audience Index

Building a simple decision system-based Bayesian theory


In this section, we build a simple decision system using Bayesian theory. A smart water system is a smart system that controls water. In general, you can see the system architecture in the following figure:

After using a sensing process on water to obtain the water quality, you can make a decision. If the water quality is good, we can transfer the water to customers. Otherwise, we purify the water.

To implement a decision system-based Bayesian theory, firstly we define the state of nature. In this case, we define two states of nature:

  • ω1: Water is ready for drinking

  • ω2: Water should be cleaned (kotor)

For inputs, we can declare x1 and x2 as negative and positive as the observation results. We define prior values and class conditional probabilities as follows:

To build a decision, we should make a loss function. The following is a loss function for our program:

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 $19.99/month. Cancel anytime