Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Identifying interactions in a tree #4835
    SmilingGhost
    Participant

      The very first split is on marital status. After that, the next two splits are cap_gain on the left and education_num on the right. Let’s start with looking at cap_gain to see if there is any interaction. If you go further down the splits to the right, cap_gain is used as a split as well. So regardless of the marital status, eventually cap_gain is used as a split. Since the split of marital_status does not change whether cap_gain is used as a split or not, signals to us that their is likely no interaction.

      Now lets look at education_num. It is only used as a split on the right branch, not the left. Since this variable is only used when marital status is “no” for the listed categories, this indicates that education_num only affects/matters when marital status is married spouse present, etc (I cant recall the other categories).

      This is how I have been thinking about interactions in decision trees.

      in reply to: Character Variables to Factor Variables #4833
      SmilingGhost
      Participant

        It might just be because of the version of R you are running. Try using the command options(stringsAsFactors = TRUE) at the start of the file.

      Viewing 2 posts - 1 through 2 (of 2 total)