Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions