Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Modern Scala Projects

You're reading from   Modern Scala Projects Leverage the power of Scala for building data-driven and high performance projects

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781788624114
Length 334 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ilango gurusamy Ilango gurusamy
Author Profile Icon Ilango gurusamy
Ilango gurusamy
Arrow right icon
View More author details
Toc

Implementation steps

A good way to start is to download the skeleton SBT project archive file from the ModernScalaProjects_Code folder. 

The step-by-step instructions are as follows:

  1. EDA on the testing (cross-validation) dataset.
  2. Calculate the probability densities.
  3. Generate a fraud detection model.
  4. Generate scores that measure the accuracy of the model:
    • Compute the best F1 score
    • Compute the best error term
  5. Calculate outliers by repeatedly having the model generate predictions over each value of error term in a range. 

We will create a FraudDetection trait now.

Create the FraudDetection trait

In an empty FraudDetectionPipeline.scala file, add in the following imports. These are imports that we need for Logging...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime