ã¯ããã«
ããã°ã©ãã³ã°ã®äžçã¯ãæ°ããæè¡ããã¬ãŒã ã¯ãŒã¯ãæ¥ã çãŸãããã®é²åã¯æ¢ãŸãããšãç¥ããŸããããã®äžã§ããPythonãšMojoã¯ããã®ã·ã³ãã«ããšå¹çæ§ããå€ãã®éçºè ã«æ¯æãããŠããŸãããã®èšäºã§ã¯ããããã®ããŒã«ã掻çšããããã®åºæ¬çãªã¬ã€ããæäŸããŸãã
Pythonã¯ããã®èªã¿ããããšæžããããããåå¿è ã«ãæ±ããããããã°ã©ãã³ã°èšèªã§ãããäžæ¹Mojoã¯ããã®å¹çæ§ãšæ¡åŒµæ§ããå€ãã®Webéçºè ã«æçšãããŠããŸããããããçµã¿åãããããšã¯çŸä»£ã®Webéçºã«ãããŠéåžžã«æçã§ãã æ¬èšäºã§ã¯ãPythonãšMoandã®åºæ¬çãªç¹æ§ãããPythonã§Mojoãã»ããã¢ãããã掻çšããæ¹æ³ãŸã§ã解説ããŸãã
ãŸããæ¬èšäºã¯ãããã°ã©ãã³ã°ã«èå³ããã人ããPythonãMojoãåŠã³å§ããã°ããã®äººã ã«ãšã£ãŠãç解ããããå 容ãšãªã£ãŠããŸããããã§ã¯ãPythonãšMojoã®äžçãžäžç·ã«èžã¿èŸŒãã§ã¿ãŸãããã
Pythonãšã¯
Pythonã¯ããã®åã瀺ãéãã倧èã®ããã«åŒ·åã§ããããæ±ããããããã°ã©ãã³ã°èšèªã§ãã1980幎代æ«ã«ã°ã€ãã»ãŽã¡ã³ãããµã ã«ãã£ãŠéçºããããã®ã·ã³ãã«ããšå¯èªæ§ã®é«ããããåå¿è ããçµéšè±å¯ãªãããã§ãã·ã§ãã«ãŸã§å¹ åºããŠãŒã¶ãŒã«æãããŠããŸãã
Pythonã¯ããã®æè»æ§ãšæ±çšæ§ãããããŸããŸãªçšéã§äœ¿çšãããŠããŸããWebéçºãããŒã¿åæãæ©æ¢°åŠç¿ãAIéçºãªã©ãPythonã¯ããããã¹ãŠã®åéã§æŽ»èºããŠããŸãããŸããPythonã¯ãªãŒãã³ãœãŒã¹ã§ãããäžçäžã®éçºè ããæãã³ãã¥ããã£ã«ãã£ãŠæ¯ããããŠããŸããããã«ãããPythonã¯åžžã«é²åãç¶ããæ°ããã©ã€ãã©ãªããã¬ãŒã ã¯ãŒã¯ãæ¥ã éçºãããŠããŸãã
Pythonã®ããäžã€ã®å€§ããªç¹åŸŽã¯ããã®ã³ãŒãã®å¯èªæ§ã§ããPythonã¯ãã€ã³ãã³ããçšããŠã³ãŒããããã¯ãæ確ã«ãããªã©ãã³ãŒããèªã¿ããããç解ããããããšãéèŠããŠããŸããããã«ãããPythonã¯ååŠè ã«ãšã£ãŠåŠã³ãããèšèªã§ããããŸããããŒã ã§ã®éçºã«ãããŠãã³ãŒãã®ç解ã容æã«ããŸãã
ãããã®ç¹æ§ãããPythonã¯åããŠããã°ã©ãã³ã°ãåŠã¶äººãæ°ãããããžã§ã¯ããå§ããéçºè ã倧èŠæš¡ãªã·ã¹ãã ãæ§ç¯ãããšã³ãžãã¢ãªã©ãããŸããŸãªäººã ã«ãšã£ãŠé åçãªéžæè¢ãšãªã£ãŠããŸãã次ã®ã»ã¯ã·ã§ã³ã§ã¯ãPythonãšåæ§ã«åŒ·åã§æ±ãããããã¬ãŒã ã¯ãŒã¯ãMojoã«ã€ããŠè§£èª¬ããŸãã
![](https://techsuite.biz/wp-content/uploads/2023/06/ããŠã³ããŒã-21-300x169.png)
Mojoãšã¯
Mojoã¯ãPerlã§æžãããéåžžã«åŒ·åã§æè»ãªWebãã¬ãŒã ã¯ãŒã¯ã§ãããã®ååã¯ãéæ³(Magic)ããæå³ãããMojoliciousãããæ¥ãŠããããã®åã®éããMojoã¯éçºè ã«éæ³ã®ãããªåãäžããŠãããŸãã
Mojoã¯ãWebéçºã«ãããå€ãã®ã¿ã¹ã¯ãç°¡åã«ããå¹ççã«ããããã®å€ãã®æ©èœãæäŸããŠããŸããããã«ã¯ãã«ãŒãã£ã³ã°ãã»ãã·ã§ã³ç®¡çããã³ãã¬ãŒããšã³ãžã³ãWebãœã±ãããéåæããã°ã©ãã³ã°ãªã©ãå«ãŸããŸãããããã®æ©èœã¯ãã¹ãŠãäžã€ã®çµ±äžãããAPIã®äžã§æäŸãããŠãããããã«ããéçºè ã¯äžè²«æ§ã®ããæ¹æ³ã§ãããã®æ©èœãå©çšããããšãã§ããŸãã
ãŸããMojoã¯ããªã¢ã«ã¿ã€ã Webãã匷ãæèããŠèšèšãããŠããŸããããã¯ãWebã¢ããªã±ãŒã·ã§ã³ããªã¢ã«ã¿ã€ã ã«ããŒã¿ãéåä¿¡ãããŠãŒã¶ãŒãšã®ã€ã³ã¿ã©ã¯ã·ã§ã³ãå³æã«åæ ãããšããèãæ¹ã§ããMojoã¯ããã®ãªã¢ã«ã¿ã€ã Webãå®çŸããããã®æ©èœãå€æ°åããŠããŸãã
Mojoã®ããäžã€ã®å€§ããªç¹åŸŽã¯ããã®ãã¢ãã³ããã§ããMojoã¯ãææ°ã®Webéçºã®ãã¬ã³ããšæè¡ãåãå ¥ããããããç°¡åã«å©çšã§ããããã«ããŠããŸããããã«ãããMojoã䜿ãéçºè ã¯ãåžžã«æå 端ã®Webéçºãè¡ãããšãã§ããŸãã
ãããã®ç¹æ§ã«ãããMojoã¯Webéçºè ã«ãšã£ãŠéåžžã«é åçãªãã¬ãŒã ã¯ãŒã¯ãšãªã£ãŠããŸãã次ã®ã»ã¯ã·ã§ã³ã§ã¯ããã®PythonãšMojoãçµã¿åãããããšã®å©ç¹ã«ã€ããŠè§£èª¬ããŸãã
PythonãšMojoã®çµã¿åããã®å©ç¹
PythonãšMojoãçµã¿åãããããšã§ãéçºè ã¯åŒ·åãªããŒã«ã»ãããæã«å ¥ããããšãã§ããŸããPythonã®ã·ã³ãã«ããšå¯èªæ§ããããŠMojoã®åŒ·åãªWebéçºæ©èœã¯ãäžç·ã«äœ¿ãããšã§ãã®å¹æãæ倧éã«åŒãåºãããšãã§ããŸãã
ãŸããPythonãšMojoã®çµã¿åããã¯ãéçºè ãå¹ççã«ã³ãŒããæžãããšãå¯èœã«ããŸããPythonã®ã·ã³ãã«ããšçŽæçãªæ§æã¯ãã³ãŒãã®èªã¿ããããšä¿å®æ§ãé«ããŸããäžæ¹ãMojoã®è±å¯ãªæ©èœã¯ãWebéçºã®å€ãã®åŽé¢ãã«ããŒããéçºè ãå¿ èŠãšããæ©èœãæ軜ã«å©çšã§ããããã«ããŸãã
次ã«ãPythonãšMojoã®çµã¿åããã¯ããªã¢ã«ã¿ã€ã Webã¢ããªã±ãŒã·ã§ã³ã®éçºã容æã«ããŸããMojoã®Webãœã±ãããéåæããã°ã©ãã³ã°ã®æ©èœã¯ããªã¢ã«ã¿ã€ã ã®ããŒã¿éä¿¡ãç°¡åã«å®çŸããŸããããã«ããããã£ããã¢ããªããªã¢ã«ã¿ã€ã ã®ããŒã¿ã¢ãã¿ãªã³ã°ãªã©ããªã¢ã«ã¿ã€ã æ§ãæ±ããããã¢ããªã±ãŒã·ã§ã³ã®éçºã容æã«ãªããŸãã
ãŸããPythonãšMojoã®çµã¿åããã¯ãéçºè ãææ°ã®Webéçºã®ãã¬ã³ããåãå ¥ããããšã容æã«ããŸããMojoã¯åžžã«ææ°ã®Webéçºã®ãã¬ã³ããåãå ¥ããããããç°¡åã«å©çšã§ããããã«ããŠããŸããããã«ãããPythonãšMojoã䜿ãéçºè ã¯ãææ°ã®Webéçºã®ãã¬ã³ããåãå ¥ããã¢ããªã±ãŒã·ã§ã³ãç°¡åã«éçºããããšãã§ããŸãã
æåŸã«ãPythonãšMojoã®çµã¿åããã¯ãéçºè ã倧èŠæš¡ãªWebã¢ããªã±ãŒã·ã§ã³ãå¹ççã«éçºããããšãå¯èœã«ããŸããPythonã¯ãã®ã·ã³ãã«ããšå¯èªæ§ã«ããã倧èŠæš¡ãªã³ãŒãããŒã¹ã®ç®¡çã容æã«ããŸããäžæ¹ãMojoã¯ãã®åŒ·åãªæ©èœãšæ¡åŒµæ§ã«ããã倧èŠæš¡ãªWebã¢ããªã±ãŒã·ã§ã³ã®éçºãæ¯ããŸãã
ãããã®å©ç¹ã«ãããPythonãšMojoã®çµã¿åããã¯ãéçºè ã«ãšã£ãŠéåžžã«é åçãªéžæè¢ãšãªããŸãã次ã®ã»ã¯ã·ã§ã³ã§ã¯ãPythonã§Mojoãã»ããã¢ããããæ¹æ³ã«ã€ããŠè§£èª¬ããŸãã
Pythonã§Mojoãã»ããã¢ããããæ¹æ³
Pythonã¯ããã®æè»æ§ãšãã¯ãã«ãªæ©èœã«ãããããŒã¿ãµã€ãšã³ã¹ãæ©æ¢°åŠç¿ã®åéã§åºãå©çšãããŠããŸãããã®äžã§ããMojoãšããã©ã€ãã©ãªã¯ãã¢ãã«ã®ãããã€ã¡ã³ããç°¡åã«è¡ãããšãã§ãããããå€ãã®éçºè ã«ãšã£ãŠéèŠãªããŒã«ãšãªã£ãŠããŸãããã®èšäºã§ã¯ãPythonã§Mojoãã»ããã¢ããããæ¹æ³ã詳ãã解説ããŸãã
å¿ èŠãªããŒã«ãšã©ã€ãã©ãª
ãŸãã¯ãMojoãã»ããã¢ããããããã«å¿ èŠãªããŒã«ãšã©ã€ãã©ãªã«ã€ããŠèª¬æããŸããPythonã®ããŒãžã§ã³ã¯3.6以äžãæšå¥šãããŠããŸãããŸããMojoã¯JavaããŒã¹ã®ã©ã€ãã©ãªã§ãããããJavaã®ã€ã³ã¹ããŒã«ãå¿ èŠã§ããJavaã®ããŒãžã§ã³ã¯8以äžãæšå¥šãããŠããŸãã
次ã«ãPythonã®ã©ã€ãã©ãªã§ããPandasãšNumpyãå¿ èŠã§ãããããã¯ããŒã¿ã®æäœãèšç®ãè¡ãããã®ã©ã€ãã©ãªã§ãMojoã®æ©èœããã«ã«æŽ»çšããããã«ã¯æ¬ ãããŸããããŸããMojoèªäœã®ã€ã³ã¹ããŒã«ã«ã¯ãPythonã®ããã±ãŒãžç®¡çããŒã«ã§ããpipã䜿çšããŸãã
ã€ã³ã¹ããŒã«æé
ããã§ã¯ãå ·äœçãªã€ã³ã¹ããŒã«æé ã«ã€ããŠèª¬æããŸãããŸãã¯ãPythonãšJavaãã€ã³ã¹ããŒã«ãããŠããããšã確èªããŸããPythonã¯ã³ãã³ãã©ã€ã³ãããpython –versionããå®è¡ããJavaã¯ãjava -versionããå®è¡ããããšã§ç¢ºèªã§ããŸãã
次ã«ãPandasãšNumpyãã€ã³ã¹ããŒã«ããŸãããããã¯pipã䜿çšããŠã€ã³ã¹ããŒã«ã§ããŸããã³ãã³ãã©ã€ã³ãããpip install pandas numpyããå®è¡ããããšã§ã€ã³ã¹ããŒã«ã§ããŸãã
æåŸã«ãMojoãã€ã³ã¹ããŒã«ããŸããMojoã¯Pythonã®ããã±ãŒãžç®¡çããŒã«ã§ããpipã䜿çšããŠã€ã³ã¹ããŒã«ããŸããã³ãã³ãã©ã€ã³ãããpip install
h2o-pyããå®è¡ããããšã§ã€ã³ã¹ããŒã«ã§ããŸãããªããMojoã¯H2O.ai瀟ãéçºããã©ã€ãã©ãªã§ãpipã§ã®ã€ã³ã¹ããŒã«åã¯ãh2o-pyãã«ãªããŸãã
ãããã®æé ãèžãããšã§ãPythonã§Mojoãã»ããã¢ããããããšãå¯èœã§ãã以äžã«ãããããã®ã€ã³ã¹ããŒã«æé ããŸãšããè¡šã瀺ããŸãã
æé | ã³ãã³ã |
---|---|
Pythonã®ããŒãžã§ã³ç¢ºèª | python –version |
Javaã®ããŒãžã§ã³ç¢ºèª | java -version |
PandasãšNumpyã®ã€ã³ã¹ããŒã« | pip install pandas numpy |
Mojoã®ã€ã³ã¹ããŒã« | pip install h2o-py |
以äžããPythonã§Mojoãã»ããã¢ããããæ¹æ³ã§ãããããã®æé ãé ã«é²ããããšã§ãPythonç°å¢ã§Mojoã䜿çšããæºåãæŽããŸãã
Pythonã§Mojoã䜿ãåºæ¬çãªæ¹æ³
Pythonã§Mojoãã»ããã¢ããããåŸã¯ã次ã«Mojoã䜿ã£ãŠå ·äœçãªäœæ¥ãè¡ãæ¹æ³ãåŠã³ãŸããããããã§ã¯ãMojoã䜿ã£ãŠæ©æ¢°åŠç¿ã¢ãã«ãããŒãããæ°ããªããŒã¿ã«å¯ŸããŠäºæž¬ãè¡ãåºæ¬çãªæ¹æ³ã解説ããŸãã
ãµã³ãã«ã³ãŒã
以äžã«ãMojoã䜿ã£ãŠæ©æ¢°åŠç¿ã¢ãã«ãããŒãããæ°ããªããŒã¿ã«å¯ŸããŠäºæž¬ãè¡ãããã®ãµã³ãã«ã³ãŒãã瀺ããŸãã
import h2o
from h2o.estimators import H2ORandomForestEstimator
# H2Oã®åæå
h2o.init()
# ããŒã¿ã®ããŒã
data = h2o.import_file("data.csv")
# ã¢ãã«ã®èšç·Ž
model = H2ORandomForestEstimator()
model.train(y="target", training_frame=data)
# Mojoã¢ãã«ã®ä¿å
model.save_mojo("model.mojo")
# Mojoã¢ãã«ã®ããŒã
mojo_model = h2o.import_mojo("model.mojo")
# æ°ããªããŒã¿ã«å¯Ÿããäºæž¬
new_data = h2o.import_file("new_data.csv")
predictions = mojo_model.predict(new_data)
ã³ãŒãã®è§£èª¬
ãŸããh2oããã±ãŒãžãã€ã³ããŒãããH2Oã®åæåãè¡ããŸãã次ã«ãããŒã¿ãããŒãããŸããããã§ã¯ãCSVãã¡ã€ã«ããããŒã¿ãããŒãããŠããŸãããä»ã®åœ¢åŒã®ãã¡ã€ã«ãããŒã¿ããŒã¹ããã®ããŒã¿ããŒããå¯èœã§ãã
ããŒã¿ãããŒãã§ãããã次ã«ã¢ãã«ã®èšç·Žãè¡ããŸããããã§ã¯ãã©ã³ãã ãã©ã¬ã¹ããšããæ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ã䜿çšããŠããŸãããMojoã¯ä»ã®å€ãã®æ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ããµããŒãããŠããŸãã
ã¢ãã«ã®èšç·Žãå®äºããããMojo圢åŒã§ã¢ãã«ãä¿åããŸããMojo圢åŒã§ä¿åããããšã§ãã¢ãã«ãä»ã®ãã©ãããã©ãŒã ãèšèªã§ç°¡åã«å©çšããããšãã§ããŸãã
ä¿åããMojoã¢ãã«ã¯ãh2o.import_mojoé¢æ°ã䜿ã£ãŠããŒãããããšãã§ããŸããããŒãããã¢ãã«ã䜿ã£ãŠãæ°ããªããŒã¿ã«å¯Ÿããäºæž¬ãè¡ãããšãã§ããŸãã
以äžããPythonã§Mojoã䜿ãåºæ¬çãªæ¹æ³ã§ããMojoã䜿ãããšã§ãæ©æ¢°åŠç¿ã¢ãã«ã®
èšç·Žãããããã€ã¡ã³ããŸã§ã®äžé£ã®æµããå¹ççã«è¡ãããšãã§ããŸãããŸããMojoã¯JavaããŒã¹ã®ã©ã€ãã©ãªã§ãããããJavaã®ç°å¢ã§ãåãã¢ãã«ãå©çšããããšãå¯èœã§ããããã«ãããã¢ãã«ã®åå©çšæ§ãé«ãŸããéçºå¹çãåäžããŸãã
Pythonã§Mojoã掻çšããããã®ãã¹ããã©ã¯ãã£ã¹
PythonãšMojoã䜿ã£ãŠæ©æ¢°åŠç¿ã¢ãã«ãå¹ççã«ãããã€ããããã«ã¯ãããã€ãã®ãã¹ããã©ã¯ãã£ã¹ãç¥ã£ãŠãããšåœ¹ç«ã¡ãŸãããããã®ãã¹ããã©ã¯ãã£ã¹ãé©çšããããšã§ãMojoã®ãã¯ãã«ãªæ©èœãæ倧éã«æŽ»çšããããŒã¿ãµã€ãšã³ã¹ã®ãããžã§ã¯ããæåã«å°ãããšãã§ããŸãã
ãã¹ããã©ã¯ãã£ã¹ã®ãªã¹ã
以äžã«ãPythonã§Mojoã掻çšããããã®ãã¹ããã©ã¯ãã£ã¹ãããã€ã玹ä»ããŸãã
1. ããŒã¿ã®ååŠç: Mojoã¯æ©æ¢°åŠç¿ã¢ãã«ã®ãããã€ã¡ã³ããå©ããããŒã«ã§ãããã¢ãã«ã®æ§èœã¯å ã®ããŒã¿ã®è³ªã«å€§ããäŸåããŸãããã®ãããããŒã¿ã®ååŠçã¯éåžžã«éèŠã§ããæ¬ æå€ã®åŠçãå€ãå€ã®æ€åºãšåŠçãã«ããŽãªå€æ°ã®ãšã³ã³ãŒãã£ã³ã°ãªã©ãé©åãªååŠçãè¡ãããšã§ãã¢ãã«ã®æ§èœãåäžãããããšãã§ããŸãã
2. ã¢ãã«ã®éžæ: Mojoã¯å€ãã®æ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ããµããŒãããŠããŸããåé¡ã®æ§è³ªã«ãããæé©ãªã¢ã«ãŽãªãºã ã¯ç°ãªããŸãããã®ãããåé¡ãç解ããæé©ãªã¢ã«ãŽãªãºã ãéžæããããšãéèŠã§ãã
3. ã¢ãã«ã®è©äŸ¡: ã¢ãã«ãèšç·ŽããåŸã¯ããã®æ§èœãè©äŸ¡ããããšãéèŠã§ããMojoã¯ã¢ãã«ã®è©äŸ¡ææšãèšç®ããæ©èœãæäŸããŠããŸããé©åãªè©äŸ¡ææšãéžæããã¢ãã«ã®æ§èœãè©äŸ¡ããããšã§ãã¢ãã«ã®ä¿¡é Œæ§ã確ä¿ããããšãã§ããŸãã
4. ã¢ãã«ã®æŽæ°: ããŒã¿ã¯æéãšãšãã«å€åããŸãããã®ãããå®æçã«ã¢ãã«ãæŽæ°ããããšãéèŠã§ããMojoã¯ã¢ãã«ã®æŽæ°ã容æã«ããæ©èœãæäŸããŠããŸããå®æçã«æ°ããªããŒã¿ã§ã¢ãã«ãèšç·ŽããMojo圢åŒã§ä¿åããããšã§ãåžžã«ææ°ã®ã¢ãã«ã
ãããã€ããããšãã§ããŸãã
ãã¹ããã©ã¯ãã£ã¹ã®é©çšäŸ
ããã§ã¯ããããã®ãã¹ããã©ã¯ãã£ã¹ãå ·äœçã«é©çšããäŸãèŠãŠã¿ãŸãããã
ãŸããããŒã¿ã®ååŠçã§ããPandasãšNumpyã䜿ã£ãŠããŒã¿ã®ååŠçãè¡ãããšãã§ããŸããäŸãã°ãæ¬ æå€ãããå ŽåãPandasã®fillnaé¢æ°ã䜿ã£ãŠæ¬ æå€ãå¹³åå€ãäžå€®å€ã§åããããšãã§ããŸãããŸããã«ããŽãªå€æ°ãããå ŽåãPandasã®get_dummiesé¢æ°ã䜿ã£ãŠãããŒå€æ°ã«å€æããããšãã§ããŸãã
次ã«ãã¢ãã«ã®éžæã§ããMojoã¯å€ãã®æ©æ¢°åŠç¿ã¢ã«ãŽãªãºã ããµããŒãããŠããŸããäŸãã°ãåé¡åé¡ã§ããã°ã©ã³ãã ãã©ã¬ã¹ããåŸé ããŒã¹ãã£ã³ã°ãååž°åé¡ã§ããã°ç·åœ¢ååž°ããµããŒããã¯ã¿ãŒãã·ã³ãéžæããããšãã§ããŸããåé¡ã®æ§è³ªãç解ããæé©ãªã¢ã«ãŽãªãºã ãéžæããããšãéèŠã§ãã
ã¢ãã«ã®è©äŸ¡ã«ã€ããŠã¯ãMojoãæäŸããè©äŸ¡ææšãå©çšããããšãã§ããŸããäŸãã°ãåé¡åé¡ã§ããã°æ£è§£çãAUCãååž°åé¡ã§ããã°å¹³åäºä¹èª€å·®ãR2ã¹ã³ã¢ãèšç®ããããšãã§ããŸãããããã®ææšã䜿ã£ãŠã¢ãã«ã®æ§èœãè©äŸ¡ããå¿ èŠã«å¿ããŠã¢ãã«ã®èª¿æŽãè¡ãããšãã§ããŸãã
æåŸã«ãã¢ãã«ã®æŽæ°ã§ããæ°ããªããŒã¿ãåŸããããšãããã®ããŒã¿ã䜿ã£ãŠã¢ãã«ãåèšç·ŽããMojo圢åŒã§ä¿åããããšãã§ããŸããããã«ãããåžžã«ææ°ã®ããŒã¿ãåæ ããã¢ãã«ããããã€ããããšãã§ããŸãã
ãŸãšã
ãã®èšäºã§ã¯ãPythonã§Mojoãã»ããã¢ãããã掻çšããæ¹æ³ã«ã€ããŠè©³ãã解説ããŸãããMojoã¯ãæ©æ¢°åŠç¿ã¢ãã«ã®ãããã€ã¡ã³ããå¹ççã«è¡ãããã®åŒ·åãªããŒã«ã§ãããPythonãšçµã¿åãããããšã§ãã®ãã¯ãã«ãªæ©èœãæ倧éã«æŽ»çšããããšãã§ããŸãã
ãŸããPythonã§Mojoãã»ããã¢ããããæ¹æ³ã«ã€ããŠèª¬æããŸãããå¿ èŠãªããŒã«ãšã©ã€ãã©ãªã®æºåããå ·äœçãªã€ã³ã¹ããŒã«æé ãŸã§ã詳ãã解説ããŸããã
次ã«ãPythonã§Mojoã䜿ãåºæ¬çãªæ¹æ³ã«ã€ããŠèª¬æããŸããããµã³ãã«ã³ãŒããéããŠãMojoã䜿ã£ãŠæ©æ¢°åŠç¿ã¢ãã«ãããŒãããæ°ããªããŒã¿ã«å¯ŸããŠäºæž¬ãè¡ãæ¹æ³ãåŠã³ãŸããã
æåŸã«ãPythonã§Mojoã掻çšããããã®ãã¹ããã©ã¯ãã£ã¹ã«ã€ããŠçŽ¹ä»ããŸãããããŒã¿ã®ååŠçããã¢ãã«ã®éžæãè©äŸ¡ãæŽæ°ãŸã§ãMojoãæ倧éã«æŽ»çšããããã®éèŠãªãã€ã³ãã解説ããŸããã
PythonãšMojoã掻çšããããšã§ãæ©æ¢°åŠç¿ã¢ãã«ã®ãããã€ã¡ã³ããå¹ççã«è¡ãããšãã§ããŸãããŸããMojoã¯JavaããŒã¹ã®ã©ã€ãã©ãªã§ãããããJavaã®ç°å¢ã§ãåãã¢ãã«ãå©çšããããšãå¯èœã§ããããã«ãããã¢ãã«ã®åå©çšæ§ãé«ãŸããéçºå¹çãåäžããŸãã
ãã®èšäºããPythonãšMojoã掻çšããéçºã®åèã«ãªãã°å¹žãã§ããããŒã¿ãµã€ãšã³ã¹ã®é åã¯æ¥ã é²åããŠããŸãããPythonãšMojoã掻çšããããšã§ããã®é²åã«å¯Ÿå¿ãã䟡å€ããã€ã³ãµã€ããåŒãåºãããšãã§ããŸããæ¯éããã®èšäºãåèã«ãPythonãšMojoã掻çšããéçºãé²ããŠã¿ãŠãã ããã