|
| 1 | +# Sliding Window GroupBy Regression - Q&A Document |
| 2 | + |
| 3 | +**Status:** Living document |
| 4 | +**Last updated:** 2025-10-27 |
| 5 | +**Purpose:** Track complex concepts, design decisions, and review feedback |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Motivation - Iteration 1 (2025-10-27 07:00) |
| 10 | + |
| 11 | +Before answering the questions, I would like to describe in more detail what is being done and why. |
| 12 | + |
| 13 | +* 0.) We are trying not only to describe a multidimensional function but also to estimate statistical |
| 14 | + properties of the probability density function (PDF) itself (e.g. using quantiles). |
| 15 | +* 1.) LHC/my specific: We are working with both unbinned and binned data, as well as machine learning |
| 16 | + algorithms, depending on data availability. In the case of ALICE, we usually have a huge amount of data. |
| 17 | + For example, for tracks we have 500 kHz × 10 → 5 × 10^6 tracks per second, measuring for O(10–15 hours) per |
| 18 | + day. This data is either histogrammed in multidimensional histograms or, by default, we sample it using |
| 19 | + "balanced semi-stratified" sampling, populating the variables of interest homogeneously (e.g. flat pt, flat PID). |
| 20 | + This is very important as PDF of Pt and PID is highly unbalanced (exponential, power-law, etc). |
| 21 | + With this approach, we reduce the input data volume by an order of magnitude and enable iterative refinement |
| 22 | + of the PDF estimation. |
| 23 | +* 2.) Extracting PDF properties in multidimensional space has the advantage of enabling post-fitting of |
| 24 | + analytical models for normalised data. Quite often, we do not have analytical models for the full distortion |
| 25 | + in (3D+time), but we can have an analytical model for the delta distortion time evolution. |
| 26 | + In my current studies, for example, we are fitting a two- exponential phi-symmetric model of distortion |
| 27 | + due to common electric field modification. |
| 28 | + |
| 29 | +### Initial Questions (Iteration 1) |
| 30 | + |
| 31 | +**Q1:** Does this capture your motivation accurately? |
| 32 | +**A:** Several factors must be considered. Often we have large data but are limited by memory/CPU. Using >4GB in memory is problematic. Pre-sampling helps as original data is statistically highly unbalanced. The problem is not only sparsity - data is "random" and we need substantial statistics per bin. |
| 33 | + |
| 34 | +**Q2:** Should I emphasize more? |
| 35 | +**A:** Rewrite to emphasize statistical/mathematical considerations - PDF estimation and functional decomposition using partial models and factorization. Show ALICE examples. Software must be reusable. |
| 36 | + |
| 37 | +**Q3:** Tone - mathematical vs practical? |
| 38 | +**A:** Will ask GPT/Gemini. Some mathematics would be good but need balance. |
| 39 | + |
| 40 | +**Q4:** Missing key points? |
| 41 | +**A:** Emphasize statistical estimation problem. Motivation should be grounded in defined problems with ALICE examples. Highlight reusability and API design. Note: presented at forums but difficult to explain - people didn't understand statistical estimation, factorization, and usage in analytical model fitting with data renormalization. |
| 42 | + |
| 43 | +**Q5:** Add diagram? |
| 44 | +**A:** Yes, sparse 3D bins with ±1 neighborhood would help. |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Motivation - Iteration 2 (2025-10-27 09:00) |
| 49 | + |
| 50 | +### Additional Use Cases Added |
| 51 | + |
| 52 | +* Distortion maps (already in use) |
| 53 | +* Performance parameterization (e.g. track pT resolution as function of pT, eta, occupancy, time) |
| 54 | + * Track matching resolution and biases |
| 55 | + * V0 resolution and biases |
| 56 | + * PID resolution and biases |
| 57 | + * Efficiency maps |
| 58 | + * QA variables (chi2, number of clusters, etc.) |
| 59 | + * Usage in MC-to-Data remapping |
| 60 | +* Note: RootInteractive is only a small subproject for interactive visualisation of extracted data |
| 61 | + |
| 62 | +### Review Questions (Iteration 2) |
| 63 | + |
| 64 | +**Q1: Does Section 1 now accurately capture the key concepts?** |
| 65 | + |
| 66 | +*PDF estimation focus?* |
| 67 | +- More or less OK ✓ |
| 68 | + |
| 69 | +*Balanced sampling strategy?* |
| 70 | +- Mentioned but need more details |
| 71 | +- In some use cases we sample down by factor of 10³–10⁴ to obtain manageable data size |
| 72 | +- **Action:** Added range 10×-10⁴× with typical 10²-10³× in Section 1.3.1 ✓ |
| 73 | + |
| 74 | +*Factorization approach?* |
| 75 | +- Explained with TPC example |
| 76 | +- **Action:** Added note about temporal resolution (5-10 min maps vs O(s) for fluctuations) ✓ |
| 77 | + |
| 78 | +*Connection to RootInteractive?* |
| 79 | +- RootInteractive is just one subproject for interactive visualization |
| 80 | +- **Action:** Added clarification that sliding window is server-side preprocessing ✓ |
| 81 | + |
| 82 | +**Q2: Tone and depth** |
| 83 | + |
| 84 | +*Is mathematical level appropriate?* |
| 85 | +- Will ask GPT/Gemini for feedback → **See REVIEW_REQUEST_SECTION1.md** |
| 86 | + |
| 87 | +*Should I add equations?* |
| 88 | +- Yes, would enhance clarity |
| 89 | +- But ask GPT/Gemini first → **See REVIEW_REQUEST_SECTION1.md** |
| 90 | + |
| 91 | +*Is ALICE example clear?* |
| 92 | +- Need distortion map AND performance parameterization examples |
| 93 | +- **Action:** Added performance parameterization example in Section 1.1 ✓ |
| 94 | +- **Action:** Expanded use cases in Section 1.5 ✓ |
| 95 | + |
| 96 | +**Q3: Missing elements** |
| 97 | + |
| 98 | +*Key concepts still missed?* |
| 99 | +- Performance parameterization case added at beginning |
| 100 | +- Can mention in motivation categories and later in example sections |
| 101 | +- **Action:** Added to Section 1.1 and 1.5 ✓ |
| 102 | + |
| 103 | +**Q4: Structure** |
| 104 | + |
| 105 | +*Are subsections (1.1-1.5) logical?* |
| 106 | +- Structure OK for now |
| 107 | +- Will ask GPT/Gemini → **See REVIEW_REQUEST_SECTION1.md** |
| 108 | + |
| 109 | +**Q5: Next steps** |
| 110 | + |
| 111 | +*Send to GPT/Gemini or continue to Section 2?* |
| 112 | +- **Decision:** Need GPT/Gemini review BEFORE proceeding to Section 2 |
| 113 | +- **Action:** Created REVIEW_REQUEST_SECTION1.md with detailed questions ✓ |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | +## Status Summary |
| 118 | + |
| 119 | +**Section 1 - Motivation:** |
| 120 | +- Iteration 2 draft complete |
| 121 | +- Incorporates all user feedback from 2025-10-27 09:00 |
| 122 | +- Ready for external review |
| 123 | + |
| 124 | +**Next Steps:** |
| 125 | +1. Send to GPT-4 for review |
| 126 | +2. Send to Gemini for review |
| 127 | +3. Address critical issues from both reviewers |
| 128 | +4. Finalize Section 1 |
| 129 | +5. Proceed to Section 2 (Example Data) |
| 130 | + |
| 131 | +**Files:** |
| 132 | +- `SLIDING_WINDOW_SPEC_DRAFT.md` - Main specification document |
| 133 | +- `REVIEW_REQUEST_SECTION1.md` - Review questions for GPT/Gemini |
| 134 | +- `Q_A.md` - This file (Q&A tracking) |
| 135 | + |
| 136 | +--- |
| 137 | + |
| 138 | +## Active Questions for Next Iterations |
| 139 | + |
| 140 | +[None currently - awaiting GPT/Gemini feedback] |
| 141 | + |
| 142 | +--- |
| 143 | + |
| 144 | +## Design Decisions Log |
| 145 | + |
| 146 | +[To be populated during Section 6 discussion] |
| 147 | + |
| 148 | +--- |
| 149 | + |
| 150 | +## Archived Questions |
| 151 | + |
| 152 | +[To be populated as questions are resolved] |
0 commit comments