0

I'm finding troubles to run the following code in R studio:

I want to create a prediction model running the adaboost algorithm and first of all, in " model <- boosting(out ~ ., data = train, boos = TRUE, mfinal = 10)" it doesn't stop running.

require(dplyr)
require(tidyverse)
require(DescTools)
require(adabag)
require(caret)
df <- read_csv("compustat2.csv")
summary(df)
str(df)
list(df)

df <- df[c(3,78,328,17,265,46,47,359,155,57,262,61,198,304)]
df <- df[complete.cases(df), ]


library(adabag)
library(caret)

indexes=createDataPartition(df$datadate, p=.70, list = F)
train = df[indexes, ]
test = df[-indexes, ]

train$out <- as.factor(train$datadate)

model <- boosting(out ~ ., data = train, boos = TRUE, mfinal = 10, control = (minsplit = 0))

print(names(model))

pred.test = predict(model, test)

pred.test```


Can you please help me out?

Thank you

0 Answers0