User Tools

Site Tools


fitting_and_plotting_polynomial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
fitting_and_plotting_polynomial [2015/08/29 20:43]
vincenzo
fitting_and_plotting_polynomial [2015/08/29 20:43] (current)
vincenzo
Line 2: Line 2:
 data <- read.csv('​../​B_data.csv'​) data <- read.csv('​../​B_data.csv'​)
  
-# second order prediction - fit a factor of the same lenght of the vector 
 factor <- 1:200 factor <- 1:200
 plot(factor,​data$commits) plot(factor,​data$commits)
 lines(predict(lm(data$commits~factor+I(factor^2))),​col="​red"​) lines(predict(lm(data$commits~factor+I(factor^2))),​col="​red"​)
 </​code>​ </​code>​
fitting_and_plotting_polynomial.txt ยท Last modified: 2015/08/29 20:43 by vincenzo