From the course: Develop ML Models with Python and T-SQL

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Demo: Training and using the model for classification predictions

Demo: Training and using the model for classification predictions

From the course: Develop ML Models with Python and T-SQL

Demo: Training and using the model for classification predictions

- [Instructor] Let's take a closer look at the dataset we're going to use for training our classification algorithm. For the IRS dataset, we have a sepal length, sepal width, petal length, and petal width. And with these four different features, we're able to identify a specific target class that's already specified in the dataset ranging in value from zero to two. Now let's take a look at our script. We're going to be using the naive base from the SKlearn module, and more specifically, we're going to use the Gaussian naive base. To get started, we're going to define our connection to our database, and then from there, we're going to create a connection and be able to retrieve the data that's needed, more specifically, all the features as well as our target class. Once we execute that query, now we separate our features, and our target class as features and label. Next, we're going to utilize the train_test_split, which will split our data into 80/20, where we're going to use 20% for…

Contents