CHAID decision tree in R or Python

I used SPSS to generate the CHAID tree. It automatically merges continuous variables and returns the value Chi-squared and Degrees of freedom, which is not found in the R.Below summary function, is a partial output sample.

    Node    0               1               Total        PC Parent  Variable    Sig.a   Chi-Square  df  Split Values
        N   Percent      N  Percent        N    Percent                         
    0   148025  84.0%   28111   16.0%   176136  100.0%   0                      
    1   102390  93.9%   6643    6.1%    109033  61.9%    0    0     SALES1      0.000   42991.370   4   <= .000
    2   12600   91.3%   1194    8.7%    13794   7.8%     0    0     SALES1      0.000   42991.370   4   (.000,149.990]
    3   15140   83.7%   2942    16.3%   18082   10.3%    0    0     SALES1      0.000   42991.370   4   (149.990,1044.000]

What R returns is:

https://stackoverflow.com/questions/32739093/what-are-the-available-chaid-summary-functions-in-r

I found ways to tap the tree output and play with it, as in this example:

regression tree for converting a table to r

Are there functions for getting SPSS output in R or python, or should all this be done manually with the partykit package in R?

+4
2

open-source python CHAID

+1

CHAID r-forge? CHAID. /, .

0

Source: https://habr.com/ru/post/1610227/


All Articles