Ray Han
10/27/2015
The Data comes from the UC Irvine Machine Learning Repository Web Page. For the Shiny app the user enters information about the computer and then the user gets a predicted CPU Performance Measure. UC Irvine has a leading CS department and there repository is large and comprehensive.
Here is the part of code which implements the algorithm
library(caret)
library(shiny)
library(UsingR)
#code outside gets run only once outside of function
CompHardware <- read.csv("w:/Ray/CompHardware.csv")
FittedModel <- glm(ERP~MYCT + MMIN + MMAX + CACH + CHMIN + CHMAX + PRP, data=CompHardware)
This is a generalized linear model. Other methods are available, but this was the simplest. The data set is multivariate and the associated tasks are regressions. So GLM is pretty good Algorithm to use.
library(png)
library(grid)
img <- readPNG("W:/Ray/figure1.png")
grid.raster(img)
A Plot to show that our algorithm the GLM is good Fit /published relative performance vs estimated relative performance
expect <- predict(FittedModel, data=CompHardware)
plot(CompHardware$ERP - expect)