A Guide to Machine Learning in R for Beginners : Part 4

We will also study in detail about Linear Regression with code in RFunction: A function is a relationship where each input number corresponds to one and only one output number.Model: A model is a formula where one variable (response or outcome variable) varies depending on one or more independent variables (covariates)..A model tries to establish a relationship among data points..One of the simplest models we can create is a Linear Model where we start with the assumption that the dependent variable varies linearly with the independent variable(s)..Creating a Linear Model involves a technique known as Linear Regression.Linear Model has a “constant” rate of change..An exponential Model has a “constant percent” rate of change.So, for example, if the population of a place, grows by 10 people per year(given the initial population as 100), it’s a linear growth and the model will be:P(t)=100+10tBut if a population grows by 10% each year(given the initial population as 100), its an exponential growth and the model will be:P(t)=100(1+10%)^tAnalytics: Analytics is the science of using data to build models that lead to better decisions for an individual, company or an organisation.Hypothesis:The hypothesis that states the expectation of a meaningful or statistically significant relationship between variables as the “research hypothesis”..The hypothesis that suggests that the relationship between variables is not strong enough, or the differences are not large enough, to be considered statistically significant, as the “null hypothesis”.Linear regression:Linear regression involves using data to calculate a line that best fits that data, and then using that line to predict scores on one variable from another..Prediction is simply the process of estimating scores of the outcome (or dependent) variable based on the scores of the predictor (or independent) variable..To generate the regression line, we look for a line of best fit..The best-fit line to be the one that minimises the sum of the squared distances from the observed data to the line..This method of fitting the data line so that there is minimal difference between the observations and the line is called the method of least squares.The line of best fit can be represented asSlope is the distance moved vertically/distance moved horizontally..Essentially, slope is the change in y if x increases by 1..So, slope defines the rate of change.. More details

Leave a Reply