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
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
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'],
Step by step
Solved in 4 steps with 3 images