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
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Project overview1m 23s
-
Demo: Training the model for linear regression4m 15s
-
(Locked)
Demo: Using the model for linear regression predictions2m 22s
-
(Locked)
Demo: Loading classification data2m 7s
-
(Locked)
Demo: Training and using the model for classification predictions3m 45s
-
(Locked)
Demo: Loading data for sentiment analysis2m 31s
-
(Locked)
Demo: Training and using the model for sentiment analysis predictions3m 47s
-
(Locked)
Demo: Loading housing data for pipeline, cross validation, and hyperparameters1m 10s
-
(Locked)
Demo: Using data for pipeline, cross validation, and hyperparameters5m 32s
-
(Locked)
-