cars <- mtcars
cars$l100km <- cars$mpg*2.35214583/100
plot(cars$mpg ~ cars$l100km)
cars$l100km <- cars$mpg*2.35214583/10
plot(cars$mpg ~ cars$l100km)
cars$l100km <- 235.214583/cars$mpg
# Visualize the relationship between mpg and l/100km
plot(cars$mpg ~ cars$l100km)
help(norm)
source('~/.active-rstudio-document')
source('~/.active-rstudio-document')
source('~/.active-rstudio-document', echo=TRUE)
source('~/.active-rstudio-document', echo=TRUE)
source('~/.active-rstudio-document', echo=TRUE)
plot(c(s1, s2))
plot(sort(c(s1, s2))
)
plot(density(c(s1, s2)))
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
iris
view(iris)
View(iris)
help(kmeans)
kmeans(c(iris$Petal.Length, iris$Petal.Width), 2)
cl = kmeans(c(iris$Petal.Length, iris$Petal.Width), 2)
s1 <- rnorm(100, mean=0.0, sd=1.0)
s2 <- rnorm(100, mean=0.5, sd=1.0)
s3 <- rnorm( 10, mean=0.5, sd=1.0)
plot(density(s1))
plot(density(s2))
plot(density(s3))
plot(density(c(s1, s2)))
plot(density(c(s1, s3)))
t.test(s1, s2)
t.test(s1, s3)
k <- 2
data <- c(iris$Petal.Length. iris$Petal.Width)
cl <- kmeans(data,k)
plot(data, col = cl$cluster)
source('~/.active-rstudio-document', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
library("ppl")
install.package("ppl")
library("ppls")
install.packages("ppls")
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
normalize.vector(data)
help(normalize.vector)
data <- normalize.vector(c(iris$Petal.Length), iris$Petal.Width))
source('~/.active-rstudio-document', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
source('~/.active-rstudio-document', echo=TRUE)
data <- c(normalize.vector(iris$Petal.Length)), normalize.vector(iris$Petal.Width))
data <- c(normalize.vector(iris$Petal.Length), normalize.vector(iris$Petal.Width))
source('~/.active-rstudio-document', echo=TRUE)
source('C:/workspaces/DataScienceExercise/Exercises/r-scripts/exercise02.R', echo=TRUE)
cuse <- read.table("http://data.princeton.edu/wws509/datasets/cuse.dat", header=TRUE)
install.packages('arules')
install.packages('arulesViz')
library('arules')
library ('arulesViz')
#read in the transactions
associationData <- read.transactions("http://user.informatik.uni-goettingen.de/~sherbold/AssociationRules.csv",rm.duplicates = FALSE,format="basket",sep=" ")
#mine rules
rules <- apriori(associationData, parameter=list(support=0.05, confidence=0.5))
#create a scatter plot
inspect(rules)
plot(rules)
plot(rules, interactive=TRUE)
plot(rules)
plot(rules, interactive=TRUE)
plot(rules)
plot(rules, interactive=TRUE)
cuse <- read.table("http://data.princeton.edu/wws509/datasets/cuse.dat", header=TRUE)
View(cuse)
help(glm)
cuse <- read.table("http://data.princeton.edu/wws509/datasets/cuse.dat", header=TRUE)
lrfit <- glm( cbind(using, notUsing) ~ age + education + wantsMore , family = binomial(logit), data=cuse)
summary(lrfit)
associationData <- read.transactions("http://user.informatik.uni-goettingen.de/~sherbold/AssociationRules.csv",rm.duplicates = FALSE,format="basket",sep=" ")
#mine rules
rules <- apriori(associationData, parameter=list(support=0.05, confidence=0.5))
#create a scatter plot
inspect(rules)
plot(rules)
plot(rules, interactive=TRUE)
rules <- apriori(associationData, parameter=list(support=0.05, confidence=0.3))
#create a scatter plot
inspect(rules)
plot(rules)
plot(rules, interactive=TRUE)
help(rnorm)
val1 = rnorm(100, mean=1, )
val1 = rnorm(100, mean=1, sd=2)
val2 = rnorm(100, mean=2, sd=1)
plot(density(val1, val2))
vals = c(val1, val2)
plot(density(vals))
plot(density(c(rnorm(100, mean=3, sd=1), rnorm(100, mean=5, sd=3))))
plot(density(c(rnorm(100, mean=3, sd=1), rnorm(100, mean=5, sd=3))))
plot(density(c(rnorm(100, mean=3, sd=1), rnorm(100, mean=5, sd=3))))
plot(density(c(rnorm(100, mean=3, sd=1), rnorm(100, mean=5, sd=3))))
plot(density(c(rnorm(100, mean=3, sd=1), rnorm(100, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=1), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=5, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=3))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=2))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=2))))
plot(density(c(rnorm(1000, mean=3, sd=2), rnorm(1000, mean=7, sd=2))))
plot(density(c(rnorm(1000, mean=3, sd=1.5), rnorm(1000, mean=7, sd=2))))
plot(density(c(rnorm(1000, mean=3, sd=1.5), rnorm(1000, mean=7, sd=2))))
plot(density(c(rnorm(1000, mean=3, sd=1.5), rnorm(1000, mean=7, sd=2))), main="", ylab="",xlab="")
plot(density(c(rnorm(1000, mean=3, sd=1.5), rnorm(1000, mean=7, sd=2))), main="", ylab="",xlab="")
plot(density(c(rnorm(1000, mean=3, sd=1.5), rnorm(1000, mean=7, sd=2))), main="", ylab="",xlab="")
plot(density(c(rnorm(1000, mean=3, sd=1.5), rnorm(1000, mean=7, sd=2))), main="", ylab="",xlab="")
plot(density(exp(rnorm(100))))
plot(density(exp(rnorm(100))), main="", ylab="", xlab="")
dat <- c(0.1, 0.5)*1..100
1..100
dat <- c(0.1, 0.5)*1:100
rbind(0.1*1:100, 0.5*1:100)
dat <- rbind(0.1*1:100, 0.5*1:100)
View(dat)
dat <- rbind(0.1*1:100+200, 0.5*1:100+65)
plot(dat)
plot(dat[,1])
View(dat)
dat <- rbind(0.1*1:200+200, 0.5*1:200+65)
View(dat)
dat <- rbind(0.1*1:1000+200, 0.5*1:1000+65)
View(dat)
dummy <- "hello world"
dummy
dummy
setwd("C:/workspaces/DefectPrediction/cpdp-experiments/exp-java/data/ant")
metrics = read.csv("ant-1.3.csv", head=TRUE)
metrics = metrics[, 4:ncol(metrics)]
normalize <- function(x) {
return((x-min(x))/(max(x)-min(x)))
}
for( i in 1:ncol(metrics) ) {
metrics[,i] <- normalize(metrics[,i])
}
calcT <- function(values) {
return((mean(values)-min(values))/sd(values))
}
setwd("C:/workspaces/DefectPrediction/cpdp-experiments/exp-java/data/ant")
metrics = read.csv("ant-1.3.csv", head=TRUE)
metrics = metrics[, 4:ncol(metrics)]
dummy <- "foo"
normalize <- function(x) {
return((x-min(x))/(max(x)-min(x)))
}
for( i in 1:ncol(metrics) ) {
metrics[,i] <- normalize(metrics[,i])
}
calcT <- function(values) {
return((mean(values)-min(values))/sd(values))
}
source('~/.active-rstudio-document', echo=TRUE)
source('~/.active-rstudio-document', echo=TRUE)
dummy <- "hello world"
dummy <- "hello world"
View(metrics)
library("arulesViz", lib.loc="C:/Users/sherbold/Documents/R/win-library/3.0")
help(plot)
plot(1:10)
plot(1:10, 2:11)
