Machine Learning with R, 2/e (Paperback)

Brett Lantz



Key Features

  • Harness the power of R for statistical computing and data science
  • Explore, forecast, and classify data with R
  • Use R to apply common machine learning algorithms to real-world scenarios

Book Description

Machine learning, at its core, is concerned with transforming data into actionable knowledge. This makes machine learning well suited to the present-day era of big data. Given the growing prominence of R—a cross-platform, zero-cost statistical programming environment—there has never been a better time to start applying machine learning to your data. Whether you are new to data analytics or a veteran, machine learning with R offers a powerful set of methods to quickly and easily gain insights from your data.

Want to turn your data into actionable knowledge, predict outcomes that make real impact, and have constantly developing insights? R gives you access to the cutting-edge power you need to master exceptional machine learning techniques.

Updated and upgraded to the latest libraries and most modern thinking, the second edition of Machine Learning with R provides you with a rigorous introduction to this essential skill of professional data science. Without shying away from technical theory, it is written to provide focused and practical knowledge to get you building algorithms and crunching your data, with minimal previous experience.

With this book you’ll discover all the analytical tools you need to gain insights from complex data and learn how to to choose the correct algorithm for your specific needs. Through full engagement with the sort of real-world problems data-wranglers face, you’ll learn to apply machine learning methods to deal with common tasks, including classification, prediction, forecasting, market analysis, and clustering. Transform the way you think about data; discover machine learning with R.

What you will learn

  • Harness the power of R to build common machine learning algorithms with real-world data science applications
  • Get to grips with R techniques to clean and prepare your data for analysis, and visualize your results
  • Discover the different types of machine learning models and learn which is best to meet your data needs and solve your analysis problems
  • Classify your data with Bayesian and nearest neighbour methods
  • Predict values by using R to build decision trees, rules, and support vector machines
  • Forecast numeric values with linear regression, and model your data with neural networks
  • Evaluate and improve the performance of machine learning models
  • Learn specialized machine learning techniques for text mining, social network data, big data, and more

About the Author

Brett Lantz has used innovative data methods to understand human behavior for more than 10 years. A sociologist by training, he was first enchanted by machine learning while studying a large database of teenagers' social networking website profiles. Since then, he has worked on the interdisciplinary studies of cellular telephone calls, medical billing data, and philanthropic activity, among others.

Table of Contents

  1. Introducing Machine Learning
  2. Managing and Understanding Data
  3. Lazy Learning – Classification Using Nearest Neighbors
  4. Probabilistic Learning – Classification Using Naive Bayes
  5. Divide and Conquer – Classification Using Decision Trees and Rules
  6. Forecasting Numeric Data – Regression Methods
  7. Black Box Methods – Neural Networks and Support Vector Machines
  8. Finding Patterns – Market Basket Analysis Using Association Rules
  9. Finding Groups of Data – Clustering with K-means
  10. Evaluating Model Performance
  11. Improving Model Performance
  12. Specialized Machine Learning Topics



  • 利用 R 進行統計計算和數據科學

  • 使用 R 探索、預測和分類數據

  • 使用 R 將常見的機器學習算法應用於現實世界情境


機器學習的核心是將數據轉化為可行的知識。這使得機器學習非常適合當今大數據時代。鑑於跨平台、零成本的統計編程環境 R 的日益重要,現在是開始將機器學習應用於數據的最佳時機。無論您是數據分析的新手還是老手,使用 R 進行機器學習提供了一套強大的方法,可以快速輕鬆地從數據中獲取洞察。

想要將數據轉化為可行的知識、預測具有實際影響的結果並不斷發展洞察力嗎?R 為您提供了所需的尖端能力,讓您掌握卓越的機器學習技術。

第二版的《使用 R 進行機器學習》已更新並升級到最新的庫和最現代的思維,為您提供了對這一專業數據科學必備技能的嚴謹介紹。本書不回避技術理論,而是旨在提供專注且實用的知識,讓您能夠在最少的先前經驗下構建算法並分析數據。

通過全面參與數據處理人員面臨的現實世界問題,您將學習應用機器學習方法來處理常見任務,包括分類、預測、預測、市場分析和聚類。改變您對數據的思考方式,發現使用 R 的機器學習。


  • 利用 R 的強大功能,構建具有現實世界數據科學應用的常見機器學習算法

  • 掌握 R 技術,清理和準備數據進行分析,並可視化結果

  • 了解不同類型的機器學習模型,並學習選擇最適合您的數據需求和解決分析問題的模型

  • 使用貝葉斯和最近鄰方法對數據進行分類

  • 使用 R 構建決策樹、規則和支持向量機來預測數值

  • 使用線性回歸預測數值,並使用神經網絡對數據進行建模

  • 評估和改進機器學習模型的性能

  • 學習用於文本挖掘、社交網絡數據、大數據等的專業機器學習技術


Brett Lantz 使用創新的數據方法研究人類行為已有超過10年。作為一名社會學家,他在研究一個大型的青少年社交網絡網站個人資料數據庫時,首次對機器學習產生了興趣。從那時起,他一直致力於跨學科研究,包括手機通話、醫療帳單數據和慈善活動等領域。


  1. 介紹機器學習

  2. 管理和理解數據

  3. 懶惰學習 - 使用最近鄰方法進行分類

  4. 概率學習 - 使用朴素貝葉斯進行分類

  5. 分而治之 - 使用決策樹和規則進行分類

  6. 預測數值數據 - 回歸方法

  7. 黑盒方法 - 神經網絡和支持向量機

  8. 尋找模式 - 市場籃分析