Load the data into a pandas dataframe named data_firstname_df2 where first name is you name. 2. Replace the ‘?’ mark in the ‘bare’ column by np.nan and change the type to ‘float’ 3. Drop the ID column

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter8: Working With Trendlines, Pivottables, Pivotcharts, And Slicers
Section: Chapter Questions
Problem 8EYW
icon
Related questions
icon
Concept explainers
Question
. Load the data into a pandas dataframe named data_firstname_df2 where first name is you
name.
2. Replace the ‘?’ mark in the ‘bare’ column by np.nan and change the type to ‘float’
3. Drop the ID column
4. Separate the features from the class.
5. Split your data into train 80% train and 20% test use the last two digits of your student number
for the seed.
6. Using the preprocessing library to define two transformer objects to transform your training
data:
a. Fill the missing values with the median (hint: checkout SimpleImputer)
b. Scale the data (hint: checkout StandardScaler)
7. Combine the two transformers into a pipeline name it num_pipe_firstname.
8. Create a new Pipeline that has two steps the first is the num_pipe_firstname and the second is
an SVM classifier with random state = last two digits of your student number. Name the pipeline
pipe_svm_firstname. (make note of the labels)
9. Take a screenshot showing your num_pipe_firstname object and add it to your written report.
10. Define the grid search parameters in an object and name it param_grid, as follows:
a. 'svc__kernel': ['linear', 'rbf','poly'],
 
 
 
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning