From the course: Foundations of AI and Machine Learning for Java Developers
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Sample VisRec code to train a PredAI model - Java Tutorial
From the course: Foundations of AI and Machine Learning for Java Developers
Sample VisRec code to train a PredAI model
- [Instructor] Let's take a look at how to use JSR 381 with an example. We're going to see if we can create a simple model that can detect if an image is of a light-colored chihuahua or not. This is called a binary classifier because there are two possibilities: a light-colored chihuahua, or not a light-colored chihuahua. So we need to create a model first. Once the model is trained, then we can use that model to classify new images. So to train the model, we need two datasets. One dataset contains images of light-colored chihuahuas, and the other dataset contains images that are not light-colored chihuahuas. Since there are two choices, we call this a binary classifier, which is a very, very common use case. You can certainly have applications that have several classifiers, but let's try a simple binary classifier's example first. Before we write any JSR 381 Java code, we need to prepare our data sets. Now, Stanford University has a very good set of open source dog images, so let's…
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.