2幎ã»ã©åã«ãæè€åº·æ¯ ããŒãããäœãDeep Learning âPythonã§åŠã¶ãã£ãŒãã©ãŒãã³ã°ã®çè«ãšå®è£ ã(ãªã©ã€ãªãŒãžã£ãã³) ãšããæ¬ããå幎ã»ã©ãããŠèªãã ã
ãããã§ãæ©æ¢°åŠç¿ããšãããã®ãã©ããããã®ããèªåãªãã«ç解ã§ããããã«æã£ãã
ãã ããç解ããããšããä»äººã«èª¬æããããšã®ã»ããå°é£ã ãéå ·ãšããŠäœ¿ãããªãããšã¯ãããã«å°é£ã ã
åŒããã°ã«éå»èšäºãããã€ãæ®ããŠãããããããã¯çŽç¶ããèªåçšã¡ã¢ã§ãä»äººãèªãã§ç°¡åã«ç解ã§ãããããªã·ãã¢ãã§ãªãããšã¯ãæžããæ¬äººãããèªèŠããŠããã
ããããé«æ ¡æ°åŠãšããœã³ã³ã®ç¥èããã人ãªãç解ã§ããããã«æžãçŽããããšããããšã¯ãããŒãããäœãDeep Learningããèªãã çŽåŸãããã£ãšèããŠããããšãããå®ç掻ã§ã€ãŸããªããã©ãã«ã«å·»ã蟌ãŸããããšãäž»ãªåå ã§ããããããšå 延ã°ãã«ããŠããŸã£ãã
ãªããã©ãã«ãšããã®ã¯ãããã¯ããã§ãã¿ã«ãªãã®ã§ãå°æ¥ããã°ã«æžãããç¥ããªããæ³åŸãšããæŠåšã䜿ã£ãããŸãä»äººã®åãå€§å¹ ã«åããããããŠã°ãã°ããªãããã©ãããåã£ãŠããŸã£ããããã
ããã§é ãŸããªãããäœåãã«åããŠãExcelã§æ軜ã«è©Šãæ©æ¢°åŠç¿ããšããã·ãªãŒãºãæžããŠã¿ãããšæã£ããä»åã¯ããŒãããäœãDeep Learningããé¢ããŠãã§ããã ãèªåã®èšèã§èª¬æããããšãå¿ãããããç®å®ãšããŠã¯ã7ã»ã°ã¡ã³ãLEDãããœã³ã³ã«åŠç¿ãããããããŸã§ãã§ããã ãããïŒ æ¬²ãèšãã°ã誀差éäŒææ³ããããããã®ã ããããã¯å¿çšæ°åŠçã«ãã£ã¡ãèå³æ·±ãã£ãã®ã§ã
ä»åã¯ãåºç« ããšããŠããã¥ãŒãã³æ³ã«ããæ¹çšåŒã®æ°å€è§£æ³ããExcelã®ãã¯ãã䜿ã£ãŠãããããšãããŸã§æžããŠã¿ãããèªè ãéžã¶å 容ãªã®ã§ãããããããã«æ°çããéšããããã®ãé¿ãããããæ¥ä»ãããã®ãŒã£ãŠå ¬éããŸãã
Â
ãã¥ãŒãã³æ³ãšããã®ã¯ã以äžã®ãããªãã®ã ã£ãã
æ¹çšåŒ f(x) = 0 ã®è§£ãæ°å€çã«æ±ãããããŸãã¯ã©ããé©åãããªåæå€ x0 ããšããé¢æ° f ã®å°é¢æ° f' ã®åæå€ x0 ã«ãããå€ãçšããŠã解ã«ããè¿ãå€ x1 ãæ±ããã
äžã«ç€ºãã°ã©ãã§ãã°ã©ãäžã®ç¹ (x0, f(x0)) ãx軞äžã®ç¹ (x0, 0) ããããŠÂ (x0,f(x0)) ã«ãããæ¥ç·ãšx軞ã®äº€ç¹ (x1, 0) ã®ã€ããäžè§åœ¢ã«çç®ããã
(x0, f(x0)) ã«ãããæ¥ç·ã®åŸãã¯Â f'(x0)ãªã®ã§ãx1 ã¯
ã§èšç®ã§ããã
åæ§ã®æé ã§Â x2 ãx3 âŠãšèšç®ãç¹°ãè¿ãããšã«ãããã°ã©ããš x軞ã®äº€ç¹ã® x座æšããªãã¡æ¹çšåŒ f(x) = 0 ã®è§£ãããããã§ãæ£ç¢ºã«æ±ããããã®ã§ããã
ééã£ãããšæžããŠãŸããããïŒ ãæææè¿ã
Â
ãŒãããäœãDeep Learning âPythonã§åŠã¶ãã£ãŒãã©ãŒãã³ã°ã®çè«ãšå®è£
- äœè : æè€åº·æ¯
- åºç瀟/ã¡ãŒã«ãŒ: ãªã©ã€ãªãŒãžã£ãã³
- çºå£²æ¥: 2016/09/24
- ã¡ãã£ã¢: åè¡æ¬ïŒãœããã«ããŒïŒ
- ãã®ååãå«ãããã° (18件) ãèŠã
 Â
ãã®æ¹æ³ãçšããŠãããç°¡åãªå®äŸãExcelã«èšç®ãããŠã¿ãã
f(x) = x^2 - 2 ãšã㊠f(x) = 0 ã解ããšãx = ± â2 ãšãªããf(x) = 0 ã®æ°å€è§£ãæ±ãããšããããšã¯ãâ2 ã®å€ãèšç®ãããšããããšã ãç¹°ãè¿ãèšç®ã¯ããã¯ãã«ããããŠã¿ãã
ã¹ã¯ãªãŒã³ã·ã§ããã¯Excel2016ããæ¡åããŸããã
ã»ã«B2ã¯ãxã®åæå€ãå ¥ãããC2ã«ã¯ãæ°åŒã=B2^2-2ããå ¥åããïŒã«ã®ã«ãã³å ã®æ°åŒã¯Excelã«ã³ããå¯èœã®ã¯ãã以äžåãïŒã
ãæ°å€åŸ®åäœæ¥ãšãªã¢ãã®ã»ã«E3ã¯ãããŒã¿ã®çŽæ¥å ¥åã§ãããF2ã«ã¯ã=B2+E3ãããšãG3ã«ã¯ã=F3^2-2ããšå ¥åããã
ãããã®ã»ã«ã®èšç®çµæãçšããŠãæ°å€åŸ®å f'(x)ããªãã¡ã»ã«E6ã®ã=(G3-C2)/E3ããšãx1ããªãã¡ã»ã«B6ã®ã=B2-C2/E6ããèšç®ããã
æ°å€åŸ®åããããŠçšããã®ã¯ãæ©æ¢°åŠç¿ãšããä»åŸã®äž»é¡ãèŠãããŠã®ããšã§ããã
äžèŠ§è¡šã«ãŸãšããã»ãããããããããããªïŒ
ã»ã« |  æ°åŒ |
 B2 | (æ°å€) |
 C2 | =B2^2-2 |
 E3 | (æ°å€) |
 F3 | =B2+E3 |
 G3 | =F3^2-2 |
 E6 | =(G3-C2)/E3 |
 B6 | =B2-C2/E6 |
ãã®ç¶æ ã§ãã»ã«B6ãã³ããŒããŠã»ã« B2ã«ãå€ã®è²Œãä»ãããè¡ãã
ãã®æäœãç¹°ãè¿ããšãé©ãã¹ãã¹ããŒãã§B2 ã®å€ã¯ã1.41421356ãã«ãC2ã®å€ã¯ã0ãã«åæããã¯ãã§ããããªãB2ã®åæå€ããã€ãã¹ã«ãšããšãB2ã®å€ã¯ã-1.4142136ãã«åæããã
Â
ä»åã¯ãç¹°ãè¿ãèšç®ããã¯ãã«èšé²ããŠãããããšãããŸã§ãã£ãŠã¿ããã
Excel2016ã§ã¯ããã¯ããèšé²ããããã®ãéçºãã¿ããåæç¶æ ã§ã¯é衚瀺ãªã®ã§ã衚瀺ãããã
ãªãã³ã®ããã¡ã€ã«ããã¯ãªãã¯ããæ å ±ç»é¢ã®å·Šç«¯ã¡ãã¥ãŒãã¡ã°ãäžã®ããªãã·ã§ã³ããã¯ãªãã¯ããã
Â
ãExcel ã®ãªãã·ã§ã³ãç»é¢ã衚瀺ãããã®ã§ãããªãã³ã®ãŠãŒã¶ãŒèšå®(B):ãã®ãâ¡éçºãã«ãã§ãã¯ãå ¥ããã
ã¯ãŒã¯ã·ãŒãã«æ»ããšãéçºãã¿ãã衚瀺ãããããã«ãªãã
Â
ãéçºã¿ããäžã®ããã¯ãã®èšé²ããã¿ã³ãã¯ãªãã¯ãããš
Â
ããã¯ãã®èšé²ããã€ã¢ãã°ããã¯ã¹ã衚瀺ãããããOKããã¿ã³ãã¯ãªãã¯ãããšãæäœã®èšé²ãå§ãŸãã
èšé²äžã¯ãããã¯ãã®èšé²ããã¿ã³ã¯Â ãâ èšé²çµäºãã«å€åããŠãããäœãæäœãã¹ããããããã®ãâ èšé²çµäºããã¿ã³ãã¯ãªãã¯ããŠæåããããçŽãã°ããã
Â
èšé²ããã®ã¯æ¬¡ã®2æäœã ãã§ããã
- ã»ã«ãB6ãäžã§å³ã¯ãªãã¯ããã·ã§ãŒãã«ããã¡ãã¥ãŒãã³ããŒ(C)ããã¯ãªãã¯ãã
- ã»ã«ãB2ãäžã§å³ã¯ãªãã¯ããã·ã§ãŒãã«ããã¡ãã¥ãŒã貌ãä»ãã®ãªãã·ã§ã³ïŒããããå€(V)ããã¯ãªãã¯ãã
Â
äžèš2ã€ã®æäœããããããâ èšé²çµäºããã¿ã³ãã¯ãªãã¯ããŠããã¯ãã®èšé²ãçµäºããã
Â
èšé²ãããã¯ãã¯ããªãã³ã®ããã¯ãããã¿ã³ã§ç¢ºèªã§ããã
Â
ããã¯ãããã¿ã³ãã¯ãªãã¯ãããšããã¯ãããã€ã¢ãã°ããã¯ã¹ã衚瀺ãããã
Â
èšé²ãããŠãããã¯ãã¯ãå®è¡(R)ããã¿ã³ãã¯ãªãã¯ããã°å®è¡ã§ããããç¹°ãè¿ãå®è¡ã«ã¯é©ããŠããªãã®ã§ããã¿ã³ãäœæããŠãã¯ããå²ãåœãŠãããšã«ããã
Â
ãæ¿å ¥ããã¿ã³é äžã®ããã©ãŒã ã³ã³ãããŒã«ãäžããã¿ã³ïŒãã©ãŒã ã³ã³ãããŒã«ïŒããã¯ãªãã¯ããã
Â
ã¯ãŒã¯ã·ãŒãç¶ã®ã©ãã空ããŠããå ŽæïŒããŒã¿ã®å ¥åãããã»ã«ã®ãªãå ŽæïŒã§æãã«ãã©ãã°ãããšãããã¯ãã®ç»é²ããã€ã¢ãã°ããã¯ã¹ã衚瀺ãããã
èšé²ããããã¯ãã®ãã¡ããã¿ã³ã«ç»é²ããããã¯ãåãã¯ãªãã¯ããŠéžæãããäžã€ãããªããã°ãããã§ããã
Â
ãOKããã¯ãªãã¯ãããšããã©ãã°ãããµã€ãºã®ãã¿ã³ã衚瀺ãããã
äžæŠç¡é¢ä¿ãªå Žæãã¯ãªãã¯ããŠéžæã解é€ããŠããã¯ãªãã¯ãããšãèšé²ãããã¯ããå®è¡ãããã
Â
ãã¿ã³ã®ç·šéãåé€ã¯ãäžæŠãã¿ã³äžã§å³ã¯ãªãã¯ãããšãã¿ã³ãéžæã§ããã®ã§ãããããŠããè¡ãã°ããã
ããã«C2ãšG3ã®æ°åŒãã
ã=B2^2-3ãã=F3^2-3ã
ã=B2^2-5ãã=F3^2-5ã
ãªã©ãšå€æŽãããš â3ãâ5 ãªã©ã®æ°å€ãæ±ãŸãã®ã§ãç系人éã¯é¢çœãã£ãŠãããããããªãããªã
ãšã«ããæ°æã¡ããã»ã©åæã¹ããŒããéãã®ã ãç系人éã ã£ããç¥ã£ãŠãããåœç¶ã
Â
ã¡ãªã¿ã«ãã¯ãã€ãExcelããã¯ãä¿åããããšãã«ã¯ããååãä»ããŠä¿åããã€ã¢ãã°ããã¯ã¹ã®ããã¡ã€ã«ã®çš®é¡(T):ãããããExcelãã¯ãæå¹ããã¯(*.xlsm)ããéžæããå¿ èŠãããã
Â
ãã¯ãã€ãExcelããã¯ãéãããšãã«ã¯ãã»ãã¥ãªãã£ã®èŠåãã¡ãã»ãŒãžã衚瀺ãããã
ãã¯ããæå¹ã«ããããšãã«ã¯ãã³ã³ãã³ãã®æå¹åããã¯ãªãã¯ããã°ããã
Â
ãªããã»ãã¥ãªãã£ã®èŠåãã¯ããã¯ããŠã€ã«ã¹ïŒãã¯ãã§æžããããŠã€ã«ã¹ïŒã®è¢«å®³ãé²ãããã®ãã®ãªã®ã§ããã身ã«èŠãã®ãªããã¡ã€ã«ã§ãã»ãã¥ãªãã£ã®èŠåãã衚瀺ãããå Žåã«ã¯ããã³ã³ãã³ãã®æå¹åããã¯ãªãã¯ããªãã§ããã ã¡ã«ãã¡ã€ã«ãåé€ããŠã€ã«ã¹ã¹ãã£ã³ãå®è¡ããŠãã ããã
ãåç¥ã®ããšãšã¯æããŸããã念ã®ããã
Â
ç¹°è¿ãã«ãªããŸãããä»åã¯ãããŸã§åºç« ã§ãæ¬é¡ã«å ¥ãã®ã¯æ¬¡å以éã§ãã
è¿œèšïŒ
ä»åã®ã·ãŒãã®å 容ãCSVã§ä¿åããŠã¿ãŸããã
,x,f(x)=x^2-2,,æ°å€åŸ®åäœæ¥ãšãªã¢,,,,
,10,=B2^2-2,,h,x+h,f(x+h),,
,,,,0.0001,=B2+E3,=F3^2-2,,
,,,,æ°å€åŸ®å,,,,
,x1=x-f(x)/f'(x),,,f'(x)=(f(x+h)-f(x))/h,,,,
,=B2-C2/E6,,,=(G3-C2)/E3,,,,
äžã®ããŒã¿ãããã¹ããã¡ã€ã«ã«ä¿åããæ¡åŒµåãã.csvãã«å€æŽããŠExcelã§éããŠãã ããã眫ç·ãåå¹ ãªã©ã®æ å ±ã¯é£ãã§ããŸããŸãããæ°åŒãæ°å€ãæåããŒã¿ã®å ¥åã®æéã¯çç¥ã§ããã¯ãã§ãã
ã¹ãã³ãµãŒãªã³ã¯
Â