Scenario: Iceberg Lounge, Gotham’s premier azure video

 ·  PT1H46M27S  ·  EN

dp-100-data-scientist-assoc video for scenario: Iceberg Lounge, Gotham’s premier nightclub, serves as both a high-end venue and a front for Oswald Cobblepot’s

Full Certification Question

Scenario: Iceberg Lounge, Gotham’s premier nightclub, serves as both a high-end venue and a front for Oswald Cobblepot’s operations. Project Details: You have been hired as a contractor to consult on various IT functions, where Oswald Cobblepot has implemented Microsoft Azure into his business solutions. The IT team is creating a machine learning model using Python. The dataset contains several numerical columns and one text column representing a product’s category. The product category will always be one of the following: Bikes Cars Vans Boats The team is building a regression model using the scikit-learn Python package. Requirement: The text data must be transformed to be compatible with scikit-learn. Question: How should the developer complete the code segment below? (Substitute [A] and [B] with the correct values.) python from sklearn import linear model import [ A ] dataset = df . read_csv (“ data\ ProductSales . csv ”) ProductCategoryMapping = {“ Bikes ”: 1 ,” Cars ”: 2 , “ Boats ”: 3 , “ Vans ”: 4 } dataset [‘ ProductCategoryMapping ’] = dataset [‘ ProductCategory ’].[ B ] regr = linear_model . LinearRegression () x_train = dataset [[‘ ProductCategoryMapping ’, ‘ ProductSize ’, ‘ ProductCost ’]] y_train = dataset [[‘ Sales ’]] regr . fit ( x_train , y_train )