cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-798678%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3EVerbessern%20Sie%20Ihre%20Python-Kenntnisse%20mit%20JMP%3A%20Anpassung%20von%20Entscheidungsbaummodellen%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-798678%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CH3%20id%3D%22toc-hId-1599769408%22%20id%3D%22toc-hId-1619910938%22%3EZusammenfassung%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3CP%3EIn%20diesem%20Beitrag%20vergleichen%20wir%20die%20Ausf%C3%BChrung%20eines%20Entscheidungsbaums%20in%20Python%20mit%20der%20in%20JMP%20und%20zeigen%2C%20wie%20man%20in%20JMP%20einen%20angepassten%20Entscheidungsbaum%20erstellt%2C%20indem%20man%20mathematische%20Kriterien%20anwendet%2C%20um%20zu%20bestimmen%2C%20nach%20welchem%20%E2%80%8B%E2%80%8BParameter%20jeder%20Zweig%20aufgeteilt%20werden%20soll.%20Diese%20Anpassungsstufe%20ist%20in%20Python%20nicht%20verf%C3%BCgbar%2C%20weshalb%20JMP%20unverzichtbar%20f%C3%BCr%20die%20Erstellung%20robuster%20Modelle%20ist%2C%20bei%20denen%20die%20Aufteilungsparameter%20nicht%20dem%20Zufall%20%C3%BCberlassen%20werden.%20Dar%C3%BCber%20hinaus%20k%C3%B6nnen%20Sie%20mit%20dieser%20Anpassung%20Ihr%20Fachwissen%20nutzen%2C%20um%20die%20Auswahl%20des%20Aufteilungsparameters%20in%20jedem%20Zweig%20zu%20begr%C3%BCnden%2C%20insbesondere%20wenn%20mehrere%20Kandidaten%20eine%20%C3%A4hnliche%20F%C3%A4higkeit%20zum%20effektiven%20Aufteilen%20der%20Daten%20zeigen.%3CBR%20%2F%3E%3CEM%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%3C%2FEM%3E%3C%2FP%3E%3CDIV%20class%3D%22lia-vid-container%20video-embed-center%22%3E%3CDIV%20id%3D%22lia-vid-6362640313112w960h540r57%22%20class%3D%22lia-video-brightcove-player-container%22%3E%3CEM%3E%3CVIDEO-JS%20data-video-id%3D%226362640313112%22%20data-account%3D%226058004218001%22%20data-player%3D%22default%22%20data-embed%3D%22default%22%20class%3D%22vjs-fluid%22%20controls%3D%22%22%20data-application-id%3D%22%22%20style%3D%22width%3A%20100%25%3B%20height%3A%20100%25%3B%22%3E%3C%2FVIDEO-JS%3E%3C%2FEM%3E%3C%2FDIV%3E%3CSCRIPT%20src%3D%22https%3A%2F%2Fplayers.brightcove.net%2F6058004218001%2Fdefault_default%2Findex.min.js%22%3E%3C%2FSCRIPT%3E%3CEM%3E%3CA%20class%3D%22video-embed-link%22%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fvideo%2Fgallerypage%2Fvideo-id%2F6362640313112%22%20target%3D%22_blank%22%3E(in%20%E2%80%9EMeine%20Videos%E2%80%9C%20anzeigen)%3C%2FA%3E%3C%2FEM%3E%3C%2FDIV%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%20%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EIn%20diesem%20Beispiel%20wird%20der%20Wine-Datensatz%20verwendet%2C%20ein%20Klassifizierungsbeispiel%2C%20das%20allgemein%20in%20der%20Scikit-learn-Bibliothek%20verf%C3%BCgbar%20ist.%20Er%20enth%C3%A4lt%20die%20Ergebnisse%20einer%20chemischen%20Analyse%20von%20Weinen%2C%20die%20in%20derselben%20Region%20in%20Italien%20angebaut%20werden%2C%20aber%20aus%20drei%20verschiedenen%20Sorten%20(Rebsorten)%20stammen%3A%20mit%20den%20Bezeichnungen%200%2C%201%20und%202.%20Im%20Datensatz%20wurden%20f%C3%BCr%20jede%20Probe%2013%20chemische%20Charakterisierungstechniken%20ausgef%C3%BChrt%2C%20darunter%20die%20Menge%20an%20Flavonoiden%20(eine%20Art%20Phenol)%2C%20die%20Farbintensit%C3%A4t%20des%20Weins%2C%20der%20Aschegehalt%2C%20der%20Farbton%2C%20der%20Alkoholgehalt%20usw.%3C%2FP%3E%0A%3CP%3EDas%20Ziel%3F%20Ein%20Entscheidungsbaum-Klassifizierungsmodell%20zu%20erstellen%2C%20um%20die%20Herkunft%20des%20Weins%20mit%20m%C3%B6glichst%20wenigen%20und%20kosteng%C3%BCnstigen%20Charakterisierungstests%20zu%20identifizieren.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--952387553%22%20id%3D%22toc-hId--932246023%22%3EVerwenden%20von%20Python%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3CP%3ESehen%20wir%20uns%20zun%C3%A4chst%20an%2C%20was%20wir%20erhalten%2C%20wenn%20wir%20ein%20Entscheidungsbaummodell%20in%20Python%20erstellen.%20(Das%20Skript%20ist%20diesem%20Beitrag%20beigef%C3%BCgt.)%20Das%20resultierende%20Modell%20kann%20mit%20der%20Matplot-Bibliothek%20grafisch%20dargestellt%20werden%2C%20wie%20unten%20gezeigt.%20Das%20erste%20Modell%20klassifiziert%20nach%20Farbintensit%C3%A4t%2C%20Prolin%2C%20Aschegehalt%2C%20Flavonoiden%20und%20Alkoholgehalt.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_0-1726158342812.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_0-1726158342812.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68192i9F9A7D11D8E11960%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_0-1726158342812.png%22%20alt%3D%22yasmine_hajar_0-1726158342812.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EWenn%20der%20Zufallsstartwert%20nicht%20auf%20einen%20bestimmten%20Wert%20eingestellt%20ist%2C%20sieht%20der%20Baum%20bei%20jedem%20neuen%20Durchlauf%20anders%20aus%2C%20wie%20unten%20zu%20sehen.%20Dies%20ist%20zwar%20zu%20erwarten%2C%20aber%20nicht%20praktikabel%2C%20da%20Sie%20m%C3%B6glicherweise%20die%20besten%20Charakterisierungstests%20ausw%C3%A4hlen%20m%C3%B6chten%2C%20die%20schnell%20und%2Foder%20kosteng%C3%BCnstig%20durchzuf%C3%BChren%20sind.%20In%20diesem%20Beispiel%20gibt%20es%20keine%20M%C3%B6glichkeit%2C%20das%20Merkmal%20zu%20steuern%2C%20bei%20dem%20die%20Aufteilung%20erfolgt%20oder%20bei%20welchem%20%E2%80%8B%E2%80%8BWert.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%2230px%22%3E%0A%3CP%20style%3D%22%20text-align%3A%20center%3B%20%22%3EZufallszustand%20%3D%202%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%2230px%22%3E%0A%3CP%20style%3D%22%20text-align%3A%20center%3B%20%22%3EZufallszustand%20%3D%2014%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%2230px%22%3E%0A%3CP%20style%3D%22%20text-align%3A%20center%3B%20%22%3EZufallszustand%20%3D%2024%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%22162px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22yasmine_hajar_1-1726158342820.png%22%20style%3D%22width%3A%20234px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_1-1726158342820.png%22%20style%3D%22width%3A%20234px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68193iA7BD5520D89EF4FB%2Fimage-dimensions%2F234x133%3Fv%3Dv2%22%20width%3D%22234%22%20height%3D%22133%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_1-1726158342820.png%22%20alt%3D%22yasmine_hajar_1-1726158342820.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%22162px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22yasmine_hajar_2-1726158342825.png%22%20style%3D%22width%3A%20180px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_2-1726158342825.png%22%20style%3D%22width%3A%20180px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68194i357B087046F6D48C%2Fimage-dimensions%2F180x124%3Fv%3Dv2%22%20width%3D%22180%22%20height%3D%22124%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_2-1726158342825.png%22%20alt%3D%22yasmine_hajar_2-1726158342825.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%22162px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22yasmine_hajar_3-1726158342829.png%22%20style%3D%22width%3A%20166px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_3-1726158342829.png%22%20style%3D%22width%3A%20166px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68195iAA818CFC78C5DB3C%2Fimage-dimensions%2F166x91%3Fv%3Dv2%22%20width%3D%22166%22%20height%3D%2291%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_3-1726158342829.png%22%20alt%3D%22yasmine_hajar_3-1726158342829.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%22112px%22%3E%0A%3CP%3EErforderliche%20Tests%3A%20Farbintensit%C3%A4t%2C%20Prolin%2C%20Alkoholgehalt%2C%20Flavonoide%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%22112px%22%3E%0A%3CP%3EErforderliche%20Tests%3A%20Farbintensit%C3%A4t%2C%20Prolin%2C%20Asche%2C%20Aschealkalit%C3%A4t%2C%20Apfels%C3%A4ure%2C%20Alkoholgehalt%2C%20Flavonoide%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22208px%22%20height%3D%22112px%22%3E%0A%3CP%3EErforderliche%20Tests%3A%20Farbintensit%C3%A4t%2C%20Prolin%2C%20OD280%2FOD315%2C%20Flavonoide%2C%20Alkalit%C3%A4t%20der%20Asche%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CH3%20id%3D%22toc-hId-790422782%22%20id%3D%22toc-hId-810564312%22%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FH3%3E%0A%3CH3%20id%3D%22toc-hId--1761734179%22%20id%3D%22toc-hId--1741592649%22%3E%3CFONT%20size%3D%224%22%3EVerwenden%20von%20JMP%3C%2FFONT%3E%3CFONT%20size%3D%224%22%3E%20%20%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FFONT%3E%3C%2FH3%3E%0A%3CP%3EMal%20sehen%2C%20ob%20JMP%20bei%20der%20Auswahl%20der%20Charakterisierungstests%20bessere%20Arbeit%20leisten%20kann.%3C%2FP%3E%0A%3CP%3EWenn%20Sie%20die%20Decision%20Tree-Plattform%20in%20JMP%20ausf%C3%BChren%2C%20gehen%20Sie%20zu%20Analysieren%20%26gt%3B%20Pr%C3%A4diktive%20Modellierung%20%26gt%3B%20Partition.%20Setzen%20Sie%20den%20Validierungsanteil%20auf%200%2C3%20und%20aktivieren%20Sie%20Informative%20Missing%20und%20Ordinal%20Restricts%20Order.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_0-1726234858694.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_0-1726234858694.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68243i2AFA12AE5C9B62FF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_0-1726234858694.png%22%20alt%3D%22yasmine_hajar_0-1726234858694.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EDer%20Bericht%20sieht%20ungef%C3%A4hr%20so%20%E2%80%8B%E2%80%8Baus.%20Klicken%20Sie%20auf%20%E2%80%9ELos%E2%80%9C.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_0-1726235349662.png%22%20style%3D%22width%3A%20502px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_0-1726235349662.png%22%20style%3D%22width%3A%20502px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68252iFBB1826AAF43EA24%2Fimage-dimensions%2F502x512%3Fv%3Dv2%22%20width%3D%22502%22%20height%3D%22512%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_0-1726235349662.png%22%20alt%3D%22yasmine_hajar_0-1726235349662.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EWenn%20Sie%20auf%20%E2%80%9ELos%E2%80%9C%20klicken%2C%20wird%20dieser%20Entscheidungsbaum%20angezeigt%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_2-1726234905091.png%22%20style%3D%22width%3A%20607px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_2-1726234905091.png%22%20style%3D%22width%3A%20607px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68245i0BFB07C1EE405795%2Fimage-dimensions%2F607x427%3Fv%3Dv2%22%20width%3D%22607%22%20height%3D%22427%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_2-1726234905091.png%22%20alt%3D%22yasmine_hajar_2-1726234905091.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EWie%20in%20Python%20wird%20durch%20die%20erneute%20Durchf%C3%BChrung%20der%20Analyse%20eine%20andere%20Struktur%20f%C3%BCr%20den%20Entscheidungsbaum%20erstellt.%3C%2FP%3E%0A%3CTABLE%20width%3D%22624px%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22311.556px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22yasmine_hajar_3-1726234925444.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_3-1726234925444.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68246iF03F8D4370BE9AEC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_3-1726234925444.png%22%20alt%3D%22yasmine_hajar_3-1726234925444.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22311.556px%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22yasmine_hajar_4-1726234925446.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_4-1726234925446.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68247i9E5426A89A052803%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_4-1726234925446.png%22%20alt%3D%22yasmine_hajar_4-1726234925446.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EWas%20kann%20also%20getan%20werden%2C%20um%20ein%20weniger%20zuf%C3%A4lliges%20Modell%20zu%20erstellen%2C%20das%20auf%20einigen%20Pr%C3%A4ferenzen%20f%C3%BCr%20die%20verwendeten%20Charakterisierungsmethoden%20basiert%3F%20Wir%20werden%20die%20Aufteilungen%20au%C3%9Fer%20Kraft%20setzen%20und%20die%20Parameter%20selbst%20ausw%C3%A4hlen.%3C%2FP%3E%0A%3CP%3EZuerst%20klicken%20wir%20auf%20die%20Schaltfl%C3%A4che%20%E2%80%9EBeschneiden%E2%80%9C.%20Durch%20Klicken%20auf%20%E2%80%9EBeschneiden%E2%80%9C%20k%C3%B6nnen%20Sie%20einen%20Schritt%20zur%C3%BCckgehen%20und%20jeweils%20einen%20Zweig%20entfernen.%20Klicken%20Sie%20als%20N%C3%A4chstes%20auf%20die%20Kandidatenliste%20und%20ordnen%20Sie%20die%20Features%20nach%20ihrem%20%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F18.0%2F%23page%2Fjmp%2Fstatistical-details-for-the-splitting-criterion.shtml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EG%5E2-%20oder%20Logworth-Aufteilungskriterium%2C%3C%2FA%3E%20sodass%20Sie%20analysieren%20k%C3%B6nnen%2C%20welche%20Parameter%20ganz%20oben%20auf%20der%20Liste%20stehen.%3C%2FP%3E%0A%3CP%3EUnten%20sehen%20Sie%20die%20verschiedenen%20Kandidaten%20f%C3%BCr%20die%20Aufteilung%2C%20wobei%20Flavonoide%20ganz%20oben%20auf%20der%20Liste%20stehen%2C%20gefolgt%20von%20OD280%2FOD315%2C%20Gesamtphenolen%20und%20Prolin.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_1-1726235412651.png%22%20style%3D%22width%3A%20485px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_1-1726235412651.png%22%20style%3D%22width%3A%20485px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68253iA30FC8FE544BA9BC%2Fimage-dimensions%2F485x393%3Fv%3Dv2%22%20width%3D%22485%22%20height%3D%22393%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_1-1726235412651.png%22%20alt%3D%22yasmine_hajar_1-1726235412651.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EDer%20G%5E2-Wert%20sagt%20uns%2C%20dass%20das%20Modell%20Flavonoid%20als%20Teilungskriterium%20w%C3%A4hlt.%20Wenn%20Sie%20auf%20Teilen%20klicken%2C%20erfolgt%20die%20Teilung%20der%20Zweige%20mit%20dem%20Flavonoidwert%201%2C41.%3C%2FP%3E%0A%3CP%3EErweitern%20Sie%20als%20N%C3%A4chstes%20die%20Kandidatenliste%20unter%20Flavonoide%20%26lt%3B%201%2C41.%20Die%20Farbintensit%C3%A4t%20steht%20jetzt%20ganz%20oben%20auf%20der%20Liste.%20Es%20ist%20jedoch%20m%C3%B6glicherweise%20einfacher%2C%20den%20Farbton%20%C3%BCber%20die%20Farbintensit%C3%A4t%20zu%20messen.%20Klicken%20Sie%20in%20diesem%20Fall%20auf%20das%20rote%20Dreieck%20und%20dann%20auf%20%E2%80%9ESpezifisch%20aufteilen%E2%80%9C.%20Anschlie%C3%9Fend%20k%C3%B6nnen%20Sie%20den%20Parameter%20f%C3%BCr%20die%20Aufteilung%20ausw%C3%A4hlen%20%E2%80%93%20in%20diesem%20Fall%20den%20Farbton%20%E2%80%93%20und%20auf%20%E2%80%9EOK%E2%80%9C%20klicken.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_6-1726234979954.png%22%20style%3D%22width%3A%20512px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_6-1726234979954.png%22%20style%3D%22width%3A%20512px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68249iBEFDD59E4F06CF20%2Fimage-dimensions%2F512x394%3Fv%3Dv2%22%20width%3D%22512%22%20height%3D%22394%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_6-1726234979954.png%22%20alt%3D%22yasmine_hajar_6-1726234979954.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EDer%20neue%20Baum%20unten%20zeigt%2C%20dass%20bei%20einem%20Flavonoidgehalt%20unter%201%2C41%20und%20einem%20Farbton%20unter%200%2C906%20die%20Wahrscheinlichkeit%200%2C98%20betr%C3%A4gt%2C%20dass%20der%20Wein%20aus%20der%20Sorte%20Nr.%202%20hergestellt%20wurde.%20Wenn%20der%20Farbton%20hingegen%20%C3%BCber%200%2C906%20liegt%2C%20stammt%20er%20h%C3%B6chstwahrscheinlich%20von%20der%20Rebsorte%201.%20Wenn%20der%20Flavonoidgehalt%20%C3%BCber%201%2C41%20liegt%2C%20besteht%20eine%20fast%2050%3A50-Chance%2C%20dass%20die%20Sorte%20entweder%200%20oder%201%20ist.%20Lassen%20Sie%20uns%20also%20die%20Aufteilung%20dort%20fortsetzen.%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_0-1726239076915.png%22%20style%3D%22width%3A%20538px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_0-1726239076915.png%22%20style%3D%22width%3A%20538px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68255iF36356F9D9AC79D6%2Fimage-dimensions%2F538x490%3Fv%3Dv2%22%20width%3D%22538%22%20height%3D%22490%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_0-1726239076915.png%22%20alt%3D%22yasmine_hajar_0-1726239076915.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EUnter%20Flavonoide%20%26gt%3B%3D1%2C41%20sehen%20Sie%20sich%20die%20Kandidaten%20und%20ihre%20G%5E2-Werte%20an.%20Alkohol%20und%20Prolin%20haben%20einen%20%C3%A4hnlichen%20G%5E2-Wert.%20Da%20es%20einfacher%20ist%2C%20auf%20Alkohol%20zu%20testen%2C%20nehmen%20Sie%20die%20Aufteilung%20bei%20Alkohol%20vor.%20Es%20zeigt%20sich%2C%20dass%20es%20eine%2091-prozentige%20Wahrscheinlichkeit%20gibt%2C%20dass%20der%20Wein%20aus%20der%20Traube%20Typ%200%20stammt%2C%20wenn%20der%20Alkoholgehalt%20%C3%BCber%2013%2C5%20liegt.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_1-1726239994851.png%22%20style%3D%22width%3A%20647px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_1-1726239994851.png%22%20style%3D%22width%3A%20647px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68261iE96AD6EF349CC334%2Fimage-dimensions%2F647x427%3Fv%3Dv2%22%20width%3D%22647%22%20height%3D%22427%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_1-1726239994851.png%22%20alt%3D%22yasmine_hajar_1-1726239994851.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EUnten%20sehen%20Sie%20das%20endg%C3%BCltige%20erstellte%20Entscheidungsbaummodell.%20Wir%20ben%C3%B6tigen%20jetzt%20weniger%20Charakterisierungstests%2C%20um%20die%20Traubensorte%20zu%20identifizieren%2C%20und%20die%20ausgew%C3%A4hlten%20Tests%20sind%20einfacher%20durchzuf%C3%BChren%2C%20ohne%20dass%20wir%20bei%20der%20Auswahl%20dieser%20Parameter%20einen%20Black-Box-Ansatz%20verfolgen%20m%C3%BCssen.%20Die%20Entscheidungsregeln%20k%C3%B6nnen%20dann%20einfach%20gespeichert%20und%20mit%20anderen%20geteilt%20werden.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22yasmine_hajar_0-1726239964191.png%22%20style%3D%22width%3A%20699px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22yasmine_hajar_0-1726239964191.png%22%20style%3D%22width%3A%20699px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68260i13BA9CB8C24734BB%2Fimage-dimensions%2F699x486%3Fv%3Dv2%22%20width%3D%22699%22%20height%3D%22486%22%20role%3D%22button%22%20title%3D%22yasmine_hajar_0-1726239964191.png%22%20alt%3D%22yasmine_hajar_0-1726239964191.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-798678%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3ELesen%20Sie%20weiter%2C%20um%20zu%20erfahren%2C%20wie%20Sie%20ein%20angepasstes%20Entscheidungsbaummodell%20erstellen%2C%20mit%20dem%20Sie%20ausw%C3%A4hlen%20k%C3%B6nnen%2C%20auf%20welche%20Funktion%20der%20Zweig%20aufgeteilt%20werden%20soll.%20Auf%20diese%20Weise%20k%C3%B6nnen%20Sie%20sich%20vom%20Blackbox-Ansatz%20des%20maschinellen%20Lernens%20abwenden%20und%20eine%20bessere%20Kontrolle%20%C3%BCber%20die%20Funktionen%20behalten%2C%20die%20Sie%20in%20Ihrem%20Modell%20verwenden%20m%C3%BCssen.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Python%20Yasmine.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Python%20Yasmine.png%22%20style%3D%22width%3A%20975px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68800i7F1CA879E9A1EE7D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Python%20Yasmine.png%22%20alt%3D%22Python%20Yasmine.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-798678%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EPr%C3%A4diktive%20Modellierung%20und%20maschinelles%20Lernen%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Choose Language Hide Translation Bar
Level up your Python game with JMP: Decision tree model customization

Summary

In this post, we compare running a decision tree in Python versus JMP and demonstrate how to create a customized decision tree in JMP by applying mathematical criteria to determine which parameter each branch should split on. This level of customization is not available in Python, making JMP essential for building robust models where splitting parameters is not left to chance. Moreover, this customization lets you leverage your subject matter expertise to justify the selection of the splitting parameter at each branch, especially when multiple candidates show a similar ability to split the data effectively.


 

This example uses the Wine data set, a classification example commonly available in the Scikit-learn library. It contains the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars (types of grape): labeled 0,1, and 2. In the data set, 13 chemical characterization techniques were run on each sample, including the amount of flavonoids (a type of phenol), the wine’s color intensity, the ash content, the hue, the alcohol content, etc.

The goal? To create a decision tree classification model to identify the source of the wine with the fewest and cheapest characterization tests as possible.

Using Python

First, let’s see what we get when creating a decision tree model in Python. (The script is attached to this post.) The resulting model can be graphed with matplot lib, as shown below. The first model classifies according to color intensity, proline, ash content, flavonoids, and alcohol content.

yasmine_hajar_0-1726158342812.png

 

Unless the random seed is set to a certain value, the tree will look different with every new run, as seen below. While this is expected, it is not practical, since you may want to choose the best set of characterization tests that are fast and/or cheap to run. In this example, there is no way to control the feature where the split occurs or at what value.

 

Random state = 2

Random state = 14

Random state = 24

yasmine_hajar_1-1726158342820.png

 

yasmine_hajar_2-1726158342825.png

 

yasmine_hajar_3-1726158342829.png

 

Tests needed: color intensity, proline, alcohol content, flavonoids

Tests needed: color intensity, proline, ash, alkalinity of ash, malic acid, alcohol content, flavonoids

Tests needed: color intensity, proline, od280/od315, flavonoids, alkalinity of ash



Using JMP  

Let's see if JMP can do a better job when selecting characterization tests.

When running the Decision Tree platform in JMP, go to Analyze > Predictive Modeling > Partition. Set the Validation Portion to 0.3 and check Informative Missing and Ordinal Restricts Order.

yasmine_hajar_0-1726234858694.png

 

The report will look something like this. Click Go.

yasmine_hajar_0-1726235349662.png

 

Clicking Go produces this decision tree:

yasmine_hajar_2-1726234905091.png

 

Like in Python, redoing the analysis creates another structure for the decision tree.

yasmine_hajar_3-1726234925444.png

 

yasmine_hajar_4-1726234925446.png

 

 

So, what can be done to create a less randomized model that's based on some preferences over the characterization methods used? We're going to override the splits and choose the parameters ourselves.

First, we're going to click on the Prune button. By clicking on Prune, you can go a step backward and remove one branch at a time. Next, click on the Candidates list and order the features by their G^2 or Logworth Splitting Criterion, allowing you to analyze which parameters are at the top of the list.

Below you can see the different candidates for the split, with flavonoids at the top of the list, followed by od280/od315, total phenols, and proline.

yasmine_hajar_1-1726235412651.png

 

The G^2 value tells us that the model will choose flavonoid as the splitting criterion. If you click on Split, the branch split will happen using flavonoids value of 1.41.

Next, expand the Candidates list under flavonoids < 1.41. Color intensity is now at the top of the list. However, perhaps it’s easier to measure the hue over the color intensity; if so, click on the red triangle and click on Split Specific. You can then choose the parameter for the split -- in this case, hue -- and click OK.

yasmine_hajar_6-1726234979954.png

The new tree, which is below, indicates that if the flavonoids level is less than 1.41 and hue is less than 0.906, there is 0.98 probability that the wine is made from the cultivar #2. On the other hand, when the hue is higher than 0.906, it's most likely coming from the type 1 grape. When the flavonoids level is greater than 1.41, there is nearly a 50-50 chance that the cultivar is either 0 or 1. So, let's continue the split there.

 

yasmine_hajar_0-1726239076915.png

Under flavonoids >=1.41, look at the candidates and their G^2 levels. Alcohol and proline have a similar G^2 value. Since it’s easier to test for alcohol, make the split at alcohol. It reveals that there is a 91% chance that the wine comes from the type 0 grape if the alcohol content is greater than 13.5.

yasmine_hajar_1-1726239994851.png

 

The final decision tree model created is below. We now need less characterization tests to identify the type of grapes and the tests chosen are easier to perform without taking a black box approach to choosing these parameters. The decision rules can then be easily saved and shared with others.

yasmine_hajar_0-1726239964191.png

 

 

Last Modified: Oct 3, 2024 10:01 AM