Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[デザインパターン勉強会]FactoryMethodパターン
Search
mei28
August 11, 2020
46
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[デザインパターン勉強会]FactoryMethodパターン
Seeeeee:Dの夏休み勉強会での資料.
mei28
August 11, 2020
More Decks by mei28
See All by mei28
[Human-AI Decision Making勉強会] 利用者の判断基準に合わせた説明は人の意思決定を誘導するか
mei28
0
47
[FAccT'26] Do User-Aligned Explanations Steer Human Decisions? Context-Dependent Influence and Ethical Implications
mei28
0
64
[Human-AI Decision Making勉強会] 説明を部分的に見せることで人に考えさせ、AIへの不適切な依存を減らす
mei28
0
150
[読み会] CHI2025論文紹介
mei28
1
110
[読み会] “Are You Really Sure?” Understanding the Effects of Human Self-Confidence Calibration in AI-Assisted Decision Making
mei28
0
190
[JSAI'24] 人間の判断根拠は文脈によって異なるのか?〜信頼されるXAIに向けた人間の判断根拠理解〜
mei28
2
920
[CHI'24] Fair Machine Guidance to Enhance Fair Decision Making in Biased People
mei28
0
140
[DEIM2024] 卓球の得点予測における重要要素の分析
mei28
0
77
[Human-AI Decision Making勉強会] 意思決定 with AIは個人vsグループで変わるの?
mei28
0
280
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Git: the NoSQL Database
bkeepers
PRO
432
67k
エンジニアに許された特別な時間の終わり
watany
108
250k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Crafting Experiences
bethany
1
250
The Curious Case for Waylosing
cassininazir
1
450
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Tell your own story through comics
letsgokoyo
1
1k
Paper Plane (Part 1)
katiecoart
PRO
1
10k
The Language of Interfaces
destraynor
162
27k
Transcript
'BDUPSZ.FUIPE 4FFFFFF% ༶໌
w'BDUPSZ.FUIPEͰɼΫϥεͰ͏ΦϒδΣΫτʢΠϯελϯε ͷੜํ๏ʹ͍ͭͯΛߦ͏ɽ wॊೈʹΦϒδΣΫτΛੜ͢Δ͜ͱ͕ՄೳʹͳΔ wܧঝΛར༻͢Δͱ͖ʹ͏σβΠϯύλʔϯ 'BDUPSZ.FUIPEͬͯʁ 5FNQMBUF.FUIPEΛ͏ͪΐͬͱ͍͘͢ʂ
wΠϯελϯεͷੜΛɼநΫϥεʢΫϥεʣʹ͢ΔͷͰͳ͘ɼα ϒΫϥε ࢠΫϥε ʹߦ͏͜ͱͰɼੜ͢ΔΠϯελϯεΛ؆୯ʹมߋ ͢Δ͜ͱ͕Ͱ͖Δɽ wΦϒδΣΫτͷੜΛؔΛܦ༝ͯ͠ߦ͏͜ͱͰ࣮Ͱ͖Δɽ 'BDUPSZ.FUIPEͬͯʁ ࣮ͷͷΓ͔ͨ
͡Ό͋۩ମతʹ
wࠓճྉཧͷઃఆͰΛਐΊ͍ͯ͘ɽ wྉཧ͢ΔਓɼͦΕͧΕϨγϐΛݟͳ͕ΒɼʮΔˠম͘ˠࣽΔʯͷߦಈΛशಘ ͍ͯͯ͠ɼௐཧΛߦ͏ɽ wϨγϐɼ$PPLQBEΫϥγϧͳͲಉ͡৯ࡐͰҟͳΔϨγϐ͕ଘࡏ͢Δɽ ࣮ࡍʹͭͬͯ͘Έͨ ઃఆΛ֬ೝ͍ͯ͘͠Α
ॳ৺ऀ͕ௐཧ͍ͯ͘͠Α /PU'BDUPSZ.FUIPE ͱΓ͋͑ͣ$PPLQBEΛݟΔ͔ class Shoshinsya_Chouri(metaclass=ABCMeta): @abstractmethod def kiru(self): raise
NotImplemented @abstractmethod def yaku(self): raise NotImplemented @abstractmethod def nikomu(self): raise NotImplemented def chouri(self): cookpad = Cookpad(self.shokuzai) self.kiru(cookpad.recipe) self.yaku(cookpad.recipe) self.nikomu(cookpad.recipe) print("Ͱ͖ͨʂ") class Shoshinsya(Shoshinsya_Chouri): def __init__(self, shokuzai): self.shokuzai = shokuzai def kiru(self, cookpad): print(f'{cookpad}Λࢀߟʹͯ͠{self.shokuzai}ΛΔͧ') def yaku(self, cookpad): print(f'{cookpad}Λࢀߟʹͯ͠{self.shokuzai}Λম͍͍ͯ͘') def nikomu(self, cookpad): print(f'{cookpad}Λࢀߟʹͯ͠{self.shokuzai}ΛࣽࠐΉΑ') ΦϒδΣΫτͰ ϨγϐΛࢦఆͯ͠ ݟ͍ͯΔϨγϐ
ผʹ͜ΕͰΑ͘ͳ͍ʁ
Α͘ͳ͍Αʂ
w͜ͷ࣮ํ๏ͩͱɼॳ৺ऀͷௐཧํ๏Λशಘ͍ͯ͠Δਓɼ$PPLQBE͔͠Ϩγϐ ΛݟΔ͜ͱ͕Ͱ͖ͳ͘ͳͬͯ͠·͏ɽ w$PPLQBEҎ֎ݟΔΑͶʁଞͷϨγϐݟ͍ͨΑͶʁʁ Կ͕ྑ͘ͳ͍ͷ͔ $PPLQBE͔͠Ϩγϐݟͳ͍ͷʁ
ਓʹΑͬͯΈΔ Ϩγϐҧ͏ΑͶʁ
͍ΖΜͳϨγϐʹରԠ͠Α͏ 'BDUPSZ.FUIPE αϒΫϥεͰϨγϐΛੜ͍ͯ͘͠Α class Chukyusha_Chouri(metaclass=ABCMeta): #snip def chouri(self): recipe
= self.nanidetsukuru() self.kiru(recipe.recipe) self.yaku(recipe.recipe) self.nikomu(recipe.recipe) print("Ͱ͖ͨʂ") @abstractmethod def nanidetsukuru(self): raise NotImplementedError class Chukyusha(Chukyusha_Chouri): #snip def nanidetsukuru(self): return Kurashiru(self.shokuzai) αϒΫϥεʹ ·͔ͤΔ Ϋϥεʹ͞Ε ͨϨγϐΛܾΊΔ
wॳڃऀͷௐཧํ๏͔͠ձಘ͍ͯ͠ͳ͍ਓɼ$PPLQBE͔͠ϨγϐΛݟΔ͜ͱ͕Ͱ ͖ͳ͔ͨɽ w͔͠͠ɼதڃऀͷௐཧํ๏Λձಘ͍ͯ͠Δਓ$PPLQBEʹͩ͜ΘΒͳ͍ௐཧ͕Ͱ ͖Δɽ wதڃऀ͝ͱʹͦΕͧΕ͕ࣗݟΔϨγϐ͕ੜ͞ΕΔͷͰɼॊೈʹରԠͰ͖Δɽ w5FNQMBUFNFUIPEͩͱௐཧํ๏ͷΫϥεΛϨγϐ͚ͩมߋ͕ೖΔ w͔͠͠ɼ'BDUPSZͩͱͨͩαϒΫϥεͰมߋΛՃ͑ΔͷΈʂ 'BDUPSZ.FUIPEΛձಘͨ͠ྉཧਓ $PPLQBEҎ֎ϨγϐݟΕΔΑ͏ʹͳͬͨΑ
w'BDUPSZ.FUIPEɼ5FNQMBUF.FUIPEͱҧͬͯɼαϒδΣΫτͷੜαϒΫ ϥεʹͤΔΑ͏ʹ͢Δɽ wαϒΫϥε͕ΦϒδΣΫτΛੜ͢ΔͷͰɼαϒΫϥεʹࣗ༝͕૿ͯ͠৭ʑͰ ͖ΔΑ͏ʹͳΔɽ w"CTUSBDU'BDUPSZ'BDUPSZ.FUIPEΛͬͱநతʹͨ͠ͷʁ ·ͱΊ 'BDUPSZ.FUIPEʹࣗ༝Λ