Created
April 5, 2016 14:57
-
-
Save huberflores/c5ff756fe1ca97d84523401aabc7f79a to your computer and use it in GitHub Desktop.
Fitting data to a particular distribution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suppressMessages(library(fitdistrplus)) | |
suppressMessages(library(logspline)) | |
fileInput <- "/Users/hflores/Desktop/datasets/code-benchmarking/output70-t2large.csv" | |
codebenchmark = read.csv(fileInput, sep=";") | |
time <- codebenchmark$response | |
descdist(time, discrete = FALSE) | |
#weibull | |
fit.weibull <- fitdist(time, "weibull") | |
plot(fit.weibull) | |
fit.weibull$aic | |
#norm | |
fit.norm <- fitdist(time, "norm") | |
plot(fit.norm) | |
fit.norm$aic | |
#log normal | |
fit.lnorm <- fitdist(time, "lnorm") | |
plot(fit.lnorm) | |
fit.lnorm$aic | |
#exponential | |
fit.exp <- fitdist(time, "exp") | |
plot(fit.exp) | |
fit.exp$aic | |
#gamma | |
fit.gamma <- fitdist(time, "gamma") | |
plot(fit.gamma) | |
fit.gamma$aic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment