Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

人工知能と機械学習 / Artificial Intelligence and Machine...

Yukino Baba
October 19, 2023

人工知能と機械学習 / Artificial Intelligence and Machine Learning

🎥講義動画はこちら

人工知能と機械学習
Artificial Intelligence and Machine Learning

本講義では人工知能と機械学習の基礎について解説する。いまの人工知能に何ができてどういう場面で活用されているのかを紹介する。また、大量のデータからルールを学習する技術である機械学習について、その仕組みを紹介する。
This is an introductory lecture on artificial intelligence and machine learning. You will learn what artificial intelligence can do and how artificial intelligence is impacting our everyday lives. Machine learning plays an important role in the current development of artificial intelligence. This lecture also teaches you how machine learning actually works.

馬場 雪乃 准教授(東京大学大学院総合文化研究科広域科学専攻)

Yukino Baba

October 19, 2023
Tweet

More Decks by Yukino Baba

Other Decks in Education

Transcript

  1. ˔ ਓؒ͸ϧʔϧΛֶश͢Δ͜ͱ͕Ͱ͖Δ ˙ ྫɿ೔ৗͰ਺ࣈΛݟΔதͰɼͦΕͧΕͷ਺ࣈΛଞͷ਺ࣈͱ۠ผ͢ΔͨΊͷಛ ௃తͳ෦෼Λݟ͚ͭϧʔϧΛߏஙͰ͖Δ ˔ ਓ͕ؒࣗવʹߦ͍ͬͯΔʮܦݧ͔ΒͷֶशʯΛίϯϐϡʔλͰ࣮ݱ͢Δٕज़͕ 
 ػցֶश ˙

    ྫɿͷखॻ͖਺ࣈͷྫɼͷखॻ͖਺ࣈͷྫʜΛڭࡐͱͯ͠༩͑Δ ˙ ਓؒ͸ɼڭࡐ͔Βͷֶशํ๏͚ͩΛίϯϐϡʔλϓϩάϥϜʹࢦࣔ͢Δ ਓ޻஌ೳͱ͸ ػցֶशΛ༻͍Δ͜ͱͰσʔλ͔ΒϧʔϧΛֶशͤ͞Δ 6 1 1 9 9 7 7 ϧʔϧΛֶश ʜ
  2. ˔ εϚʔτεϐʔΧʔ 
 ਓؒͷԻ੠ࢦࣔʹै͍༷ʑͳಈ࡞Λߦ͏ ˔ ϩϘοτ૟আػ 
 ো֐෺Λආ͚ͳ͕Β෦԰શମΛ૟আ͢Δ ˔ إೝূ

    
 Χϝϥલͷਓ෺͕ొ࿥͞ΕͨਓͱಉҰਓ෺͔Ͳ͏͔Λ൑ఆ ˔ ίϯςϯπɾ঎඼ਪન 
 Ӿཡཤྺ΍ߪങཤྺʹ΋ͱ͖ͮϢʔβ͕޷ΉΞΠςϜΛఏࣔ ೔ৗͷதͷਓ޻஌ೳ զʑͷ೔ৗͷ͞·͟·ͳ৔໘Ͱਓ޻஌ೳ͕׆༻͞Ε͍ͯΔ 8
  3. ˔ *#.8BUTPO 
 ΞϝϦΧͷΫΠζ൪૊ʮ+FPQBSEZʯʹ௅ઓɼৗ࿈ग़ԋऀΛഁΓ༏উ ˔ ౦ϩϘ͘Μ 
 େֶೖࢼ໛ࢼͷ਺ֶɾੈք࢙Ͱภࠩ஋௒͑Λୡ੒ ˔ %FFQ#MVF

    
 νΣεͷੈքνϟϯϐΦϯʹউར ˔ "MQIB(P 
 ғޟͷੈքτοϓع࢜ʹউར ೔ৗͷதͷਓ޻஌ೳ ΫΠζ΍ήʔϜͰਓؒΛ௒͑Δਓ޻஌ೳ͕ొ৔ 9
  4. ˔ ਓ޻஌ೳ͸ʮಛԽܕʯͱʮ൚༻ܕʯͷೋछྨʹେผ͞ΕΔ ˔ ಛԽܕਓ޻஌ೳ͸ 
 ͋Δಛఆͷঢ়گ΍໰୊ʹ͓͍ͯ஌తʹ;Δ·͏ਓ޻஌ೳ ˔ ൚༻ਓ޻஌ೳ͸ 
 ਓؒͱಉ༷ʹ༷ʑͳঢ়گɾ໰୊ʹ͓͍ͯ஌తͳ;Δ·͍͕Ͱ͖Δਓ޻஌ೳ

    ˔ ݱࡏͷਓ޻஌ೳ͸ಛԽܕਓ޻஌ೳͰ͋Γ 
 ൚༻ਓ޻஌ೳ͸ະ࣮ͩݱ͞Ε͍ͯͳ͍ 
 ݱࡏͷਓ޻஌ೳʹͰ͖Δ͜ͱ ݱࡏͷਓ޻஌ೳ͸ಛఆͷ͜ͱ͚ͩͰ͖ΔಛԽܕਓ޻஌ೳ 10
  5. ˔ ը૾ೝࣝ 
 ࣸਅʹ͍ࣸͬͯΔ΋ͷΛೝࣝ͢Δ ˔ ෺ମݕग़ 
 ࣸਅͷͲ͜ʹԿ͕͍ࣸͬͯΔͷ͔Λೝࣝ͢Δ ˔ ը૾ੜ੒

    
 ຊ෺ͷࣸਅͷΑ͏ͳը૾Λਓ޻తʹ࡞Γग़͢ ˔ UFYUUPJNBHF 
 ࣗવݴޠʹΑΔࢦࣔͰࣸਅ΍ΠϥετΛੜ੒ ݱࡏͷਓ޻஌ೳʹͰ͖Δ͜ͱ ը૾ॲཧɿࣸਅʹ͍ࣸͬͯΔ΋ͷͷೝࣝ΍ը૾ͷੜ੒͕Ͱ͖Δ 11 ຊ෺ ਓ޻ (*) ग़యɿhttp://cs231n.stanford.edu/slides/2019/cs231n_2019_lecture12.pdf 
 (**) ग़యɿhttps://arxiv.org/abs/1711.09020 
 (***) ग़యɿhttps://ja.wikipedia.org/wiki/Stable_Diffusion#/media/ϑΝΠ ϧ:A_photograph_of_an_astronaut_riding_a_horse_2022-08-28.png (*) (**) ʠ"QIPUPHSBQIPGBO BTUSPOBVUSJEJOHB IPSTFʡͱ͍͏ࢦࣔʹΑ Γੜ੒͞Εͨը૾
  6. ˔ จॻ෼ྨ 
 จॻΛಛఆͷΧςΰϦʹ෼ྨ͢Δ ˔ ػց຋༁ 
 ͋ΔݴޠͰॻ͔ΕͨจষΛผͷݴޠʹ຋༁͢Δ ˔ ৘ใݕࡧ

    
 ಛఆͷ৘ใ͕ܝࡌ͞Ε͍ͯΔ΢ΣϒϖʔδΛݟ͚ͭΔ ˔ ࣭໰Ԡ౴ 
 จষͰ༩͑ΒΕ࣭ͨ໰ʹର͢Δ౴͑Λฦ͢ ݱࡏͷਓ޻஌ೳʹͰ͖Δ͜ͱ ݴޠॲཧɿ຋༁΍࣭໰Ԡ౴Λ͢Δ͜ͱ͕Ͱ͖Δ 12
  7. ˔ ൚༻తͳݴޠӡ༻ೳྗΛ֫ಘͨ͠େن໛ݴޠϞσϧʢ-BSHFMBOHVBHF NPEFM--. ͕ొ৔ ˙ େྔͷจॻσʔλΛ༻͍ͯจষதͷ୯ޠΛ༧ଌ͢ΔϞσϧΛࣄલֶश ˙ ͜ͷϞσϧ͸ɼ༩͑ΒΕͨจষͷଓ͖Λੜ੒Ͱ͖Δ ˔ --.ͷҰछͰ͋Δ(15

    (FOFSBUJWFQSFUSBJOFEUSBOTGPSNFS Λɼ 
 ର࿩ܗࣜͰ࢖͏ͨΊʹௐ੔ͨ͠$IBU(15͸ 
 ࣭໰Ԡ౴ɼ຋༁ɼཁ໿ͳͲ༷ʑͳ༻్Ͱߴ͍ੑೳΛൃش͍ͯ͠Δ ˔ ը૾ॲཧͰ΋ɼେྔσʔλ͔Β൚༻తͳࢹ֮ಛ௃Λ֫ಘͨ͠ࣄલֶशࡁΈϞσϧ ͕׆༻͞Ε͍ͯΔ ˔ ༷ʑͳ༻్ʹ׆༻Ͱ͖Δେن໛Ϟσϧ͸ج൫Ϟσϧͱ΋ݺ͹ΕΔ ݱࡏͷਓ޻஌ೳʹͰ͖Δ͜ͱ େن໛ݴޠϞσϧ͸༷ʑͳ༻్ʹ׆༻Ͱ͖Δ 13
  8. ˔ Ի੠ೝࣝ 
 ࿩͞Ε͍ͯΔ಺༰ΛจষͰॻ͖ى͜͢ ˔ ࿩ऀಉఆ 
 ొ࿥͞Εͨਓ෺ͱಉ͡ਓ͕࿩͍ͯ͠Δ͔൑ఆ͢Δ ˔ Ի੠߹੒

    
 ਓ͕ؒ࿩͍ͯ͠ΔΑ͏ͳ੠Λਓ޻తʹ࡞Γग़͢ ݱࡏͷਓ޻஌ೳʹͰ͖Δ͜ͱ Ի੠ॲཧɿॻ͖ى͜͠΍Ի੠߹੒͕Ͱ͖Δ 14
  9. ˔ ػցֶश͸ɼ 
 ίϯϐϡʔλϓϩάϥϜʹσʔλ͔ΒϧʔϧΛֶशͤ͞Δٕज़  ˔ େྔͷೖग़ྗྫͷσʔλΛڭࡐͱͯ͠༩͑ɼ 
 ೖྗͱग़ྗΛରԠ͚ͮΔϧʔϧΛֶशͤ͞Δ ػցֶशͱ͸

    ػցֶश͸ೖྗͱग़ྗΛରԠ͚ͮΔϧʔϧΛֶश͢Δ 20 (*) ຊߨٛͰऔΓ্͛Δػցֶश͸ɼݫີʹ͸ʮڭࢣ෇͖ػցֶशʯͱݺ͹ΕΔ ػցֶश ϧʔϧ 5 8 7 ೖྗྫ ग़ྗྫ ϧʔϧ ೖྗ ༧ଌ 8 ֶश 
 ೖग़ྗྫΛ࢖ͬͯϧʔϧΛֶश͢Δ ਪ࿦ 
 ֶशͨ͠ϧʔϧ͸ɼ৽͍͠ೖྗʹର͢Δग़ྗΛ 
 ༧ଌ͢Δͷʹ༻͍Δ
  10. ػցֶशͱ͸ ػցֶश͸ೖྗͱग़ྗΛରԠ͚ͮΔϧʔϧΛֶश͢Δ 21 ෺ମݕग़ Ի੠߹੒ ػց຋༁ 5FYUUP*NBHF ೖྗ ग़ྗ Imagine

    the Future C'est la vie. That's life. ਓ޻஌ೳ (*) ग़యɿhttps://bakeryscan.com/bakeryscan 
 (**) ग़యɿhttps://ja.wikipedia.org/wiki/Stable_Diffusion#/media/ϑΝΠϧ:A_photograph_of_an_astronaut_riding_a_horse_2022-08-28.png A photograph of an astronaut riding a horse (*) (*) (**)
  11. ܇࿅σʔλ ྫ୊ɿϖϯΪϯͷ෼ྨϧʔϧͷֶश 23 ϖϯΪϯ෼ྨͷϧʔϧ ཌྷͷ௕͞ 
 ମॏ 03 ©bluegio ΞσϦʔ

    
 ϖϯΪϯ δΣϯπʔ 
 ϖϯΪϯ ݸମ൪߸ ཌྷͷ௕͞<NN> ମॏ<H> छྨ 1 181 3750 ΞσϦʔ 2 186 3800 ΞσϦʔ 3 195 3250 ΞσϦʔ 4 193 3450 ΞσϦʔ 5 190 3650 ΞσϦʔ … ݸମ൪߸ ཌྷͷ௕͞<NN> ମॏ<H> छྨ 152 211 4500 δΣϯπʔ 153 230 5700 δΣϯπʔ 154 210 4450 δΣϯπʔ 155 218 5700 δΣϯπʔ 156 215 5400 δΣϯπʔ … ཌྷͷ 
 ௕͞ ܇࿅σʔλ ֶश (*)ग़యɿhttps://www.deviantart.com/bluegio/art/Adelie-Chinstrap-and-Gentoo-867439280 (**) ग़యɿhttps://www.galapagos.org/blog/the-measure-of-a-penguin/ 
 (***) σʔλͷग़యɿhttps://allisonhorst.github.io/palmerpenguins/ (*) (**) (***)
  12. ܇࿅σʔλ ܇࿅σʔλ͸਺஋Ͱදݱ͞Εͳ͍ͱ͍͚ͳ͍ 24 211 220 223 … 213 217 217

    220 … 210 214 217 216 … 205 … … … … … 216 217 214 … 181 The quick brown fox jumps over the lazy dog aardvark … brown … dog … zzzat 0 … 1 … 1 … 0 (*) (*) ग़యɿhttp://cs231n.stanford.edu/slides/2019/cs231n_2019_lecture12.pdf
  13. ମॏ<H> ཌྷͷ௕͞<NN> 
 ͱ͍͏ϧʔϧΛڥքઢͰදݱ ≥ 4000 ମॏ ͳΒδΣϯπʔ ϧʔϧ ϖϯΪϯͷ෼ྨϧʔϧΛڥքઢͰදݱ

    25 ମॏ<H> ཌྷͷ௕͞<NN> ΞσϦʔ δΣϯπʔ ܇࿅σʔλͷਤࣔ ཌྷͷ௕͞ʹΑͬͯ͸ɼମॏʾHͰ΋ 
 ΞσϦʔͷ৔߹͕͋Δ
  14. ϧʔϧ ϧʔϧ͸਺ࣜͰදݱ͞ΕΔ 26 ମॏ<H> ཌྷͷ௕͞<NN> ମॏͱཌྷͷ௕͞ͷ྆ํΛ༻͍ͨϧʔϧΛ 
 ڥքઢͰදݱ 88× +

    ≥ 22249 ཌྷͷ௕͞ ମॏ ͳΒδΣϯπʔ ˔ ϧʔϧΛද͢਺ࣜΛϞσϧͱ͍͏ ˔ ೖྗͷσʔλͦΕͧΕΛఆ਺ഒͯ͠଍ ͠߹ΘͤͨϞσϧΛઢܗϞσϧͱ͍͏
  15. ϧʔϧͷֶश ଛࣦ͕࠷খͱͳΔϧʔϧΛޯ഑߱Լ๏ʹΑΓݟ͚ͭΔ 28 (*) https://playground.tensor fl ow. org/ Λ༻͍ͯ࡞੒ 


    (**) https://medium.com/in-pursuit-of-arti fi cial- intelligence/data-visualization-in- python-9aa1d9c2baec ֶश͕ਐΉʹͭΕͯɼϧʔϧʹΑΔޡ෼ྨ͕ݮΔʢଛࣦ͕খ͘͞ͳΔʣ S <latexit sha1_base64="Vs3CjN3QbTk5+UuzDG2K6h7mWps=">AAACt3icbVHRShtBFJ2sbbWxrbF97MvSIFiQsCuhtQ+C0Jc+FIliVEiWMDu5awZnZzczd6Jx2H/ou6/2o/wbZ9dFNPHCwOGce+cc7o1zwTUGwX3DW3nz9t3q2vvm+oePnzZam59PdWYUgz7LRKbOY6pBcAl95CjgPFdA01jAWXz5u9TPZqA0z+QJznOIUnohecIZRUeNWht/t+0wpTiJE3tVFN9HrXbQCaryl0FYgzapqzfabPwbjjNmUpDIBNV6EAY5RpYq5ExA0RwaDTlll/QCBg5KmoKO7HUVvfC3HDX2k0y5J9Gv2OcjlqZaz9PYdZYp9aJWkq9pA4PJXmS5zA2CZI9GiRE+Zn65B3/MFTAUcwcoU9yF9dmEKsrQbeuFS5wWza3nBGNlVr0DRoCaOXV4DFPj/uvV3idhZMuWynhRRNxPqNCwU+UI91EZiKzgMbiNSVgemFE1NZG94d1l7WksshKu8Lpah7thuHixZXC62wl/dLpH3fbBYX3NNfKVfCPbJCQ/yQH5Q3qkTxgx5Jbckf/eL2/kJd7ksdVr1DNfyIvypg/YBtxS</latexit> !(w) ※؆୯ <latexit sha1_base64="pGgNA38mHq2qJTEFQGUOuS0/tzw=">AAACqXicbVFdS+NAFJ3Gz63f6+O+BIsgKCWRor4Iwr74JHXXarENZTK9qUMnkzhzp1pDf4Lgk/42/81OYli09ULgcM69c07uDVPBNXree8WZm19YXFr+UV1ZXVvf2Nz6ea0Toxi0WCIS1Q6pBsEltJ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͢ํ޲ʹগͣͭ͠ਐΈ 
 ଛࣦΛ࠷খԽ͢ΔϧʔϧΛݟ͚ͭΔ (*) (**)
  16. ਂ૚ֶश ਂ૚ֶशΛ༻͍ΔͱෳࡶͳϧʔϧΛֶशͰ͖Δ 29 x 1 x 2 (*) https://playground.tensor fl

    ow. org/ Λ༻͍ͯ࡞੒ ୯७ͳϧʔϧͰ͸෼ྨ͕೉͍͠ྫ x 1 x 2 ਂ૚ֶशͰֶशͨ͠ϧʔϧͷྫ (*) ༷ʑͳσʔλʹରͯ͠ 
 ਂ૚ֶशͰֶशͨ͠ϧʔϧͷྫ
  17. ਂ૚ֶश ਂ૚ֶश͸ෳ਺ͷඇઢܗؔ਺Λଟ૚ʹॏͶͯෳࡶͳϞσϧΛදݱ 30 ཌྷͷ௕͞ ମॏ ΞσϦʔ 
 ·ͨ͸ 
 δΣϯπʔ

    ୯७ͳϧʔϧͷ໛ࣜਤ ཌྷͷ௕͞ ମॏ ΞσϦʔ 
 ·ͨ͸ 
 δΣϯπʔ ਂ૚ֶशʹΑΔϧʔϧͷ໛ࣜਤ
  18. ˔ ֶशͷ໨త͸ 
 ʮ܇࿅σʔλʹͳ͍৽͍͠ೖྗʹରͯ͠ਖ਼͍͠ग़ྗΛฦ͢ʯϧʔϧͷֶश ˔ ܇࿅σʔλ΁ͷ౰ͯ͸·Γ͚ͩΛߟྀ͢Δͱ 
 ϧʔϧ͕܇࿅σʔλʹ౰ͯ͸·Γ͗ͯ͢ະ஌ͷೖྗͰ͸ؒҧ͑ΔڪΕ͕͋Δ ˙ ໰୊ू͸׬ᘳʹղ͚Δ͕ຊ൪ͷࢼݧ͕·ΔͰղ͚ͳֶ͍शํ๏

    ˔ ϧʔϧ͕܇࿅σʔλʹ౰ͯ͸·Γ͗͢Δݱ৅Λաֶशͱ͍͏ ˙ ਂ૚ֶशͷΑ͏ͳෳࡶͳϞσϧͰաֶश͕ੜ͡΍͍͢ ˔ աֶशΛ๷͙खஈɿ 
 ܇࿅σʔλΛ૿΍͢ɼਖ਼ଇԽʹΑΓϞσϧͷෳࡶ౓ΛݮΒ͢ ൚Խೳྗͱաֶश ܇࿅σʔλʹ౰ͯ͸·Γ͗͢ΔͱաֶशͱͳΔ 31
  19. ˔ ৽͍͠ೖྗʹରͯ͠ਖ਼͍͠ग़ྗΛฦ͢ೳྗΛ൚Խೳྗͱ͍͏ ˔ աֶशΛى͍ͯ͜͠ͳ͍͔Λ֬ೝ͢ΔͨΊʹɼ 
 ܇࿅σʔλͱ͸ผͷςετσʔλ͕༻͍ΒΕΔ ˙ ςετσʔλ͸໛ٖࢼݧʹ૬౰͢Δ ˔ ܇࿅σʔλͰͷޡ൑ఆͷଟ͞ɹɿ܇࿅ޡࠩ

    
 ະ஌ͷσʔλͰͷޡ൑ఆͷଟ͞ɿ൚Խޡࠩ ˔ ςετσʔλͰͷޡ൑ఆͷଟ͞͸൚ԽޡࠩͷۙࣅͱΈͳͤΔ ൚Խೳྗͱաֶश ςετσʔλΛ༻͍ͯաֶश͕ੜ͍ͯ͡ͳ͍͔֬ೝ͢Δ 32