<jupyter_start><jupyter_text>**This notebook is an exercise in the [AI Ethics](https://www.kaggle.com/learn/ai-ethics) course.  You can reference the tutorial at [this link](https://www.kaggle.com/var0101/model-cards).**--- In the tutorial, you learned how to use model cards.  In this exercise, you'll sharpen your understanding of model cards by engaging with them in a couple of scenarios. IntroductionRun the next code cell to get started.<jupyter_code>from learntools.core import binder
binder.bind(globals())
from learntools.ethics.ex5 import *<jupyter_output><empty_output><jupyter_text>Scenario AYou are the creator of the _Simple Zoom_ video editing tool, which uses AI to automatically zoom the video camera in on a presenter as they walk across a room during a presentation. You are launching the _Simple Zoom_ tool and releasing a model card along with the tool, in the interest of transparency. 1) AudienceWhich audiences should you write the model card for? Once you have thought about your answer, check it against the solution below.<jupyter_code># Check your answer (Run this code cell to receive credit!)
q_1.check()<jupyter_output><empty_output><jupyter_text>Scenario BYou are the product manager for _Presenter Pro_, a popular video and audio recording product for people delivering talks and presentations. As a new feature based on customer demand, your team has been planning to add the AI-powered ability for a single video camera to automatically track a presenter, focusing on them as they walk across the room or stage, zooming in and out automatically and continuously adjusting lighting and focus within the video frame. You are hoping to incorporate a different company’s AI tool (called _Simple Zoom_) into your product (_Presenter Pro_). To determine whether _Simple Zoom_ is a good fit for _Presenter Pro_, you are reviewing *Simple Zoom*’s model card. 2) Intended UseThe **Intended Use** section of the model card includes the following bullets:* _Simple Zoom_ is intended to be used for automatic zoom, focus, and lighting adjustment in the real-time video recording of individual presenters by a single camera* _Simple Zoom_ is not suitable for presentations in which there is more than one presenter or for presentations in which the presenter is partially or fully hidden at any timeAs a member of the team evaluating _Simple Zoom_ for potential integration into _Presenter Pro_, you are aware that _Presenter Pro_ only supports one presenter per video.However, you are also aware that in some _Presenter Pro_ customers use large props in their presentation videos. Given the information in the Intended Use section of the model card, what problem do you foresee for these customers if you integrate _Simple Zoom_ into _Presenter Pro_? What are some ways in which you could address this issue?<jupyter_code># Run this code cell to receive a hint
q_2.hint()
# Check your answer (Run this code cell to receive credit!)
q_2.check()<jupyter_output><empty_output><jupyter_text>3) Factors, Evaluation Data, Metrics, and Quantitative AnalysesWe'll continue with **Scenario B**, where you are the product manager for _Presenter Pro_.  Four more sections of the model card for _Simple Zoom_ are described below.**Factors**: The model card lists the following factors as potentially relevant to model performance: * Group Factors  * Self-reported gender  * Skin tone  * Self-reported age* Other Factors  * Camera angle  * Presenter distance from camera  * Camera type  * Lighting**Evaluation Data**: To generate the performance metrics reported in the **Quantitative Analysis** section (discussed below), the _Simple Zoom_ team used an evaluation data set of 500 presentation videos, each between two and five minutes long. The videos included both regular and unusual presentation and recording scenarios and included presenters from various demographic backgrounds.**Metrics**: Since _Simple Zoom_ model performance is subjective (involving questions like whether a zoom is of appropriate speed or smoothness; or whether a lighting adjustment is well-executed), the _Simple Zoom_ team tested the tool’s performance by asking a diverse viewer group to view _Simple Zoom_’s output videos (using the evaluation dataset’s 500 videos as inputs). Each viewer was asked to rate the quality of video editing for each video on a scale of 1 to 10, and each video’s average rating was used as a proxy for _Simple Zoom_’s performance on that video.**Quantitative Analyses**: The quantitative analyses section of the model card includes a brief summary of performance results. According to the summary, the model generally performs equally well across all the listed demographic groups (gender, skin tone and age).The quantitative analyses section also includes interactive graphs, which allow you to view the performance of the _Simple Zoom_ tool by each factor and by intersections of ‘Group’ and ‘Other’ factors.As a member of the team evaluating _Simple Zoom_ for potential integration into _Presenter Pro_, what are some questions you might be interested in answering and exploring via the interactive graphs?<jupyter_code># Check your answer (Run this code cell to receive credit!)
q_3.check()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.04460541364849409, 'fraction_numerical': 0.004003049942813572, 'mean_word_length': 5.367718446601942, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '242556', 'license': 'MIT', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1202, 'n_words': 752, 'path': 'intro_to_ai_ethics/05-model-cards.ipynb', 'repo_name': 'drakessn/Kaggle-Courses', 'size': '5246'}