SlideShare a Scribd company logo
1 of 21
Shifu-Plugin Demo
Lisa Hua
7/21/2014
Recap
1. Convert PMML back to ML model
2. Integrate to Shifu as Shifu-plugin-*
3. Add examples
4. Performance test for PMML evaluator
Miscellaneous
1. Compatible issue:
Spark depends on Akka 2.2.3, while shifu uses 2.1.1
2. Spark overview
3. About showcase
a video that introduces shifu
a poster that describes my project
a project title and project description
PMML Adapter Demo
Lisa Hua
06/23/14
ML Framework Neural Network Logistic Regression SVM Decision Tree
Encog Support Support TBD None
Spark None Support TBD TBD
Mahout Support Support TBD TBD
H2o TBD None TBD TBD
Outline
1. Neural Network Model Conversion
a. Encog NN model
b. Mahout NN model
1. Logistic Regression Model Conversion
a. Encog LR model (NN)
b. Spark LR model
c. Mahout LR model
2. PMML Adapter API and how to extend
PMML Adapter
Performance Test
protected void initMLModel() {...
mlModel = new MultilayerPerceptron();
mlModel.addLayer(20, false, "Identity");
// numInputFields,isFinalLayer,squashFunction
mlModel.addLayer(45, false, "Sigmoid");
mlModel.addLayer(45, false, "Sigmoid");
mlModel.addLayer(1, true, "Sigmoid");
for (MahoutData data : inputDataSet) {
mlModel.trainOnline(data.getInput()); …}
}
protected void adaptToPMML() {...
Matrix[] matrixList = nnModel.getWeightMatrices();...
}
squashFunctions:
1. only supports identity and sigmoid now.
2. squashFunctionList is protected without
getter function, now we set
activationFunction as sigmoid by default.
Mahout NN Model - trainOnline()
//in Adapter
for (int k = 1; k < columnSize; k++) {
neuron.withConnections(new Connection(matrix.get(j, k)));
}
// bias neuron for each layer, set to bias=1
neuron.withConnections(new Connection(matrix.get(j, 0)));
Bias is the first Neuron in each layer
that is not the final layer
protected void evaluatePMML() {
for (int i = 0; i < mahoutDataSet.size(); i++) {
Assert.assertEquals(
getPMMLEvaluatorResult(pmmlEvalResultList.get(i)),
getMahoutResult(mahoutDataSet.get(i)), DELTA);//DELTA=10-5
}
private double getMahoutResult(MahoutData data) {
return mlModel.getOutput(data.getEvalInput()).get(0);
}
Mahout NN Model - getOutput()
Outline
1. Neural Network Model Conversion
a. Encog NN model
b. Mahout NN model
1. Logistic Regression Model Conversion
a. Encog LR model (NN)
b. Spark LR model
c. Mahout LR model
2. PMML Adapter API and how to extend
PMML Adapter
Encog LR Model - compute()
protected void initMLModel() {...
lrModel = (BasicNetwork) networkReader.read(new FileInputStream("EncogLR.lr"));
}
protected void adaptToPMML() {...
double[] weights = lrModel.getWeights();...}
}
protected void evaluatePMML() {
for (int i = 0; i < dataSet.size(); i++) {
Assert.assertEquals( getPMMLEvaluatorResult(index++),
getNextEncogLRResult(mlResultIterator), DELTA);
}
}
private double getNextEncogLRResult(Iterator<MLDataPair> mlResultIterator) {
MLData result = lrModel.compute(mlResultIterator.next().getInput());
return result.getData(0);
}
Spark LR Model: train() and predict()
protected void initMLModel() {...
lrModel = LogisticRegressionWithSGD.train(points.rdd(), iterations,stepSize);
}
protected void adaptToPMML() {...
List<double> weights = lrModel.weights();
...}
protected void evaluatePMML() {...
List<Double> evalList = lrModel.predict(evalRDD).cache().collect();
for (...) {
Assert.assertEqual( getPMMLEvaluatorResult(i),
sparkEvalList.get(i),DELTA);
}
} Notes:
1. The method lrModel.weights() returns intercept followed by the weight list.
2. Compatible issue:
Spark depends on Akka 2.2.3, while shifu uses 2.1.1. Currently, these is compatible issue if we
change Akka version of shifu-core from 2.1.1 to 2.2.3, I suspect the issue lies in Guagua based
on the building history, the root cause is still unknown to me.
Mahout LR Model - train() and classifyScalar()
protected void initMLModel() {...
lrModel = new OnlineLogisticRegression(2, 20, new L1());
//numCategory, numFeatures, PriorFunction
for (MahoutDataPair pair : inputDataSet) {
lrModel.train(pair.getActual(), pair.getFeatureField());
}
}
protected void adaptToPMML() {...
Matrix matrix = lrModel.getBeta(); // coefficients. This is a dense matrix
// that is (numCategories-1) x numFeatures
}
private double getMahoutResult(MahoutDataPair data) {
return lrModel.classifyScalar(data.getVector());
//Returns a single scalar probability in the case where we have two categories.
}
Summary of Evaluation Dataset
Model ML Framework Input Data Field Input Data Evaluation Data Nodes in each layer
Neural
Network
Encog 2 layers 20 450
118
20,45,45,1
560
Encog 3 layers 25 450 550 25,20,15,20,1
Mahout 2 layers 20 450
118
20,45,45,1
560
Mahout 3 layers 25 450 550 25,20,15,20,1
Logistic
Regression
Encog 20 450
118
560
Logistic
Regression
Spark 20 450
118
560
Logistic
Regression
Mahout 20 450
118
560
Summary of the Functions
model class name
parent
class/interface Training method
retrieve training
result
evalution
method
Basic Data
Structure
Encog
Neural
Network
BasicNetork MLClassification
compute
(MLDataSet data)
getWeights():
double[] compute()
MLData: Double[],
MLDataSet:
Set<Double[]>
Logistic
Regression
Spark
Logistic
Regression
Logistic
Regression
Model
GeneralLinearModel,
ClassificationModel train(RDD data) weights():double[]
predict (RDD
<Vector>):
RDD<Double>
RDD: Resilient
Distributed Dataset
Mahout
Neural
Network
Multilayer
Perceptron NeuralNetwork
trainOnline (Vector
instance)
getWeightMatrices
():Matrix
getOutput
(Vector):Vector
Vector
Matrix:
List<Vector>
Logistic
Regression
Online
Logistic
Regression
AbstractOnline
LogisticRegression
train(Vector actual,
Vector instance) getBeta(): Matrix
classifyScalar
(Vector
instance)
:double
Outline
1. Neural Network Model Conversion
a. Encog NN model
b. Mahout NN model
1. Logistic Regression Model Conversion
a. Encog LR model (NN)
b. Spark LR model
c. Mahout LR model
2. PMML Adapter API and how to extend
PMML Adapter
3. PMML Adapter API
1. For new ML model conversion
a. implement a subclass of
PMMLModelBuilder<TargetPMMLModel,
SourceMLModel>, implement
adaptMLModelToPMML()
Next Step
● Support: supported by PMML Adapter
● None: The ML framework doesn’t support this ML
model currently
● TBD: To be determined
ML Framework Neural Network Logistic Regression SVM Decision Tree
Encog Support Support TBD None
Spark None Support TBD TBD
Mahout Support Support TBD TBD
H2o TBD None TBD TBD
1. PMML skeleton - Neural Network
<PMML>
<Header></Header>
<DataDictionary></DataDictionary> (specify the format of the input csv)
<NeuralNetwork functionName=”classification”> (models)
<MiningSchema></MiningSchema> (how to use the input data)
<LocalTransformation></LocalTransformation> (specify derived field)
<NeuralInput></NeuralInput> (Input layer, which field should be
used)
<NeuralLayers> (Layers,not include input layer and output layer)
<NeuralLayer activationFunction=”logistic”>
<Neuron id=”X,Y” bias=”0.0”>
<Con from=”X-1,Y” weight=””>
</Neuron>
</NeuralLayer>
</NeuralLayers>
<NeuralOutputs numberOfOutputs="1">
<NeuralOutput outputNeuron="3,0"></NeuralOutput >
</NeuralOutputs>
</NeuralNetwork>
</PMML>
2.1 PMML Neural Network - Mahout
2,3,1
{
0 => {0:-0.2861259717601905,1:-0.4079344783742465,2:-0.43218273192749174}
1 => {0:0.223912887382075,1:-0.08865866120943716,2:0.4095464158191267}
2 => {0:0.14754755237008804,1:0.2638192545136143,2:0.06633581725392071}
}
{
0 => {0:0.04388751672411058,1:-0.35597268769777723,2:0.21149680575173224,3:0.34402628331423807}
}
0.5635827615510126,
0.5482023969601073,
0.5609684690326279,
0.5751568027254008,
Propagation Weight train evaluate
Encog backpropagation double[] MLTrain/Propagation
Mahout feed-forward Matrix network.trainOnline
(vector)
network.getOutput(vector)
3. PMML Evaluation
public Map<String, Double> evaluateRaw(EvaluationContext context){
NeuralNetwork neuralNetwork = getModel();
Map<String, Double> result = Maps.newLinkedHashMap();
NeuralInputs neuralInputs = neuralNetwork.getNeuralInputs();
for(NeuralInput neuralInput: neuralInputs){
DerivedField derivedField = neuralInput.getDerivedField();
FieldValue value = ExpressionUtil.evaluate(derivedField, context);...
result.put(neuralInput.getId(), (value.asNumber()).doubleValue());
}
List<NeuralLayer> neuralLayers = neuralNetwork.getNeuralLayers();
for(NeuralLayer neuralLayer : neuralLayers){
List<Neuron> neurons = neuralLayer.getNeurons();
for(Neuron neuron : neurons){
double z = neuron.getBias();//the bias for each Neuron,
should be set to 0
List<Connection> connections = neuron.getConnections();
for(Connection connection : connections){
double input = result.get(connection.getFrom());
z += input * connection.getWeight();
}
double output = activation(z, neuralLayer);
result.put(neuron.getId(), output);
}
normalizeNeuronOutputs(neuralLayer, result);
}
return result;
}
private double activation(double z, NeuralLayer neuralLayer){...
switch(activationFunction){
case LOGISTIC: return 1.0 / (1.0 + Math.exp(-z)); //Sigmoid
case IDENTITY: return z; ...//Linear
}
How to get score from PMML
evaluator - EvaluatorTest
PMML pmml = loadPMML(getClass());
//InputStream is = getResourceAsStream("/pmml/" +getSimpleName() + ".pmml");
//return IOUtil.unmarshal(is);
NeuralNetworkEvaluator evaluator = new NeuralNetworkEvaluator(pmml);
InputStream is = getClass().getResourceAsStream("/pmml/NormalizedData.csv");
List<Map<FieldName, String>> input = CsvUtil.load(is);
for (Map<FieldName, String> maps : input) {
Map<FieldName, NeuronClassificationMap> evaluateList = (Map<FieldName,
NeuronClassificationMap>)
evaluator.evaluate(maps);
for (NeuronClassificationMap cMap : evaluateList.values())
for (Map.Entry<?, Double> entry : cMap.entrySet())
System.out.println(index++ +":"+entry.getKey() + ":" +
entry.getValue() * 1000);
List<FieldName> activeFields = evaluator.getActiveFields();
}

More Related Content

What's hot

International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09Mårten Gustafson
 
IRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGAIRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGAIRJET Journal
 
15 Machine Learning Multilayer Perceptron
15 Machine Learning Multilayer Perceptron15 Machine Learning Multilayer Perceptron
15 Machine Learning Multilayer PerceptronAndres Mendez-Vazquez
 
Electricity Demand Forecasting Using Fuzzy-Neural Network
Electricity Demand Forecasting Using Fuzzy-Neural NetworkElectricity Demand Forecasting Using Fuzzy-Neural Network
Electricity Demand Forecasting Using Fuzzy-Neural NetworkNaren Chandra Kattla
 
Advance Java Programs skeleton
Advance Java Programs skeletonAdvance Java Programs skeleton
Advance Java Programs skeletonIram Ramrajkar
 
Evaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernelsEvaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernelsinfopapers
 
Simware and the new SISO LSA
Simware and the new SISO LSASimware and the new SISO LSA
Simware and the new SISO LSASimware
 
MPerceptron
MPerceptronMPerceptron
MPerceptronbutest
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical FileSoumya Behera
 
Electricity Demand Forecasting Using ANN
Electricity Demand Forecasting Using ANNElectricity Demand Forecasting Using ANN
Electricity Demand Forecasting Using ANNNaren Chandra Kattla
 
Artificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
Artificial Neural Networks Lect5: Multi-Layer Perceptron & BackpropagationArtificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
Artificial Neural Networks Lect5: Multi-Layer Perceptron & BackpropagationMohammed Bennamoun
 
IRJET- Image Classification – Cat and Dog Images
IRJET- Image Classification – Cat and Dog ImagesIRJET- Image Classification – Cat and Dog Images
IRJET- Image Classification – Cat and Dog ImagesIRJET Journal
 
Exploring Simple Siamese Representation Learning
Exploring Simple Siamese Representation LearningExploring Simple Siamese Representation Learning
Exploring Simple Siamese Representation LearningSungchul Kim
 
Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Rajeev Rastogi (KRR)
 
Section5 Rbf
Section5 RbfSection5 Rbf
Section5 Rbfkylin
 

What's hot (20)

International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
neural networksNnf
neural networksNnfneural networksNnf
neural networksNnf
 
G010334554
G010334554G010334554
G010334554
 
WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09WebSphere Message Broker v6.x Overview - 2008-01-09
WebSphere Message Broker v6.x Overview - 2008-01-09
 
IRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGAIRJET - Implementation of Neural Network on FPGA
IRJET - Implementation of Neural Network on FPGA
 
15 Machine Learning Multilayer Perceptron
15 Machine Learning Multilayer Perceptron15 Machine Learning Multilayer Perceptron
15 Machine Learning Multilayer Perceptron
 
Backpropagation algo
Backpropagation  algoBackpropagation  algo
Backpropagation algo
 
Electricity Demand Forecasting Using Fuzzy-Neural Network
Electricity Demand Forecasting Using Fuzzy-Neural NetworkElectricity Demand Forecasting Using Fuzzy-Neural Network
Electricity Demand Forecasting Using Fuzzy-Neural Network
 
Advance Java Programs skeleton
Advance Java Programs skeletonAdvance Java Programs skeleton
Advance Java Programs skeleton
 
Evaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernelsEvaluation of a hybrid method for constructing multiple SVM kernels
Evaluation of a hybrid method for constructing multiple SVM kernels
 
Simware and the new SISO LSA
Simware and the new SISO LSASimware and the new SISO LSA
Simware and the new SISO LSA
 
MPerceptron
MPerceptronMPerceptron
MPerceptron
 
Advanced Java Practical File
Advanced Java Practical FileAdvanced Java Practical File
Advanced Java Practical File
 
Electricity Demand Forecasting Using ANN
Electricity Demand Forecasting Using ANNElectricity Demand Forecasting Using ANN
Electricity Demand Forecasting Using ANN
 
Artificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
Artificial Neural Networks Lect5: Multi-Layer Perceptron & BackpropagationArtificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
Artificial Neural Networks Lect5: Multi-Layer Perceptron & Backpropagation
 
IRJET- Image Classification – Cat and Dog Images
IRJET- Image Classification – Cat and Dog ImagesIRJET- Image Classification – Cat and Dog Images
IRJET- Image Classification – Cat and Dog Images
 
Exploring Simple Siamese Representation Learning
Exploring Simple Siamese Representation LearningExploring Simple Siamese Representation Learning
Exploring Simple Siamese Representation Learning
 
Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2
 
Section5 Rbf
Section5 RbfSection5 Rbf
Section5 Rbf
 
H046014853
H046014853H046014853
H046014853
 

Similar to Shifu plugin-trainer and pmml-adapter

Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandFrançois Garillot
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit
 
MS SQL SERVER:Microsoft neural network and logistic regression
MS SQL SERVER:Microsoft neural network and logistic regressionMS SQL SERVER:Microsoft neural network and logistic regression
MS SQL SERVER:Microsoft neural network and logistic regressionDataminingTools Inc
 
MS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Neural network and logistic regressionMS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Neural network and logistic regressionsqlserver content
 
Training course lect3
Training course lect3Training course lect3
Training course lect3Noor Dhiya
 
Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016Comsysto Reply GmbH
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Valeriy Kravchuk
 
Lab 2: Classification and Regression Prediction Models, training and testing ...
Lab 2: Classification and Regression Prediction Models, training and testing ...Lab 2: Classification and Regression Prediction Models, training and testing ...
Lab 2: Classification and Regression Prediction Models, training and testing ...Yao Yao
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docxssuser1c8ca21
 
Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016Matt Warren
 
StackNet Meta-Modelling framework
StackNet Meta-Modelling frameworkStackNet Meta-Modelling framework
StackNet Meta-Modelling frameworkSri Ambati
 
Java programming concept
Java programming conceptJava programming concept
Java programming conceptSanjay Gunjal
 
A Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
A Scaleable Implemenation of Deep Leaning on Spark- Alexander UlanovA Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
A Scaleable Implemenation of Deep Leaning on Spark- Alexander UlanovSpark Summit
 
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander UlanovA Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander UlanovSpark Summit
 
Go Faster With Native Compilation
Go Faster With Native CompilationGo Faster With Native Compilation
Go Faster With Native CompilationPGConf APAC
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationWei-Ren Chen
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profilerIhor Bobak
 

Similar to Shifu plugin-trainer and pmml-adapter (20)

Mobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in SwitzerlandMobility insights at Swisscom - Understanding collective mobility in Switzerland
Mobility insights at Swisscom - Understanding collective mobility in Switzerland
 
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed KafsiSpark Summit EU talk by Francois Garillot and Mohamed Kafsi
Spark Summit EU talk by Francois Garillot and Mohamed Kafsi
 
MS SQL SERVER:Microsoft neural network and logistic regression
MS SQL SERVER:Microsoft neural network and logistic regressionMS SQL SERVER:Microsoft neural network and logistic regression
MS SQL SERVER:Microsoft neural network and logistic regression
 
MS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Neural network and logistic regressionMS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Neural network and logistic regression
 
Training course lect3
Training course lect3Training course lect3
Training course lect3
 
Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016Machinelearning Spark Hadoop User Group Munich Meetup 2016
Machinelearning Spark Hadoop User Group Munich Meetup 2016
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)
 
Lab 2: Classification and Regression Prediction Models, training and testing ...
Lab 2: Classification and Regression Prediction Models, training and testing ...Lab 2: Classification and Regression Prediction Models, training and testing ...
Lab 2: Classification and Regression Prediction Models, training and testing ...
 
systemverilog-interview-questions.docx
systemverilog-interview-questions.docxsystemverilog-interview-questions.docx
systemverilog-interview-questions.docx
 
Database programming
Database programmingDatabase programming
Database programming
 
Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016Performance and how to measure it - ProgSCon London 2016
Performance and how to measure it - ProgSCon London 2016
 
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
Deep Learning for Computer Vision: Software Frameworks (UPC 2016)
 
StackNet Meta-Modelling framework
StackNet Meta-Modelling frameworkStackNet Meta-Modelling framework
StackNet Meta-Modelling framework
 
Java programming concept
Java programming conceptJava programming concept
Java programming concept
 
A Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
A Scaleable Implemenation of Deep Leaning on Spark- Alexander UlanovA Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
A Scaleable Implemenation of Deep Leaning on Spark- Alexander Ulanov
 
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander UlanovA Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
 
Go Faster With Native Compilation
Go Faster With Native CompilationGo Faster With Native Compilation
Go Faster With Native Compilation
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate Representation
 
Hadoop cluster performance profiler
Hadoop cluster performance profilerHadoop cluster performance profiler
Hadoop cluster performance profiler
 
spring-tutorial
spring-tutorialspring-tutorial
spring-tutorial
 

Recently uploaded

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Shifu plugin-trainer and pmml-adapter

  • 2. Recap 1. Convert PMML back to ML model 2. Integrate to Shifu as Shifu-plugin-* 3. Add examples 4. Performance test for PMML evaluator
  • 3. Miscellaneous 1. Compatible issue: Spark depends on Akka 2.2.3, while shifu uses 2.1.1 2. Spark overview 3. About showcase a video that introduces shifu a poster that describes my project a project title and project description
  • 4. PMML Adapter Demo Lisa Hua 06/23/14 ML Framework Neural Network Logistic Regression SVM Decision Tree Encog Support Support TBD None Spark None Support TBD TBD Mahout Support Support TBD TBD H2o TBD None TBD TBD
  • 5. Outline 1. Neural Network Model Conversion a. Encog NN model b. Mahout NN model 1. Logistic Regression Model Conversion a. Encog LR model (NN) b. Spark LR model c. Mahout LR model 2. PMML Adapter API and how to extend PMML Adapter
  • 7. protected void initMLModel() {... mlModel = new MultilayerPerceptron(); mlModel.addLayer(20, false, "Identity"); // numInputFields,isFinalLayer,squashFunction mlModel.addLayer(45, false, "Sigmoid"); mlModel.addLayer(45, false, "Sigmoid"); mlModel.addLayer(1, true, "Sigmoid"); for (MahoutData data : inputDataSet) { mlModel.trainOnline(data.getInput()); …} } protected void adaptToPMML() {... Matrix[] matrixList = nnModel.getWeightMatrices();... } squashFunctions: 1. only supports identity and sigmoid now. 2. squashFunctionList is protected without getter function, now we set activationFunction as sigmoid by default. Mahout NN Model - trainOnline() //in Adapter for (int k = 1; k < columnSize; k++) { neuron.withConnections(new Connection(matrix.get(j, k))); } // bias neuron for each layer, set to bias=1 neuron.withConnections(new Connection(matrix.get(j, 0))); Bias is the first Neuron in each layer that is not the final layer
  • 8. protected void evaluatePMML() { for (int i = 0; i < mahoutDataSet.size(); i++) { Assert.assertEquals( getPMMLEvaluatorResult(pmmlEvalResultList.get(i)), getMahoutResult(mahoutDataSet.get(i)), DELTA);//DELTA=10-5 } private double getMahoutResult(MahoutData data) { return mlModel.getOutput(data.getEvalInput()).get(0); } Mahout NN Model - getOutput()
  • 9. Outline 1. Neural Network Model Conversion a. Encog NN model b. Mahout NN model 1. Logistic Regression Model Conversion a. Encog LR model (NN) b. Spark LR model c. Mahout LR model 2. PMML Adapter API and how to extend PMML Adapter
  • 10. Encog LR Model - compute() protected void initMLModel() {... lrModel = (BasicNetwork) networkReader.read(new FileInputStream("EncogLR.lr")); } protected void adaptToPMML() {... double[] weights = lrModel.getWeights();...} } protected void evaluatePMML() { for (int i = 0; i < dataSet.size(); i++) { Assert.assertEquals( getPMMLEvaluatorResult(index++), getNextEncogLRResult(mlResultIterator), DELTA); } } private double getNextEncogLRResult(Iterator<MLDataPair> mlResultIterator) { MLData result = lrModel.compute(mlResultIterator.next().getInput()); return result.getData(0); }
  • 11. Spark LR Model: train() and predict() protected void initMLModel() {... lrModel = LogisticRegressionWithSGD.train(points.rdd(), iterations,stepSize); } protected void adaptToPMML() {... List<double> weights = lrModel.weights(); ...} protected void evaluatePMML() {... List<Double> evalList = lrModel.predict(evalRDD).cache().collect(); for (...) { Assert.assertEqual( getPMMLEvaluatorResult(i), sparkEvalList.get(i),DELTA); } } Notes: 1. The method lrModel.weights() returns intercept followed by the weight list. 2. Compatible issue: Spark depends on Akka 2.2.3, while shifu uses 2.1.1. Currently, these is compatible issue if we change Akka version of shifu-core from 2.1.1 to 2.2.3, I suspect the issue lies in Guagua based on the building history, the root cause is still unknown to me.
  • 12. Mahout LR Model - train() and classifyScalar() protected void initMLModel() {... lrModel = new OnlineLogisticRegression(2, 20, new L1()); //numCategory, numFeatures, PriorFunction for (MahoutDataPair pair : inputDataSet) { lrModel.train(pair.getActual(), pair.getFeatureField()); } } protected void adaptToPMML() {... Matrix matrix = lrModel.getBeta(); // coefficients. This is a dense matrix // that is (numCategories-1) x numFeatures } private double getMahoutResult(MahoutDataPair data) { return lrModel.classifyScalar(data.getVector()); //Returns a single scalar probability in the case where we have two categories. }
  • 13. Summary of Evaluation Dataset Model ML Framework Input Data Field Input Data Evaluation Data Nodes in each layer Neural Network Encog 2 layers 20 450 118 20,45,45,1 560 Encog 3 layers 25 450 550 25,20,15,20,1 Mahout 2 layers 20 450 118 20,45,45,1 560 Mahout 3 layers 25 450 550 25,20,15,20,1 Logistic Regression Encog 20 450 118 560 Logistic Regression Spark 20 450 118 560 Logistic Regression Mahout 20 450 118 560
  • 14. Summary of the Functions model class name parent class/interface Training method retrieve training result evalution method Basic Data Structure Encog Neural Network BasicNetork MLClassification compute (MLDataSet data) getWeights(): double[] compute() MLData: Double[], MLDataSet: Set<Double[]> Logistic Regression Spark Logistic Regression Logistic Regression Model GeneralLinearModel, ClassificationModel train(RDD data) weights():double[] predict (RDD <Vector>): RDD<Double> RDD: Resilient Distributed Dataset Mahout Neural Network Multilayer Perceptron NeuralNetwork trainOnline (Vector instance) getWeightMatrices ():Matrix getOutput (Vector):Vector Vector Matrix: List<Vector> Logistic Regression Online Logistic Regression AbstractOnline LogisticRegression train(Vector actual, Vector instance) getBeta(): Matrix classifyScalar (Vector instance) :double
  • 15. Outline 1. Neural Network Model Conversion a. Encog NN model b. Mahout NN model 1. Logistic Regression Model Conversion a. Encog LR model (NN) b. Spark LR model c. Mahout LR model 2. PMML Adapter API and how to extend PMML Adapter
  • 16. 3. PMML Adapter API 1. For new ML model conversion a. implement a subclass of PMMLModelBuilder<TargetPMMLModel, SourceMLModel>, implement adaptMLModelToPMML()
  • 17. Next Step ● Support: supported by PMML Adapter ● None: The ML framework doesn’t support this ML model currently ● TBD: To be determined ML Framework Neural Network Logistic Regression SVM Decision Tree Encog Support Support TBD None Spark None Support TBD TBD Mahout Support Support TBD TBD H2o TBD None TBD TBD
  • 18. 1. PMML skeleton - Neural Network <PMML> <Header></Header> <DataDictionary></DataDictionary> (specify the format of the input csv) <NeuralNetwork functionName=”classification”> (models) <MiningSchema></MiningSchema> (how to use the input data) <LocalTransformation></LocalTransformation> (specify derived field) <NeuralInput></NeuralInput> (Input layer, which field should be used) <NeuralLayers> (Layers,not include input layer and output layer) <NeuralLayer activationFunction=”logistic”> <Neuron id=”X,Y” bias=”0.0”> <Con from=”X-1,Y” weight=””> </Neuron> </NeuralLayer> </NeuralLayers> <NeuralOutputs numberOfOutputs="1"> <NeuralOutput outputNeuron="3,0"></NeuralOutput > </NeuralOutputs> </NeuralNetwork> </PMML>
  • 19. 2.1 PMML Neural Network - Mahout 2,3,1 { 0 => {0:-0.2861259717601905,1:-0.4079344783742465,2:-0.43218273192749174} 1 => {0:0.223912887382075,1:-0.08865866120943716,2:0.4095464158191267} 2 => {0:0.14754755237008804,1:0.2638192545136143,2:0.06633581725392071} } { 0 => {0:0.04388751672411058,1:-0.35597268769777723,2:0.21149680575173224,3:0.34402628331423807} } 0.5635827615510126, 0.5482023969601073, 0.5609684690326279, 0.5751568027254008, Propagation Weight train evaluate Encog backpropagation double[] MLTrain/Propagation Mahout feed-forward Matrix network.trainOnline (vector) network.getOutput(vector)
  • 20. 3. PMML Evaluation public Map<String, Double> evaluateRaw(EvaluationContext context){ NeuralNetwork neuralNetwork = getModel(); Map<String, Double> result = Maps.newLinkedHashMap(); NeuralInputs neuralInputs = neuralNetwork.getNeuralInputs(); for(NeuralInput neuralInput: neuralInputs){ DerivedField derivedField = neuralInput.getDerivedField(); FieldValue value = ExpressionUtil.evaluate(derivedField, context);... result.put(neuralInput.getId(), (value.asNumber()).doubleValue()); } List<NeuralLayer> neuralLayers = neuralNetwork.getNeuralLayers(); for(NeuralLayer neuralLayer : neuralLayers){ List<Neuron> neurons = neuralLayer.getNeurons(); for(Neuron neuron : neurons){ double z = neuron.getBias();//the bias for each Neuron, should be set to 0 List<Connection> connections = neuron.getConnections(); for(Connection connection : connections){ double input = result.get(connection.getFrom()); z += input * connection.getWeight(); } double output = activation(z, neuralLayer); result.put(neuron.getId(), output); } normalizeNeuronOutputs(neuralLayer, result); } return result; } private double activation(double z, NeuralLayer neuralLayer){... switch(activationFunction){ case LOGISTIC: return 1.0 / (1.0 + Math.exp(-z)); //Sigmoid case IDENTITY: return z; ...//Linear }
  • 21. How to get score from PMML evaluator - EvaluatorTest PMML pmml = loadPMML(getClass()); //InputStream is = getResourceAsStream("/pmml/" +getSimpleName() + ".pmml"); //return IOUtil.unmarshal(is); NeuralNetworkEvaluator evaluator = new NeuralNetworkEvaluator(pmml); InputStream is = getClass().getResourceAsStream("/pmml/NormalizedData.csv"); List<Map<FieldName, String>> input = CsvUtil.load(is); for (Map<FieldName, String> maps : input) { Map<FieldName, NeuronClassificationMap> evaluateList = (Map<FieldName, NeuronClassificationMap>) evaluator.evaluate(maps); for (NeuronClassificationMap cMap : evaluateList.values()) for (Map.Entry<?, Double> entry : cMap.entrySet()) System.out.println(index++ +":"+entry.getKey() + ":" + entry.getValue() * 1000); List<FieldName> activeFields = evaluator.getActiveFields(); }

Editor's Notes

  1. Final w: 21 [0.0,3.4710234211383546,2.023273257032689,3.5343502155005786,3.366137268739723,2.7192122540777857,3.1421212856560685,3.7936396756134347,2.6680726281308655,2.5460611839812803,2.67024401591956,0.950869815171535,0.8354990986314994,1.5612095144815994,3.87191600605803,2.2967968626408948,3.8800049504570575,3.7145275740775876,2.7820240348634053,2.967509669711238,3.878495608939215]
  2. Final w: 21 [0.0,3.4710234211383546,2.023273257032689,3.5343502155005786,3.366137268739723,2.7192122540777857,3.1421212856560685,3.7936396756134347,2.6680726281308655,2.5460611839812803,2.67024401591956,0.950869815171535,0.8354990986314994,1.5612095144815994,3.87191600605803,2.2967968626408948,3.8800049504570575,3.7145275740775876,2.7820240348634053,2.967509669711238,3.878495608939215]
  3. { 0 => {0:0.3528888549834846,1:0.23247265381638815,2:0.37089691552165555,3:0.31329328541990004,4:0.40475136611986895,5:0.32681652579527315,6:0.4866708964945021,7:0.4082139989941705,8:0.44700471063740943,9:0.4848417632093249,10:-0.27063575729405037,11:-0.19914627520724254,12:-0.18134870652375099,13:0.6174361431748079,14:0.5213041865071554,15:0.6706597762207017,16:0.6063109185325967,17:0.4342586837447659,18:0.3396933433206152,19:0.6471369199462024} }
  4. Final w: 21 [0.0,3.4710234211383546,2.023273257032689,3.5343502155005786,3.366137268739723,2.7192122540777857,3.1421212856560685,3.7936396756134347,2.6680726281308655,2.5460611839812803,2.67024401591956,0.950869815171535,0.8354990986314994,1.5612095144815994,3.87191600605803,2.2967968626408948,3.8800049504570575,3.7145275740775876,2.7820240348634053,2.967509669711238,3.878495608939215]
  5. { 0 => {0:0.3528888549834846,1:0.23247265381638815,2:0.37089691552165555,3:0.31329328541990004,4:0.40475136611986895,5:0.32681652579527315,6:0.4866708964945021,7:0.4082139989941705,8:0.44700471063740943,9:0.4848417632093249,10:-0.27063575729405037,11:-0.19914627520724254,12:-0.18134870652375099,13:0.6174361431748079,14:0.5213041865071554,15:0.6706597762207017,16:0.6063109185325967,17:0.4342586837447659,18:0.3396933433206152,19:0.6471369199462024} }