Seed Benchmark – data.table in R

#Getting Started With the Seed Benchmark #Ver 0.1 library(data.table) #Read Files——- tourneySeeds <- fread(“../input/TourneySeeds.csv”) sampleSubmission <- fread(“../input/SampleSubmission.csv”) #Define a function that extracts the seeds and divisions separately getSeedDivision <- function(seedsInfo){ #Seed & Division #This function gets the seed and division of a team in a given season #Input class == “numeric” corresponding to the season of the tournament and the team unique ID #Returns class == “character” corresponding to the seed in that season and the division assigned in the tourney #seedsInfo <- tourneySeeds[1] #here for debugging seasonFromData <- seedsInfo[[“Season”]] seedAndDivision <- seedsInfo[[“Seed”]] teamFromData <- seedsInfo[[“Team”]] seedTeam <- gsub(pattern = “[A-Z+a-z]”, replacement = “”, x = seedAndDivision) divisionTeam <- gsub(pattern = “[0-9]”, replacement = “”, x = seedAndDivision) #clean the extra letters divisionTeam <- gsub(pattern = “[a-z]”, replacement = “”,…

Link to Full Article: Seed Benchmark – data.table in R

Pin It on Pinterest

Share This

Join Our Newsletter

Sign up to our mailing list to receive the latest news and updates about and the Informed.AI Network of AI related websites which includes Events.AI, Neurons.AI, Awards.AI, and Vocation.AI

You have Successfully Subscribed!