# \[LiVE\] Quantile Regression Workflows (WL Live-Stream Series)

**URL:** <https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720>\
**Category:** Ideas\
**Tags:** data-science, economics, education, machine-learning, events-and-media, wolfram-repositories\
**Created:** [September 12, 2019, 1:32pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720 "2019-09-12T13:32:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [September 12, 2019, 1:32pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/1 "2019-09-12T13:32:15Z")

</div>

## The live-coding sessions

1. In the first  
[live-streaming / live-coding session](https://www.twitch.tv/wolfram/video/473572589)  
I demonstrated how to make  
[Quantile Regression](https://en.wikipedia.org/wiki/Quantile_regression)  
workflows using the [software monad `QRMon`](https://wolfram.discourse.group/t/12918/1)  
and some of the underlying software design principles. (Namely  
[“monadic programming”](https://wolfram.discourse.group/t/10731/1) .)

2. In the [follow up live-coding session](https://www.twitch.tv/videos/481009848) I discussed topics like outliers removal (data cleaning), anomaly detection, and [structural breaks](https://en.wikipedia.org/wiki/Structural_break).

3. In the [third live-coding session](https://www.twitch.tv/videos/485939037):

4. In the [fourth live-coding session](https://www.twitch.tv/videos/498468049) we discussed the following the topics.

5. In the final, [fifth live-coding session](https://www.twitch.tv/videos/511900723) different questions are going to be answered.

## Notebooks

- I did not save the notebook I made during the first live coding session, but I attached to this post a modified version of the notebook I used for a Meetup workshop 6-7 months ago. (See for more details  
[the GitHub MathematicaVsR project “Quantile Regression Workflows”](https://github.com/antononcube/MathematicaVsR/tree/master/Projects/QuantileRegressionWorkflows).)

- The notebook of the 2nd session is also attached. (I added a “References” section to it.)

## Resource function

Instead of the software monad `QRMon` used in the live-coding sessions the Wolfram Resource Function  
[`QuantileRegression`](https://resources.wolframcloud.com/FunctionRepository/resources/QuantileRegression)  
can be used. The resource page has many example applications that are also discussed in the live-coding sessions.

[QRMon-Live-coding-session-5th-session-LIVE.nb](https://community.wolfram.com/uploads/short-url/zjnWywrQ7SE8c0pWNpngOBRvUxH.nb) (1.34 MB)  
[QRMon-Live-coding-session-examples-2nd-session-LIVE.nb](https://community.wolfram.com/uploads/short-url/yFzWTjafpMdJBvoPv298LXO0v9k.nb) (1.01 MB)  
[QRMon-Live-coding-session-examples-3rd-session-LIVE.nb](https://community.wolfram.com/uploads/short-url/masD1NSDEgxTRDYhnQGurx0Amjq.nb) (9.55 MB)  
[QRMon-Live-coding-session-examples-4th-session-LIVE.nb](https://community.wolfram.com/uploads/short-url/vHhVW55QLL09rt8BoODrFeeKHJI.nb) (1.41 MB)

---

<div class="post-metadata">

**Author:** ![mohammadb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mohammadb/32/14729_2.png) [@mohammadb](https://community.wolfram.com/u/mohammadb)\
**Post date:** [September 13, 2019, 5:07pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/2 "2019-09-13T17:07:06Z")

</div>

Great job Anton! Looking forward to your future live-streams (next one will be today Sep 13 at 1:30pm PT, [Wolfram TwitchTV channel](https://www.twitch.tv/wolfram))

---

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [September 13, 2019, 9:44pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/3 "2019-09-13T21:44:28Z")

</div>

Just attached/uploaded the “live” notebook of the second session.

---

<div class="post-metadata">

**Author:** ![mohammadb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mohammadb/32/14729_2.png) [@mohammadb](https://community.wolfram.com/u/mohammadb)\
**Post date:** [September 24, 2019, 9:06pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/4 "2019-09-24T21:06:06Z")

</div>

Join for the 3rd session now: [Twitch](https://www.twitch.tv/wolfram)

---

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [September 25, 2019, 1:54pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/5 "2019-09-25T13:54:07Z")

</div>

Just added/attached the notebook of the 3rd live-coding session.

---

<div class="post-metadata">

**Author:** ![mohammadb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mohammadb/32/14729_2.png) [@mohammadb](https://community.wolfram.com/u/mohammadb)\
**Post date:** [October 21, 2019, 5:02pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/6 "2019-10-21T17:02:12Z")

</div>

Join us for the 4th session on Tuesday Oct. 22nd, 2pm PT ([Twitch](https://www.twitch.tv/wolfram))  
4th session: Quantile Regression workflow: additional topics.

- Predictions for today from yesterdays data.
- Conversational agent generated workflows.
- Application of NLP techniques to time series processed with QRMon.

---

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [October 26, 2019, 11:44am UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/7 "2019-10-26T11:44:13Z")

</div>

Just uploaded the notebook from the 4th live-coding session.

---

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [November 13, 2019, 1:16pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/8 "2019-11-13T13:16:39Z")

</div>

A few days ago the  
[Wolfram Function Repository](https://resources.wolframcloud.com/FunctionRepository/) entry [`QuantileRegression`] ([https://resources.wolframcloud.com/FunctionRepository/resources/QuantileRegression](https://resources.wolframcloud.com/FunctionRepository/resources/QuantileRegression))  
was approved.  
[The resource description page](https://resources.wolframcloud.com/FunctionRepository/resources/QuantileRegression) has many of the topics discussed in the live-coding sessions on Quantile regression.

Here is the code result of the neat examples section:

```
SeedRandom[20];
distData = Table[{x, Exp[-x^2] + RandomVariate[NormalDistribution[0, .15 \[Sqrt](Abs[1.5 - x]/1.5)]]}, {x, -3, 3, .01}];
Grid[Table[
  Block[{tempData = RandomSample[distData, 100], data, probs}, 
   data = Join[tempData, {#[[1]], -#[[2]]} & /@ tempData];
   data = SortBy[Transpose[Rescale /@ Transpose[data]], #[[1]] &];
   probs = {0.02, 0.48, 0.52, 0.98};
   qFuncs = 
    ResourceFunction["QuantileRegression"][data, 5, probs, Method -> {LinearProgramming, Method -> "InteriorPoint",Tolerance -> 10^(-2)}]; 
   ListPlot[Prepend[(Transpose[{data[[All, 1]], #1 /@ data[[All, 1]]}] &) /@ qFuncs, data], 
   Joined -> Prepend[Table[True, Length[probs]], False], 
    Filling -> Prepend[Table[(i + 1) -> {i + 2}, {i, Length[probs] - 1}], 1 -> None], Frame -> True, FrameTicks -> False, Axes -> False, 
    ImageSize -> Small, AspectRatio -> 1]], 3, 3]]

```

 ![QR-NeatExample.png](https://global.discourse-cdn.com/wolfram/original/3X/e/c/ecafc76fa48f4653331916dde52b6148a4886b94.png)

---

<div class="post-metadata">

**Author:** ![schandler](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/schandler/32/38011_2.png) [@schandler](https://community.wolfram.com/u/schandler)\
**Post date:** [November 13, 2019, 1:48pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/9 "2019-11-13T13:48:53Z")

</div>

Great work, Anton. Having the ResourceFunction available should help a lot of people.

---

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [November 13, 2019, 2:16pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/10 "2019-11-13T14:16:21Z")

</div>

Thank you, Seth! WFR is a great way to introduce new, user derived functions in the way, say, [CRAN](https://cran.r-project.org) does for R.

---

<div class="post-metadata">

**Author:** ![antononcube](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/antononcube/32/7348_2.png) [@antononcube](https://community.wolfram.com/u/antononcube)\
**Post date:** [November 23, 2019, 2:13am UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/11 "2019-11-23T02:13:55Z")

</div>

Just uploaded the notebook from the final, 5th live-coding session.

---

<div class="post-metadata">

**Author:** ![mohammadb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mohammadb/32/14729_2.png) [@mohammadb](https://community.wolfram.com/u/mohammadb)\
**Post date:** [November 26, 2019, 8:59pm UTC](https://community.wolfram.com/t/live-quantile-regression-workflows-wl-live-stream-series/14720/12 "2019-11-26T20:59:36Z")

</div>

[YouTube playlist of lectures](https://www.youtube.com/playlist?list=PLxn-kpJHbPx17-6A5-yi2IbDZ0R9dFNHS), so far
