Simplified Machine-Learning Workflow #4
Author
Anton Antonov
Title
Simplified Machine-Learning Workflow #4
Description
Quantile Regression (Part 4)
Category
Educational Materials
Keywords
URL
http://www.notebookarchive.org/2020-09-55rxcbg/
DOI
https://notebookarchive.org/2020-09-55rxcbg
Date Added
2020-09-11
Date Last Modified
2020-09-11
File Size
1.48 megabytes
Supplements
Rights
Redistribution rights reserved



QRMon live coding 4th session
QRMon live coding 4th session
Anton Antonov
MathematicaForPrediction at GitHub
MathematicaForPrediction at WordPress
October 2019
MathematicaForPrediction at GitHub
MathematicaForPrediction at WordPress
October 2019
Introduction
Introduction
1
.Review of previous sessions.
2
.ResourceFunction[“QuantileRegression”]
3
.Predict tomorrow from today’s data.
4
.Using NLP techniques on time series.
5
.Generation of QR workflows.
Load packages
Load packages
Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MonadicProgramming/MonadicQuantileRegression.m"]Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MonadicProgramming/MonadicStructuralBreaksFinder.m"]Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MonadicProgramming/MonadicAnomaliesFinder.m"]Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MonadicProgramming/GNNMon.m"]Import["https://raw.githubusercontent.com/antononcube/ConversationalAgents/master/Packages/WL/ExternalParsersHookup.m"]Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/TriesWithFrequencies.m"]Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/MosaicPlot.m"]
Data load
Data load
Review
Review
Tomorrow vs Yesterday
Tomorrow vs Yesterday
NLP techniques: sequential representation
NLP techniques: sequential representation
QRMon workflow commands generation
QRMon workflow commands generation
In[]:=
ToQRMonWLCommand["create from tsData;compute quantile regression with 12 knots and probabilities 0.01 and 0.98;show plot;compute and display outliers",False]
Out[]=
Hold[QRMonUnit[tsData]⟹QRMonQuantileRegression[Knots12,Probabilities{0.01,0.98}]⟹QRMonPlot[]⟹QRMonOutliersPlot[]]
In[]:=
QRMonUnit[tsData]⟹QRMonQuantileRegression["Knots"12,"Probabilities"{0.01`,0.98`}]⟹QRMonDateListPlot[]⟹QRMonOutliersPlot[DateListPlotTrue];
»
Plot:
|
»
Outliers plot:
In[]:=
qrObj3=ToQRMonWLCommand["create from finData2;delete missing;echo data summary; compute quantile regression with 60 knots and probabilities 0.5 and interpolation order 2; show date list plot; show absolute errors plot;find anomalies by the threshold 2;echo pipeline value;",True];
»
Data summary:
,
1 column 1 | ||||||||||||
|
2 column 2 | ||||||||||||
|
»
Plot:
|
»
Error plots:0.5
»
value:{{3.63761×,28.51},{3.67597×,29.32}}
9
10
9
10
In[]:=
QRMonUnit[finData2]⟹QRMonDeleteMissing[]⟹QRMonEchoDataSummary[]⟹QRMonQuantileRegression["Knots"60,"Probabilities"{0.5`},"InterpolationOrder"2]⟹QRMonPlot[]⟹QRMonErrorPlots["RelativeErrors"False]⟹QRMonFindAnomaliesByResiduals["Threshold"1.5]⟹QRMonEchoValue;
»
Data summary:
,
1 column 1 | ||||||||||||
|
2 column 2 | ||||||||||||
|
»
Plot:
|
»
Error plots:0.5
»
value:{{3.63761×,28.51},{3.64945×,23.27},{3.67597×,29.32},{3.72453×,18.929},{3.72462×,19.02},{3.7247×,18.76},{3.74682×,11.27},{3.74691×,11.39},{3.74708×,11.29}}
9
10
9
10
9
10
9
10
9
10
9
10
9
10
9
10
9
10


Cite this as: Anton Antonov, "Simplified Machine-Learning Workflow #4" from the Notebook Archive (2020), https://notebookarchive.org/2020-09-55rxcbg

Download

