You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm a bit confused with the labels, I don't understand how to put them correctly in my data.
I have sample data
fu <- function(){
size <- sample(10:30,1)
let <- LETTERS[sample(1:26,size = size,replace = T)]
mu <- make.unique(let,sep = "_")
c( paste0("__label__",sample(1:2,1)) , mu)
}
li <- list()
for(i in 1:20) li[[i]] <- fu()
li2 <- lapply(li ,function(x) paste(x,collapse = " "))
head(li2)
the result is
[[1]]
[1] "__label__2 Y W Y_1 Y_2 E Z F N E_1 Q"
[[2]]
[1] "__label__1 N A I T D X E M Z F J V I_1 Y Q B J_1 R Y_1 Q_1 C U H R_1 Y_2 D_1 C_1 K"
[[3]]
[1] "__label__1 V F R B E R_1 M I U L Q C D K D_1 M_1 A M_2 A_1 M_3 S R_2 F_1 Z N A_2 E_1 M_4 G"
[[4]]
[1] "__label__2 O K D K_1 C D_1 J L Q F Y N Q_1 A Y_1 F_1 M V D_2"
save data
way <- "C:\...........\text.txt"
for(i in 1:length(li2)) write.table(x = li2[[i]] , file = way,append = T,col.names = F,row.names = F)
Hello, I'm a bit confused with the labels, I don't understand how to put them correctly in my data.
I have sample data
the result is
save data
train model
model have no labels
The text was updated successfully, but these errors were encountered: