Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Modern Scala Projects
  • Table Of Contents Toc
  • Feedback & Rating feedback
Modern Scala Projects

Modern Scala Projects

By : gurusamy
close
close
Modern Scala Projects

Modern Scala Projects

By: gurusamy

Overview of this book

Scala is both a functional programming and object-oriented programming language designed to express common programming patterns in a concise, readable, and type-safe way. Complete with step-by-step instructions, Modern Scala Projects will guide you in exploring Scala capabilities and learning best practices. Along the way, you'll build applications for professional contexts while understanding the core tasks and components. You’ll begin with a project for predicting the class of a flower by implementing a simple machine learning model. Next, you'll create a cancer diagnosis classification pipeline, followed by tackling projects delving into stock price prediction, spam filtering, fraud detection, and a recommendation engine. The focus will be on application of ML techniques that classify data and make predictions, with an emphasis on automating data workflows with the Spark ML pipeline API. The book also showcases the best of Scala’s functional libraries and other constructs to help you roll out your own scalable data processing frameworks. By the end of this Scala book, you’ll have a firm foundation in Scala programming and have built some interesting real-world projects to add to your portfolio.
Table of Contents (9 chapters)
close
close

Fraud detection problem


The fraud detection problem is not a supervised learning problem. We have an unbalanced class situation in our fraud detection scenario. What do we have to say abouttheimportance of the F1 scorein relation to the target variable? First, the target variable is a binary label. The F1 score is relevant to our fraud detection problem because we have an unbalanced class, where one class is practically more important than the other. What do we mean by that?The bottom line of the fraud detection classification process concerns whether a certain instance is fraudulent, and getting the classifier to classify or label this instance correctly as fraudulent.The emphasis is not on labeling an instance as non-fraudulent.

 To reiterate, there are two classes in our fraud detection problem:

  • Fraudulent 
  • Non-fraudulent

That said, we will now look at the dataset that this implementation depends upon 

Fraud detection dataset at a glance

Download the dataset from the ModernScalaProjects_Code...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY