Machine Learning With R

Machine Learning With R

Kumar Abhishek Gaurav (Dayananda Sagar University, India) and Ladly Patel (Dayananda Sagar University, India)
Copyright: © 2020 |Pages: 41
DOI: 10.4018/978-1-7998-2718-4.ch015


In this chapter, the author explained the importance of the R language in machine learning and steps to the installation of R in a different environment like Windows and Linux. The author also describes the basic concepts of R like its syntax, data types, variables, function, operator, etc. with examples in detail. In advanced R, the author explained different charts to plot different data using a barplot function. Using barplot, different graphs like histograms, pie charts can be drawn. The author has also shown how to label the axis of the graph and how to plot a different color. The chapter also consists of some basic R programming examples like a program to make a calculator, checking Armstrong's number, etc. The author also describes the steps and process to install tensor flow.
Chapter Preview


The machine learning term was first used by Arthur Samuel in 1959. Machine learning is a subunit of artificial intelligence that deals with machine learning from learned experience, and then based on the experience, it will predict the given output. Machine learning also reduced the task of programming explicitly for a given task, which used to be done in the traditional programming area. The machine is trained in such a way by designing the algorithm or program in such a way that the machine can itself start learning when liable to new data. For getting the correct output, it is necessary to train the machine with a huge number of data and correct data. For example, predicting whether a person will have diabetes or not based on data such as glucose level, weight, etc. There are mainly three types of machine learning algorithms, and they have supervised learning, unsupervised learning, and Reinforcement learning(LaurentGatto,(2019). In Supervised learning, both input and output are given in the data, and the machine learns itself from the data by observing the data and predicting the result if the given input the machine encounter again. In Unsupervised learning, only input data is present and no output; this leads to machine learn itself from the data and then find patterns or similarity to predict the output for a given result. In Reinforcement learning, the system interacts with the environment, and based on the condition, gives the output. This chapter explains the basics of R language with syntax, data types, looping statements, and all concepts are explained with given examples to make the concept clearer and easier for the reader to understand. It also describes clearly the concepts of R and the different installation steps in different environments and the importance of R in machine learning. It also shows how the raw data can be represented in graphical form using R like a pie chart, histogram, etc. using plot function. In this chapter, the author also explained about issues of the R language with machine learning and provided the solution to solve the issue. The author has also discussed the installation steps of tensor flow both for Linux and Windows systems. A small example is also given to show the method to run an R program in the tensor flow framework. The author has also discussed future work and research, which will be done on the R language. The research work also contains information about the application of R in machine learning.

What is R?

R is an open-source programming language written to reduce the hardship done for the graphics and statistical computation. It helped the data miners in analyzing the data statistically. In this book chapter, you will learn the procedure to install R, fundamentals of R, which goes till advance topics of R along with suitable examples that will help readers to understand the topics in a precise way.



How R Evolved?

Development of R began at the Department of Statistics at the University of Auckland in the year 1993, by Ross Ihaka and Robert Gentleman. There were many contributors globally who joined the development by sending the bug reports and modified code.

Why R in Machine Learning?

As the following features of R play an important role in statistics programming, R is the first choice among data scientists. Because of R’s effective features, it is supported by many contributors and is being introduced as a regular course in well-known universities; it has gained corporate importance where it is actively a part of business applications.

  • R being easy to learn programming language supports recursion conditional statements, looping statements along with input-output.

  • R supports a variety of packages which helps in increasing its performance over other supported languages such as ‘Net’ makes it fast by allowing it to model neural networks, ‘Carnet’ helps in allowing R to create predictive models for machine learning.

  • R supports a set of operators, which helps in calculating matrices by using the reserved word ‘matrix,’ arrays lists, etc.

  • R offers a wide range of tools developed to help data scientists in analyzing the data, building statistical models.

  • R has the capability to represent the analyzed data graphically and further generated it on paper or screen.

Complete Chapter List

Search this Book: