Challenge - Classification of non-linear data
In this lesson, you need to classify the non-linear dataset.
We'll cover the following
Challenge - Classification of non-linear data
In this lesson, you need to perform a classification task. Unlike the tasks we completed before, this dataset is non-linear. This means you can’t only use logistic regression. SVM
is a good choice. (If you already learned the GBDR
, it’s also a good choice.)
- Load the dataset from the file
nonlinear.csv
. - Split the data into two parts, the test accounts for 20%. You can use
42
as the random seed - Build an
SVM
model and fit it. - Return the
F1-score
metric.
Note: You can load
nonlinear.csv
as this file is already on the platform. This dataset has three columns, col1, col2, and target. The target is the label.If you are already familiar with
pandas
library, it’s easy for you to load this dataset. If not, you can click theHint
to get the code of loading data.
Get hands-on with 1400+ tech skills courses.