Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Practical Machine Learning Cookbook

You're reading from  Practical Machine Learning Cookbook

Product type Book
Published in Apr 2017
Publisher Packt
ISBN-13 9781785280511
Pages 570 pages
Edition 1st Edition
Languages
Author (1):
Atul Tripathi Atul Tripathi
Profile icon Atul Tripathi

Table of Contents (21) Chapters

Practical Machine Learning Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Introduction to Machine Learning 2. Classification 3. Clustering 4. Model Selection and Regularization 5. Nonlinearity 6. Supervised Learning 7. Unsupervised Learning 8. Reinforcement Learning 9. Structured Prediction 10. Neural Networks 11. Deep Learning 12. Case Study - Exploring World Bank Data 13. Case Study - Pricing Reinsurance Contracts 14. Case Study - Forecast of Electricity Consumption

Continuous Markov chains - vehicle service at a gas station


A gas station has a single pump. There is no space for vehicles to wait. If a vehicle arrives at the pump and there is no place the vehicle leaves without filling at the pump. Vehicles arrive at the gas station following a Poisson process with a rate of 3/20 vehicles per minute. Of the vehicles arriving at the pump, 75% are cars and 25% are motorcycles. The refueling time can be modeled with an exponential random variable with a mean of eight minutes for cars and three minutes for motorcycles.

Getting ready

In order to perform continuous Markov chains for vehicle service at a gas station we shall be simulating data.

How to do it...

Let's get into the details.

Step 1 - preparing the dataset

Load the following packages:

    > install.packages("simmer")
    > install.packages("ggplot2")
    > library(simmer)
    > library(ggplot2)

Note

Version info: Code for this page was tested in R version 3.2.2 (2015-08-14)

Initializing the...

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 £13.99/month. Cancel anytime}