本番環境 ML システム: 質問
コレクションでコンテンツを整理 必要に応じて、コンテンツの保存と分類を行います。
このレッスンでは、本番環境システムのデータとモデルについて確認すべき質問について説明します。
各機能は役に立ちましたか?
モデルを継続的にモニタリングして、モデルの予測能力にほとんどまたはまったく貢献しない特徴を削除する必要があります。その特徴の入力データが急激に変化すると、モデルの動作も望ましくない方法で急激に変化する可能性があります。
以下の関連する質問も検討してください。
- 機能の有用性が、その機能の追加にかかる費用を正当化するものですか?
モデルに機能を追加したくなるのは当然です。たとえば、追加することでモデルの予測がわずかに改善される新しい特徴を見つけたとします。予測の精度が少し向上することは、精度が少し低下するよりも確かに良いことですが、追加機能はメンテナンスの負担を増やします。
データソースは信頼できますか?
入力データの信頼性について確認すべき点は次のとおりです。
- シグナルは常に利用可能か、信頼できないソースから取得されるか。例:
- シグナルは、負荷が高いときにクラッシュするサーバーから送信されていますか?
- 8 月に休暇を取る人間から発信されたシグナルですか?
- モデルの入力データを計算するシステムは変更されますか?該当する場合:
- どのくらいの頻度で発生しますか?
- そのシステムが変更されたことをどのようにして知ることができますか?
アップストリーム プロセスから受信したデータのコピーを独自に作成することを検討してください。安全にアップストリーム データの次のバージョンに進む場合は、そのことを確認してください。
モデルはフィードバック ループの一部ですか?
モデルが独自のトレーニング データに影響することもあります。たとえば、一部のモデルの結果は、その同じモデルへの入力特徴(直接的または間接的)になります。
モデルが別のモデルに影響を与えることもあります。たとえば、株価を予測する 2 つのモデルについて考えてみましょう。
モデル A にはバグがあるため、誤って Stock X の株式を購入することにします。これらの購入により、株式 X の価格が上昇します。モデル B は、株式 X の価格を入力特徴として使用するため、株式 X の価値について誤った結論に至る可能性があります。したがって、モデル B は、モデル A のバグのある動作に基づいて、株式 X の株を売買する可能性があります。モデル B の動作がモデル A に影響し、チューリップ マニアや会社 X の株価の下落を引き起こす可能性があります。
演習: 理解度を確認する
次のモデルのうち、フィードバック ループの影響を受けやすいのは3 つです。
海水浴場の混雑度を特徴の一つとして使用し、海水浴場近辺の高速道路出口での渋滞を予測する交通予測モデル。
海水浴客の中には交通予測に基づいて計画を立てる人もいます。海水浴場の人出が多く、交通量が多くなると予測される場合、多くの人が計画を変更する可能性があります。その結果、海水浴場への人出が抑えられて予測される交通量が減り、それを受けて人出が増えるといったサイクルが繰り返されます。
書籍の人気度(つまり本が購入された回数)に基づいて、ユーザーが好みそうな小説を提案する書籍推薦モデル。
書籍の推奨により購買が促進される可能性が高く、これらの追加の販売が入力としてモデルにフィードバックされ、モデルによって将来同じ書籍が推奨される可能性が高くなります。
学校を格付けする基準の一つとして選択性(出願した学生のうち、入学を許可された学生の割合)を使用する大学ランキング モデル。
このモデルのランキングによって上位の学校への関心がさらに高まり、出願数が増える可能性があります。入学を許可される学生の数が同じまま保たれると選択性が高まり(合格者の割合が低下し)ます。その結果、これらの学校のランキングが上がり、受験生の関心がさらに高まります。
投票終了後に投票者の 2% を調査することで市長選挙の当選者を予測する選挙結果モデル。
投票が締め切られるまでにモデルが予測を公開しなければ、予測が投票者の行動に影響を及ぼす可能性はありません。
広さ(平方メートル単位の面積)、寝室数、地理的位置を特徴として使用して住宅の価格を予測する住宅価格モデル。
住宅の場所、広さ、寝室数が価格予想を反映してすぐに変化することはないため、フィードバック ループの可能性は低くなります。ただし、広さと寝室数の間に潜在的な相関関係がある(家が広くなれば部屋数が増える傾向がある)ため、分離して分析する必要があります。
写真の中の人がほほ笑んでいるかどうかを検出する顔属性モデル。毎月自動的に更新されるストックフォトのデータベースで定期的にトレーニングを行います。
モデルの予測は写真データベースに影響を与えないため、ここにはフィードバック ループはありません。ただし、この場合は、毎月の更新が想定外の影響をモデルに及ぼす潜在的な可能性があるため、入力データのバージョニングが重要になります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[[["\u003cp\u003eContinuously monitor models in production to evaluate feature importance and potentially remove unnecessary ones, ensuring prediction quality and resource efficiency.\u003c/p\u003e\n"],["\u003cp\u003eData reliability is crucial; consider data source stability, potential changes in upstream data processes, and create local data copies to control versioning and mitigate risks.\u003c/p\u003e\n"],["\u003cp\u003eBe aware of feedback loops where a model's predictions influence future input data, potentially leading to unexpected behavior or biased outcomes, especially in interconnected systems.\u003c/p\u003e\n"],["\u003cp\u003eRegularly assess your model by asking if features are truly helpful and if their value outweighs the costs of inclusion, aiming for a balance between prediction accuracy and maintainability.\u003c/p\u003e\n"],["\u003cp\u003eEvaluate if your model is susceptible to a feedback loop and take steps to isolate it if you find it is.\u003c/p\u003e\n"]]],[],null,["This lesson focuses on the questions you should ask about your data\nand model in production systems.\n\nIs each feature helpful?\n\nYou should continuously monitor your model to remove features that contribute\nlittle or nothing to the model's predictive ability. If the input data for\nthat feature abruptly changes, your model's behavior might also abruptly\nchange in undesirable ways.\n\nAlso consider the following related question:\n\n- Does the usefulness of the feature justify the cost of including it?\n\nIt is always tempting to add more features to the model. For example,\nsuppose you find a new feature whose addition makes your model's predictions\nslightly better. Slightly better predictions certainly seem better than\nslightly worse predictions; however, the extra feature adds to your\nmaintenance burden.\n\nIs your data source reliable?\n\nSome questions to ask about the reliability of your input data:\n\n- Is the signal always going to be available or is it coming from an unreliable source? For example:\n - Is the signal coming from a server that crashes under heavy load?\n - Is the signal coming from humans that go on vacation every August?\n- Does the system that computes your model's input data ever change? If so:\n - How often?\n - How will you know when that system changes?\n\nConsider creating your own copy of the data you receive from the\nupstream process. Then, only advance to the next version of the upstream\ndata when you are certain that it is safe to do so.\n\nIs your model part of a feedback loop?\n\nSometimes a model can affect its own training data. For example, the\nresults from some models, in turn, become (directly or indirectly) input\nfeatures to that same model.\n\nSometimes a model can affect another model. For example, consider two\nmodels for predicting stock prices:\n\n- Model A, which is a bad predictive model.\n- Model B.\n\nSince Model A is buggy, it mistakenly decides to buy stock in Stock X.\nThose purchases drive up the price of Stock X. Model B uses the price\nof Stock X as an input feature, so Model B can come to some false\nconclusions about the value of Stock X. Model B could, therefore,\nbuy or sell shares of Stock X based on the buggy behavior of Model A.\nModel B's behavior, in turn, can affect Model A, possibly triggering a\n[tulip mania](https://wikipedia.org/wiki/Tulip_mania) or a slide in\nCompany X's stock.\n\nExercise: Check your understanding \nWhich **three** of the following models are susceptible to a feedback loop? \nA traffic-forecasting model that predicts congestion at highway exits near the beach, using beach crowd size as one of its features. \nSome beachgoers are likely to base their plans on the traffic forecast. If there is a large beach crowd and traffic is forecast to be heavy, many people may make alternative plans. This may depress beach turnout, resulting in a lighter traffic forecast, which then may increase attendance, and the cycle repeats. \nA book-recommendation model that suggests novels its users may like based on their popularity (i.e., the number of times the books have been purchased). \nBook recommendations are likely to drive purchases, and these additional sales will be fed back into the model as input, making it more likely to recommend these same books in the future. \nA university-ranking model that rates schools in part by their selectivity---the percentage of students who applied that were admitted. \nThe model's rankings may drive additional interest to top-rated schools, increasing the number of applications they receive. If these schools continue to admit the same number of students, selectivity will increase (the percentage of students admitted will go down). This will boost these schools' rankings, which will further increase prospective student interest, and so on... \nAn election-results model that forecasts the winner of a mayoral race by surveying 2% of voters after the polls have closed. \nIf the model does not publish its forecast until after the polls have closed, it is not possible for its predictions to affect voter behavior. \nA housing-value model that predicts house prices, using size (area in square meters), number of bedrooms, and geographic location as features. \nIt is not possible to quickly change a house's location, size, or number of bedrooms in response to price forecasts, making a feedback loop unlikely. However, there is potentially a correlation between size and number of bedrooms (larger homes are likely to have more rooms) that may need to be teased apart. \nA face-attributes model that detects whether a person is smiling in a photo, which is regularly trained on a database of stock photography that is automatically updated monthly. \nThere is no feedback loop here, as model predictions don't have any impact on the photo database. However, versioning of the input data is a concern here, as these monthly updates could potentially have unforeseen effects on the model. \n[Help Center](https://support.google.com/machinelearningeducation)"]]