creating test candidate and building our decision tree let' create little test candidate we can useso we can use our model to actually predict whether someone new would be hired or not what we're going to do is create test candidate that consists of an array of the same values for each field as we had in the csv fileuftu$boejebuft let' quickly compare that code with the excel document so you can see the array mappingagainwe need to map these back to their original column representationso that means years of prior experiencecurrently employedthree previous employersa bs degreedid not go to top-tier school and did not do an internship we could actually create an entire rdd full of candidates if we wanted tobut we'll just do one for now nextwe'll use parallelize to convert that list into an rdduftu%bub tdqbsbmmfmj[ uftu$boejebuft nothing new there alrightnow for the magic let' move to the next code blocknpefm %fdjtjpo sffusbjo$mbttjgjfs usbjojoh%bubovn$mbttft dbufhpsjdbm'fbuvsft*ogp \^jnqvsjuz hjoj nby%fqui nby#jot we are going to call %fdjtjpo sffusbjo$mbttjgjfsand this is what will actually build our decision tree itself we pass in our usbjojoh%bubwhich is just an rdd full of -bcfmfe pjou arraysovn$mbttft because we havebasicallya yes or no prediction that we're trying to makewill this person be hired or notthe next parameter is called dbufhpsjdbm'fbuvsft*ogpand this is python dictionary that maps fields to the number of categories in each field soif you have continuous range available to given fieldlike the number of years of experienceyou wouldn' specify that at all in herebut for fields that are categorical in naturesuch as what degree do they havefor examplethat would say fieldid mapping to the degree attainedwhich has four different possibilitiesno educationbsmsand phd for all of the yes/no fieldswe're mapping those to possible categoriesyes/no or / is what we converted those to