search for: traincolnum

Displaying 8 results from an estimated 8 matches for "traincolnum".

2020 Oct 23
5
How to shade area between lines in ggplot2
...) df = data.frame(x = c(x1,x2), y=c(y1,y2), z=c(rep(0, length(x1)), rep(1, length(x2)))) df$z = factor(c(rep(0, length(x1)), rep(1, length(x2)))) df[, "train"] <- ifelse(runif(nrow(df)) < 0.8, 1, 0) trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] trainColNum <- grep("train", names(df)) trainset <- trainset[, -trainColNum] testset <- testset[, -trainColNum] head(trainset); str(df) svm_model<- svm(z ~ ., data = trainset, type = "C-classification", kernel = "linear"...
2020 Oct 23
0
How to shade area between lines in ggplot2
...me(x = c(x1,x2), y=c(y1,y2), > z=c(rep(0, length(x1)), rep(1, length(x2)))) df$z = factor(c(rep(0, > length(x1)), rep(1, length(x2)))) df[, "train"] <- ifelse(runif(nrow(df)) < 0.8, 1, 0) > trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] trainColNum <- > grep("train", names(df)) trainset <- trainset[, -trainColNum] testset <- testset[, > -trainColNum] head(trainset); str(df) > > svm_model<- svm(z ~ ., > data = trainset, > type = "C-classification", >...
2020 Oct 27
3
R for-loop to add layer to lattice plot
...frame(x = c(x1,x2), y=c(y1,y2), z=c(rep(0, length(x1)), rep(1, length(x2)))) df$z = factor(c(rep(0, length(x1)), rep(1, length(x2)))) df[, "train"] <- ifelse(runif(nrow(df)) < 0.8, 1, 0) trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] trainColNum <- grep("train", names(df)) trainset <- trainset[, -trainColNum] testset <- testset[, -trainColNum] svm_model <- svm(z ~ ., data = trainset, type = "C-classification", kernel = "linear",...
2020 Oct 23
2
How to shade area between lines in ggplot2
...2), > > z=c(rep(0, length(x1)), rep(1, length(x2)))) df$z = > factor(c(rep(0, > > length(x1)), rep(1, length(x2)))) df[, "train"] <- ifelse(runif(nrow(df)) > < 0.8, 1, 0) > > trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] trainColNum > <- > > grep("train", names(df)) trainset <- trainset[, -trainColNum] testset <- > testset[, > > -trainColNum] head(trainset); str(df) > > > > svm_model<- svm(z ~ ., > > data = trainset, > > type = &quo...
2020 Oct 28
0
R for-loop to add layer to lattice plot
..., > z=c(rep(0, length(x1)), rep(1, length(x2)))) > df$z = factor(c(rep(0, length(x1)), rep(1, length(x2)))) > df[, "train"] <- ifelse(runif(nrow(df)) < 0.8, 1, 0) > trainset <- df[df$train == 1, ] > testset <- df[df$train == 0, ] > trainColNum <- grep("train", names(df)) > trainset <- trainset[, -trainColNum] > testset <- testset[, -trainColNum] > svm_model <- svm(z ~ ., > data = trainset, > type = "C-classification", > kernel =...
2020 Oct 23
2
How to shade area between lines in ggplot2
...= > > > factor(c(rep(0, > > > > length(x1)), rep(1, length(x2)))) df[, "train"] <- > > > > ifelse(runif(nrow(df)) > > > < 0.8, 1, 0) > > > > trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] > > > > trainColNum > > > <- > > > > grep("train", names(df)) trainset <- trainset[, -trainColNum] > > > > testset <- > > > testset[, > > > > -trainColNum] head(trainset); str(df) > > > > > > > > svm_model<- svm(z ~ .,...
2020 Oct 23
0
How to shade area between lines in ggplot2
...)), rep(1, length(x2)))) df$z = > > factor(c(rep(0, > > > length(x1)), rep(1, length(x2)))) df[, "train"] <- > > > ifelse(runif(nrow(df)) > > < 0.8, 1, 0) > > > trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] > > > trainColNum > > <- > > > grep("train", names(df)) trainset <- trainset[, -trainColNum] > > > testset <- > > testset[, > > > -trainColNum] head(trainset); str(df) > > > > > > svm_model<- svm(z ~ ., > > > data...
2020 Oct 26
0
How to shade area between lines in ggplot2
...(rep(0, > > > > > length(x1)), rep(1, length(x2)))) df[, "train"] <- > > > > > ifelse(runif(nrow(df)) > > > > < 0.8, 1, 0) > > > > > trainset <- df[df$train == 1, ] testset <- df[df$train == 0, ] > > > > > trainColNum > > > > <- > > > > > grep("train", names(df)) trainset <- trainset[, -trainColNum] > > > > > testset <- > > > > testset[, > > > > > -trainColNum] head(trainset); str(df) > > > > > > > > &...