ライブラリとフレームワークの違いとはなんでしょうか。
G検定の勉強をしていたら
NumPy
scikit-learn
が、ライブラリの説明の箇所でもフレームワークの説明の箇所でも登場しました。
両者はたまたま両方にまたがるものなんでしょうか?
-
2どういった文脈での説明なのか、実際の記述を (出典を明記した上で) 引用で示してもらうと回答が付きやすいかもしれません。– cubick ♦2022年12月10日 7:21
-
この辺の記事の関係でしょうか。G検定(ジェネラリスト検定)とは?【データサイエンティストに関わる資格】, Pythonフレームワークのまとめ【2022年版】, 【Python】フレームワークとライブラリの違いは?, 【解説】フレームワークとライブラリの違い, Pythonのモジュールとパッケージとライブラリとフレームワークの違い, Pythonフレームワークの概要からおすすめソフトウェアまで紹介– kunif2022年12月10日 7:27
-
文脈によって異なってくるものなんでしょうか?– モルフォ2022年12月10日 7:46
-
1公式なドキュメントやWikipediaではライブラリと書いてありますね。NumPy documentation, NumPy - Wikipedia, Getting Started - scikit-learn, scikit-learn - Wikipedia しかしscikit-learnの方はframeworkと紹介する記事もあります。Scikit-learn, TensorFlow, PyTorch, Keras… but where to begin?, Top 20 Machine Learning Frameworks You Must Know 記事を書く人の考え方次第では?– kunif2022年12月10日 8:37
-
javascriptについての記事ですが、フレームワークとライブラリの違いを見つけました。– 伽語蓮弥2022年12月15日 21:03
コメントを追加
|
2 件の回答
1
-
1"制御の反転"とか"ハリウッドの原則"と呼ばれているやつですね。xtech.nikkei.com/it/article/lecture/20070205/260697 2022年12月14日 0:56
回答ではありません
ただのWikipediaの引用です。
https://en.wikipedia.org/wiki/Software_framework
Frameworks have key distinguishing features that separate them from normal libraries:
inversion of control: In a framework, unlike in libraries or in standard user applications, the overall program's flow of control is not dictated by the caller, but by the framework.[1] This is usually achieved with the Template Method Pattern. default behaviour: This can be provided with the invariant methods of the Template Method Pattern in an abstract class which is provided by the framework. extensibility: A user can extend the framework – usually by selective overriding – or programmers can add specialized user code to provide specific functionality. This is usually achieved by a hook method in a subclass that overrides a template method in the superclass. non-modifiable framework code: The framework code, in general, is not supposed to be modified, while accepting user-implemented extensions. In other words, users can extend the framework, but cannot modify its code.
余談:
個人的にはinversion of control(制御の反転)を主軸にした説明が多い気がします。こういう言葉の定義ほどどうでもいいことはない気もしますけど。