SlideShare une entreprise Scribd logo
1  sur  10
Télécharger pour lire hors ligne
Introduction to Text Classification using
Scala
Sudharshan
What is Text classification
Text Classification using machine
learning and NLP is to classify the
documents into separate categories
based on the linguistic features present
in the documents.
Preprocessing
TextDirectoryLoader
Tokenizer
Vectorizer
Folder containing subfolders of each
class text files (eg: Pos, Neg)
Instances with class and other attributes
Instances with Feature Vectors
Processed Train Set in Memory
Classifier Training
Classifier Training
Algorithm
Training set Feature vectors of all instances
Model File built
Test a Single Instance
Read a string and classify it
Prediction
Reads a string and preprocess
and classify it as a particular class.
Some ML classification
algorithm
Testing the Model: Cross Validation
Load TestSet Data
Randomize Data
Cross Validation
Preproces
sing Tokenize
Y
e
s
NO
Confusion Matrix
results
Demo using Scala Breeze/Nak
For our demo we are using this SBT dependency
libraryDependencies += "org.scalanlp" % "nak" % "1.1.3"
https://github.com/scalanlp/nak
Simple Example for
Training and Evaluation
object TwentyNewsExample extends App
{
val directoryLocation="/media/home/Work/Backup/365mediaBackup/corpus/20news-
bydate";
val newsgroupsDir = new File(directoryLocation)
implicit val isoCodec = scala.io.Codec("ISO-8859-1")
val stopwords = Set("the","a","an","of","in","for","by","on")
val trainDir = new File(newsgroupsDir, "small_train")
val trainingExamples = fromLabeledDirs(trainDir).toList
val featurizer = new BowFeaturizer(stopwords)
Training and Evaluation code
//Training Process
val config = LiblinearConfig(cost=5.0)
val classifier = trainClassifier(config, featurizer, trainingExamples)
println("training done ")
//Evaluation Process
val evalDir = new File(newsgroupsDir, "small_test")
val maxLabelNews = maxLabel(classifier.labels) _
val comparisons = for (ex <- fromLabeledDirs(evalDir).toList) yield
(ex.label, maxLabelNews(classifier.evalRaw(ex.features)), ex.features)
val (goldLabels, predictions, inputs) = comparisons.unzip3
println(ConfusionMatrix(goldLabels, predictions, inputs))
}
Code and dataset will be available
https://github.
com/rsudharshan/DataScienceWithScala
also in the Nak github page
Questions ??
Thank You

Contenu connexe

Tendances

Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Hemlathadhevi Annadhurai
 
Basic Concepts Of OOPS/OOPS in Java,C++
Basic Concepts Of OOPS/OOPS in Java,C++Basic Concepts Of OOPS/OOPS in Java,C++
Basic Concepts Of OOPS/OOPS in Java,C++Guneesh Basundhra
 
Parallel Computing in .NET
Parallel Computing in .NETParallel Computing in .NET
Parallel Computing in .NETmeghantaylor
 
Packages and Interfaces
Packages and InterfacesPackages and Interfaces
Packages and InterfacesAkashDas112
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in javaNilesh Dalvi
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Languagedheva B
 
GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)HarshithaAllu
 
Information Extraction from HTML: General Machine Learning ...
Information Extraction from HTML: General Machine Learning ...Information Extraction from HTML: General Machine Learning ...
Information Extraction from HTML: General Machine Learning ...butest
 
6. Exception Handling
6. Exception Handling6. Exception Handling
6. Exception HandlingNilesh Dalvi
 

Tendances (19)

Introducing object oriented programming (oop)
Introducing object oriented programming (oop)Introducing object oriented programming (oop)
Introducing object oriented programming (oop)
 
Basic Concepts Of OOPS/OOPS in Java,C++
Basic Concepts Of OOPS/OOPS in Java,C++Basic Concepts Of OOPS/OOPS in Java,C++
Basic Concepts Of OOPS/OOPS in Java,C++
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
OOP in Java
OOP in JavaOOP in Java
OOP in Java
 
Fundamentals of JAVA
Fundamentals of JAVAFundamentals of JAVA
Fundamentals of JAVA
 
Oops in Java
Oops in JavaOops in Java
Oops in Java
 
Java Object Oriented Programming
Java Object Oriented Programming Java Object Oriented Programming
Java Object Oriented Programming
 
Parallel Computing in .NET
Parallel Computing in .NETParallel Computing in .NET
Parallel Computing in .NET
 
Packages and Interfaces
Packages and InterfacesPackages and Interfaces
Packages and Interfaces
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in java
 
JAVA PROGRAMMING – Packages - Stream based I/O
JAVA PROGRAMMING – Packages - Stream based I/O JAVA PROGRAMMING – Packages - Stream based I/O
JAVA PROGRAMMING – Packages - Stream based I/O
 
Object Oriented Language
Object Oriented LanguageObject Oriented Language
Object Oriented Language
 
GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)
 
As3.0
As3.0As3.0
As3.0
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Information Extraction from HTML: General Machine Learning ...
Information Extraction from HTML: General Machine Learning ...Information Extraction from HTML: General Machine Learning ...
Information Extraction from HTML: General Machine Learning ...
 
6. Exception Handling
6. Exception Handling6. Exception Handling
6. Exception Handling
 
Java packages
Java packagesJava packages
Java packages
 
Javasession6
Javasession6Javasession6
Javasession6
 

Similaire à Introduction to text classification using scala

Online Tweet Sentiment Analysis with Apache Spark
Online Tweet Sentiment Analysis with Apache SparkOnline Tweet Sentiment Analysis with Apache Spark
Online Tweet Sentiment Analysis with Apache SparkDavide Nardone
 
Java se 8 fundamentals
Java se 8 fundamentalsJava se 8 fundamentals
Java se 8 fundamentalsmegharajk
 
Java classes in karve nagar pune
Java classes in karve nagar puneJava classes in karve nagar pune
Java classes in karve nagar puneletsleadsand
 
Nitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptxNitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptxNitishChaulagai
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java ProgrammingMath-Circle
 
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...AnkurSingh340457
 
Text classification with Weka
Text classification with WekaText classification with Weka
Text classification with WekaMilad Alshomary
 
Object Oriented Programming Language is an oop
Object Oriented Programming Language is an oopObject Oriented Programming Language is an oop
Object Oriented Programming Language is an oopsanaiftikhar23
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascriptUsman Mehmood
 
Android Training (Java Review)
Android Training (Java Review)Android Training (Java Review)
Android Training (Java Review)Khaled Anaqwa
 
Xml representation oftextspecifications
Xml representation oftextspecificationsXml representation oftextspecifications
Xml representation oftextspecificationsusert098
 
Introduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologiesIntroduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologiesTabassumMaktum
 
STAT Requirement Analysis
STAT Requirement AnalysisSTAT Requirement Analysis
STAT Requirement Analysisstat
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaSynesso
 
DOSUG XML Beans overview by Om Sivanesian
DOSUG XML Beans overview by Om SivanesianDOSUG XML Beans overview by Om Sivanesian
DOSUG XML Beans overview by Om SivanesianMatthew McCullough
 

Similaire à Introduction to text classification using scala (20)

Java_Interview Qns
Java_Interview QnsJava_Interview Qns
Java_Interview Qns
 
Python-Classes.pptx
Python-Classes.pptxPython-Classes.pptx
Python-Classes.pptx
 
Python - object oriented
Python - object orientedPython - object oriented
Python - object oriented
 
Online Tweet Sentiment Analysis with Apache Spark
Online Tweet Sentiment Analysis with Apache SparkOnline Tweet Sentiment Analysis with Apache Spark
Online Tweet Sentiment Analysis with Apache Spark
 
javaopps concepts
javaopps conceptsjavaopps concepts
javaopps concepts
 
Java se 8 fundamentals
Java se 8 fundamentalsJava se 8 fundamentals
Java se 8 fundamentals
 
Java classes in karve nagar pune
Java classes in karve nagar puneJava classes in karve nagar pune
Java classes in karve nagar pune
 
Nitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptxNitish Chaulagai Java1.pptx
Nitish Chaulagai Java1.pptx
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
FAL(2022-23)_CSE0206_ETH_AP2022232000455_Reference_Material_I_16-Aug-2022_Mod...
 
Text classification with Weka
Text classification with WekaText classification with Weka
Text classification with Weka
 
Object Oriented Programming Language is an oop
Object Oriented Programming Language is an oopObject Oriented Programming Language is an oop
Object Oriented Programming Language is an oop
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
 
Android Training (Java Review)
Android Training (Java Review)Android Training (Java Review)
Android Training (Java Review)
 
Xml representation oftextspecifications
Xml representation oftextspecificationsXml representation oftextspecifications
Xml representation oftextspecifications
 
Introduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologiesIntroduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologies
 
STAT Requirement Analysis
STAT Requirement AnalysisSTAT Requirement Analysis
STAT Requirement Analysis
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Java basics
Java basicsJava basics
Java basics
 
DOSUG XML Beans overview by Om Sivanesian
DOSUG XML Beans overview by Om SivanesianDOSUG XML Beans overview by Om Sivanesian
DOSUG XML Beans overview by Om Sivanesian
 

Dernier

ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxNeo4j
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPTiSEO AI
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 

Dernier (20)

ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 

Introduction to text classification using scala

  • 1. Introduction to Text Classification using Scala Sudharshan
  • 2. What is Text classification Text Classification using machine learning and NLP is to classify the documents into separate categories based on the linguistic features present in the documents.
  • 3. Preprocessing TextDirectoryLoader Tokenizer Vectorizer Folder containing subfolders of each class text files (eg: Pos, Neg) Instances with class and other attributes Instances with Feature Vectors Processed Train Set in Memory
  • 4. Classifier Training Classifier Training Algorithm Training set Feature vectors of all instances Model File built Test a Single Instance Read a string and classify it Prediction Reads a string and preprocess and classify it as a particular class. Some ML classification algorithm
  • 5. Testing the Model: Cross Validation Load TestSet Data Randomize Data Cross Validation Preproces sing Tokenize Y e s NO Confusion Matrix results
  • 6. Demo using Scala Breeze/Nak For our demo we are using this SBT dependency libraryDependencies += "org.scalanlp" % "nak" % "1.1.3" https://github.com/scalanlp/nak
  • 7. Simple Example for Training and Evaluation object TwentyNewsExample extends App { val directoryLocation="/media/home/Work/Backup/365mediaBackup/corpus/20news- bydate"; val newsgroupsDir = new File(directoryLocation) implicit val isoCodec = scala.io.Codec("ISO-8859-1") val stopwords = Set("the","a","an","of","in","for","by","on") val trainDir = new File(newsgroupsDir, "small_train") val trainingExamples = fromLabeledDirs(trainDir).toList val featurizer = new BowFeaturizer(stopwords)
  • 8. Training and Evaluation code //Training Process val config = LiblinearConfig(cost=5.0) val classifier = trainClassifier(config, featurizer, trainingExamples) println("training done ") //Evaluation Process val evalDir = new File(newsgroupsDir, "small_test") val maxLabelNews = maxLabel(classifier.labels) _ val comparisons = for (ex <- fromLabeledDirs(evalDir).toList) yield (ex.label, maxLabelNews(classifier.evalRaw(ex.features)), ex.features) val (goldLabels, predictions, inputs) = comparisons.unzip3 println(ConfusionMatrix(goldLabels, predictions, inputs)) }
  • 9. Code and dataset will be available https://github. com/rsudharshan/DataScienceWithScala also in the Nak github page