Answered step by step
Verified Expert Solution
Question
1 Approved Answer
import pandas as pd import numpy as np from matplotlib import pyplot as plt from sklearn import preprocessing #01. Load data with Pandas and output
import pandas as pd import numpy as np from matplotlib import pyplot as plt from sklearn import preprocessing #01. Load data with Pandas and output the basic information of this dataset, such as the features and their data types. data = pd.read_csv ("insurance.csv") print("Basic Information:") print(data.info()) categorical_features = [X for x in data.columns if data[x].dtype "object"] numerical_features = [x for x in data.columns if data[x].dtype != "object"] print("Categorical features:",categorical_features) print("Numerical features:", numerical_features) 1.2 Split the preprocessed dataset into training set and testing set Use 80% of samples as the training set and 20% of samples as the testing set In [15]: # your code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started