$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MathPHP で数学人材を目指す - PHPカンファレンス 2021 1週間前イベント 〜 ...
Search
hamakou108
September 25, 2021
Programming
0
240
MathPHP で数学人材を目指す - PHPカンファレンス 2021 1週間前イベント 〜 帰ってきたPHP勉強会@東京
PHPカンファレンス 2021 1週間前イベント 〜 帰ってきたPHP勉強会@東京の登壇資料です。
hamakou108
September 25, 2021
Tweet
Share
More Decks by hamakou108
See All by hamakou108
私達のチームのデプロイ戦略の軌跡 〜継続的デプロイの導入に至るまで〜
hamakou108
1
1.5k
Laravel のメール認証の内部実装を掘り下げる - PHPerKaigi 2021
hamakou108
4
2.5k
PHPer のための Vim 実践入門 - PHP Conference 2020
hamakou108
0
800
Other Decks in Programming
See All in Programming
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
160
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
390
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
140
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
400
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
160
TestingOsaka6_Ozono
o3
0
170
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
410
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
240
Patterns of Patterns
denyspoltorak
0
110
エディターってAIで操作できるんだぜ
kis9a
0
750
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
Claude Codeの「Compacting Conversation」を体感50%減! CLAUDE.md + 8 Skills で挑むコンテキスト管理術
kmurahama
1
610
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
The Invisible Side of Design
smashingmag
302
51k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
130
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
66
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
240
Side Projects
sachag
455
43k
Site-Speed That Sticks
csswizardry
13
1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
110
Transcript
MathPHP で数学人材を目指す 2021.09.24 PHPカンファレンス 2021 1週間前イベント 〜 帰ってきたPHP勉強会@東京 濱田晃輔 @hamakou108
自己紹介 濱田晃輔 @hamakou108 株式会社M&Aクラウド PHP 歴は2年弱
数学人材
数学人材とは 経団連が数学と数学人材に注目するのはAI(人工知能)やICTの土台となっている からだけではない。物事の抽象度を高めて定式化する数学的思考のできる人材 が、デジタル社会に不可欠という認識がある。 世界で争奪戦の数学人材、経団連が産学連携で日本の出遅れ挽回できるか | 日経クロステック(xTECH); https://xtech.nikkei.com/atcl/nxt/column/18/00001/05872/
「数学人材」と聞いて、あまりピンとこない
None
そもそも数学の重要性がはっきりと分からない
そもそも人類にとって数学はどのような存在なのか
None
西暦一五〇〇年ごろ、歴史はそれまでで最も重大な選択を行ない、人類の運命だ けではなく、おそらく地上のあらゆる生命の運命をも変えることになった。私た ちはそれを科学革命と呼ぶ。 (中略) 近代科学には教義はない。とはいえ、共通の核となる研究の方法はある。そうし た方法はみな、経験的観察結果(少なくとも私たちの五感の一つで観察できるも の)を収集し、数学的ツールの助けを借りてそれをまとめることに基づいてい る。 ユヴァル・ノア・ハラリ. サピエンス全史(下) 文明の構造と人類の幸福
人類の飛躍的進化は数学的ツールによって成し得た
None
数学人材を目指すしかない
PHPer として数学的ツールを活用したい
数学をプログラミングに落とし込む際の困難 数学的概念の理解 特異値や数値誤差の考慮 名前空間やクラスの整理
MathPHP markrogoyski/math-php - GitHub; https://github.com/markrogoyski/math-php
MathPHP を使ってできること 代数学、算術演算、多項式、複利計算、配列の演算、ガンマ関数、ベータ関数、誤差 関数、超幾何関数、符号関数、ロジスティック関数、シグモイド関数、エントロピ ー、行列、ベクトル、任意長の整数、複素数、四元数、有理数、内挿、数値微分、数 値積分、ニュートン法、割線法、二分法、不動点反復法、順列、組合せ、カタラン 数、正規分布、t分布、F分布、カイ二乗分布、ベータ分布、ガンマ分布、コーシー分 布、一様分布、ベルヌーイ分布、二項分布、ポワソン分布、幾何分布、超幾何分布、 多変量分布、分布表、サンプル生成、数列、集合、 ANOVA
、相関係数、分散、標準偏 差、パーセンタイル、ユークリッド距離、マハラノビス距離、コサイン類似度、累積 度数、累積相対度数、効果量、回帰分析、仮説検定...
使い方も簡単 - 行列の場合 use MathPHP\LinearAlgebra\Matrix; use MathPHP\LinearAlgebra\MatrixFactory; // 1. Matrix
クラスのインスタンスを生成 $matrix = [ [1, 2, 3], [4, 5, 6], [7, 8, 9], ]; $A = MatrixFactory::create($matrix); // 2. 行いたい操作に対応するメソッドを呼び出し $Aᵀ = $A->transpose(); // 転置行列 $D = $A->diagonal(); // 対角行列 $A⁻¹ = $A->inverse(); // 逆行列
例. 任意長の整数 use MathPHP\Number\ArbitraryInteger; // 任意長の巨大な整数を作成 $bigInt = new ArbitraryInteger('876937869482938749389832');
$extremelyBigInt = $bigInt->pow(2); $string = (string) $extremelyBigInt; // "769020026933275716728118484358230957952304988224"
例. パーセンタイル use MathPHP\Statistics\Descriptive; $numbers = [13, 18, 13, 14,
13, 16, 14, 21, 13]; // Percentiles $twentieth_percentile = Descriptive::percentile($numbers, 20); // 13.0 $ninety_fifth_percentile = Descriptive::percentile($numbers, 95); // 19.8
例. 相関係数 r = = s s
x y s xy (x − ) i ∑ n i x ˉ 2 (y − ) i ∑ n i y ˉ 2 (x − )(y − ) i ∑ n i x ˉ i y ˉ use MathPHP\Statistics\Correlation; $X = [1, 2, 3, 4, 5]; $Y = [2, 3, 4, 4, 6]; $r = Correlation::r($X, $Y); // 0.95940322360025
まとめ 数学人材は人類の進化にとって重要(茶番) MathPHP を使って数学をプログラミングすると捗る
Thank you!