Upgrade to Pro — share decks privately, control downloads, hide ads and more …

tidy_rpart

bk
January 21, 2023

 tidy_rpart

bk

January 21, 2023
Tweet

More Decks by bk

Other Decks in Programming

Transcript

  1. ໨࣍ 2 ൃදͷ໨త tidymodelsͱ͸ broomύοέʔδͰϞσϧ࣮ߦ݁ՌΛtidyʹม׵ broomstickύοέʔδͰrpartʹରԠ tidyrulesύοέʔδͰ෼ذ৘ใΛtidyʹม׵ ·ͱΊ ࢀߟจݙ ɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾ

    ɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾ ɾɾɾɾɾɾɾɾɾɾɾɾɾ ɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾ ɾɾɾɾɾɾɾɾɾɾɾ ɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾ ɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾ p.3 p.4-5 p.6-11 p.12-14 p.15-18 p.19 p.20
  2. σʔλͷ४උ 7 rpartύοέʔδͷkyphosisσʔλΛαϯϓϧσʔλͱͯ͠ਐΊΔɻ kyphosis: Data on Children who have had

    Corrective Spinal Surgery in rpart: Recursive Partitioning and Regression Trees, https://rdrr.io/cran/rpart/man/kyphosis.html
  3. tidyrulesύοέʔδ 16 ෼ذͷ৘ใΛऔಘ͍ͨ͠৔߹ɺ಺෦ม਺ʹΞΫηε͢Δඞཁ͕͋Δɻ partykit/party.R at 06ba66bd8246eca835c67d23f0af95bff9a86c2c · cran/partykit · GitHub,

    https://github.com/cran/partykit/blob/06ba66bd8246eca835c67d23f0af95bff9a86c2c/R/party.R tidyrules/rpart.R at master · talegari/tidyrules · GitHub, https://github.com/talegari/tidyrules/blob/master/R/rpart.R labels.rpart function - RDocumentation, https://www.rdocumentation.org/packages/rpart/versions/4.1.16/topics/labels.rpart
  4. tidyrulesύοέʔδ 18 tidyRules()ؔ਺͔Βฦ͖֤ͬͯͨม਺ͷ಺༰͸ҎԼͷ௨Γɻ ม਺໊ ಺༰ LHS Rules. RHS Predicted Class.

    support Number of observation covered by the rule. confidence Prediction accuracy for respective class. (laplace correction is implemented by default) lift The result of dividing the rule's estimated accuracy by the relative frequency of the predicted class in the training set. tidyrules/tidyrules_vignette.Rmd at master · talegari/tidyrules · GitHub, https://github.com/talegari/tidyrules/blob/master/vignettes/tidyrules_vignette.Rmd
  5. ࢀߟจݙ 20 • দଜ༏࠸ɼӝੜਅ໵ɼ٢ଜ޿ࢤ, ʰRϢʔβͷͨΊͷtidymodels[࣮ફ]ೖ໳ʙϞμϯͳ౷ܭɾػցֶशϞσϦϯά ͷੈքʱ, https://gihyo.jp/book/2023/978-4-297-13236-1 • kyphosis: Data

    on Children who have had Corrective Spinal Surgery in rpart: Recursive Partitioning and Regression Trees, https:// rdrr.io/cran/rpart/man/kyphosis.html • Available methods, https://cloud.r-project.org/web/packages/broom/vignettes/available-methods.html • Convert Decision Tree Objects into Tidy Data Frames • broomstick, https://broomstick.njtierney.com/ • labels.rpart function - RDocumentation, https://www.rdocumentation.org/packages/rpart/versions/4.1.16/topics/labels.rpart • partykit/party.R at 06ba66bd8246eca835c67d23f0af95bff9a86c2c · cran/partykit · GitHub, https://github.com/cran/partykit/ blob/06ba66bd8246eca835c67d23f0af95bff9a86c2c/R/party.R • tidyrules/rpart.R at master · talegari/tidyrules · GitHub, https://github.com/talegari/tidyrules/blob/master/R/rpart.R • Obtain Rules from Rule Based Models as Tidy Dataframe • tidyrules, https://talegari.github.io/tidyrules/index.html