Member-only story
Hyperparameter Optimization in Python
Step-by-step follow-along | Data Series | Episode 12.2
6 min readOct 3, 2022
In the previous episode we discussed the various methods we can use to optimize machine learning hyperparameter. In this episode, we look to implement these methods in Python.
You can view and use the code and data in this episode here: Link
This episode is split into two sections:
1. Constructing and Evaluating a Classifier
2. Hyperparameter Optimization
Objective
The objective for this episode is to produce and optimize support vector machines that classifies pulsars:
General Libraries
import pandas as pd
import numpy as np
import warnings
warnings.filterwarnings("ignore")
1. Constructing and Evaluating a Classifier
# read the data
star_data = pd.read_csv("D:\ProjectData\pulsar_data.csv")
# check data frame shape
star_data.shape