Skip to Content
Machine Learning in Java - Second Edition
book

Machine Learning in Java - Second Edition

by AshishSingh Bhatia, Bostjan Kaluza
November 2018
Intermediate to advanced
300 pages
7h 42m
English
Packt Publishing
Content preview from Machine Learning in Java - Second Edition

Modeling suspicious patterns

To design a classifier, we can follow the standard supervised learning steps, as described in Chapter 1, Applied Machine Learning Quick Start. In this recipe, we will include some additional steps to handle unbalanced datasets and evaluate classifiers based on precision and recall. The plan is as follows:

  1. Load the data in the .csv format.
  2. Assign the class attribute.
  3. Convert all of the attributes from a numeric to nominal value to make sure that there are no incorrectly loaded numerical values.
  4. Experiment 1: Evaluating the models with k-fold cross-validation.
  5. Experiment 2: Rebalancing the dataset to a more balanced class distribution, and manually perform cross-validation.
  6. Compare the classifiers by recall, precision, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Java Machine Learning

Mastering Java Machine Learning

Uday Kamath, Krishna Choppella
Java: Data Science Made Easy

Java: Data Science Made Easy

Richard M. Reese, Jennifer L. Reese, Alexey Grigorev

Publisher Resources

ISBN: 9781788474399Supplemental Content