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

dotdotdot_in_predict_function

465a530291aedb53fff5a6333e3dedaa?s=47 bk
June 04, 2022

 dotdotdot_in_predict_function

465a530291aedb53fff5a6333e3dedaa?s=128

bk

June 04, 2022
Tweet

More Decks by bk

Other Decks in Programming

Transcript

  1. ʙ predictؔ਺Ͱ͍᪴ͨdot-dot-dot ʙ ɾɾɾ

  2. ໨࣍ 2 ໨తɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾp.3 predictؔ਺Λ࢖͍ͬͯͨ࣌ͷ͜ͱɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾp.4ʙ10 ʮ…ʯͱ͸ɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾp.11ʙ18 ·ͱΊɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾp.19 ࢀߟจݙɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾɾp.20

  3. ໨త 3 ໨త ͋·Γ࿩͞ͳ͍͜ͱ • …ͱ͸Կ͔Λ஌Δ͜ͱ • …ΛҾ਺ʹ࣋ͭؔ਺ͰԿʹؾΛ ͚ͭΔ΂͖ͳͷ͔஌Δ͜ͱ •

    Ҿ਺ʹ…Λ࣋ͨͤͨ৔߹ͷ࢖͍ํ
  4. predictؔ਺Λ࢖͍ͬͯͨ࣌ͷ͜ͱ

  5. predictؔ਺ 5 penguinsσʔλΛֶशσʔλͱݕূσʔλʹ෼ׂ

  6. predictؔ਺ 6 rpartͰֶश͠ɺݕূσʔλʹద༻

  7. predictؔ਺ 7 predictؔ਺ͷRDocumentationΛௐ΂Δ predict.rpart function - RDocumentation, https://www.rdocumentation.org/packages/rpart/versions/4.1.16/topics/predict.rpart

  8. predictؔ਺ 8 predictͷҾ਺Λݟฦ͢

  9. predictؔ਺ 9 newdataʹԿ΋ࢦఆ͍ͯ͠ͳ͍ͱͲ͏ͳΔͷ͔ predict.rpart function - RDocumentation, https://www.rdocumentation.org/packages/rpart/versions/4.1.16/topics/predict.rpart

  10. predictؔ਺ 10 “data”ʹ౉ͨ͠΋ͷ͸Ͳ͜ʹ͍ͬͨͷ͔ʁ predict.rpart function - RDocumentation, https://www.rdocumentation.org/packages/rpart/versions/4.1.16/topics/predict.rpart

  11. ʮ…ʯͱ͸

  12. …ͱ͸ 12 Advanced R 6 Functions | Advanced R, https://adv-r.hadley.nz/functions.html#fun-dot-dot-dot

    RDocumentation dotsMethods function - RDocumentation, https://www.rdocumentation.org/packages/methods/versions/3.6.2/topics/dotsMethods
  13. …ͱ͸ 13 Advanced R 6 Functions | Advanced R, https://adv-r.hadley.nz/functions.html#fun-dot-dot-dot

    RDocumentation dotsMethods function - RDocumentation, https://www.rdocumentation.org/packages/methods/versions/3.6.2/topics/dotsMethods 13
  14. …ͱ͸ 14 ར఺ ࣄલʹࢦఆͰ͖ͳ͍Ҿ਺Λॊೈʹड͚औΔ͜ͱ͕Ͱ͖Δ ஫ҙ఺ Ҿ਺໊͕ޡ͍ͬͯͯ΋Τϥʔͳ͘ड͚औͬͯ͠·͏

  15. …ͷ஫ҙ఺ 15 sumͷҾ਺ sum function - RDocumentation, https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/sum

  16. …ͷ஫ҙ఺ 16 sumͷҾ਺na.rmͷεϖϧΛؒҧ͑ͨ৔߹

  17. …ͷ࢖͍ํ 17 listͱؙͯ͠͝ͱड͚औΔ

  18. …ͷ࢖͍ํ 18 ..NͰҾ਺ͷॱ൪Λࢦఆͯ͠ड͚औΔ

  19. ·ͱΊ 19 • Ҿ਺ͷεϖϧΛ֬ೝ͢Δ • dot-dot-dotͰड͚औͬͨΒwarning͋ͬͯ΋͍͍ؾ͕

  20. ࢀߟจݙ 20 • RDocumentation, predict.rpart function - RDocumentation, https://www.rdocumentation.org/packages/rpart/versions/4.1.16/ topics/predict.rpart

    • RDocumentation, dotsMethods function - RDocumentation, https://www.rdocumentation.org/packages/methods/versions/ 3.6.2/topics/dotsMethods • RDocumentation, sum function - RDocumentation, https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/sum • Advanced R, 6 Functions | Advanced R, https://adv-r.hadley.nz/functions.html • My Life as a Mock Quant, ࡾ࿈υοτ(..., dot-dot-dot, ellipsis)ͷऔΓѻ͍, https://teramonagi.hatenablog.com/entry/ 20160817/1471418554 • ࣺͯΒΕͨϒϩά, R ͷ dot-dot-dot ΦϒδΣΫτ, https://blog.recyclebin.jp/archives/3823 • ੴా ج޿, ࢢ઒ ଠ༞, ߴ༄ ৻Ұ, ෱ౡ ਅଠ࿕, Rݴޠపఈղઆ, https://www.amazon.co.jp/gp/product/432012393X/
  21. None