firstit takes in our list of usjoh'jfmet ready to convert it into -bcfmfe pjoutwhere the label is the target value-was this person hired or not or -followed by an array that consists of all the other fields that we care about sothis is how you create -bcfmfe pjou that the %fdjtjpo sff -mjc class can consume soyou see in the above code that we're converting years of experience from string to an integer valueand for all the yes/no fieldswe're calling this cjobsz functionthat defined up at the top of the codebut we haven' discussed yetefgcjobsz :jg : sfuvsofmtf sfuvsoall it does is convert the character yes to otherwise it returns soy will become will become similarlyi have nbq&evdbujpo functionefgnbq&evdbujpo efhsff jg efhsff # sfuvsofmjg efhsff sfuvsofmjg efhsff isfuvsofmtf sfuvsoas we discussed earlierthis simply converts different types of degrees to an ordinal numeric value in exactly the same way as our yes/no fields as reminderthis is the line of code that sent us running through those functionsusbjojoh%bub dtw%bubnbq dsfbuf-bcfmfe pjout at this pointafter mapping our rdd using that dsfbuf-bcfmfe pjout functionwe now have usbjojoh%bub rddand this is exactly what mllib wants for constructing decision tree