20250606_minutes.txt 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. Date: 8.june 2025
  2. Meeting with Zahra
  3. Dates:
  4. 28.6 - Meeting about results and Presentation
  5. 30.6. - Zahra has presentation
  6. 04.7 - Meeting about Bayesian Model
  7. 11.07- Meeting on Zoom about distributions
  8. 23.07- Meeting in Person, Zahra and Katja
  9. 5.08- Meeting on zoom
  10. 12.8- Meeting in Person
  11. 15.08- Meeting on Zoom
  12. 18.8- Meeting on Zoom
  13. 26.8- Meeting in Person
  14. 05/09-Meeting in Person
  15. 14/09-17/09: Meetin on Zoon
  16. 21/09-Meeting on Zoom
  17. 26/09-Meetin in Person
  18. Asking about accuracy measures:
  19. * for fit we have goodness of fit measures:
  20. - log likelihood
  21. - AIC and BIC
  22. * these models used for classification: [1]
  23. - pred Y = [ Y : f(x|Y) > 0.5 === decision function(x) > 0
  24. [ !Y : otherwise
  25. - in logit models: [2] Speech and Language Processing, Ch 5
  26. decision_function(x) = b + w^T x == logit (x)
  27. logit == log odds
  28. logit(x) = 1/(1 + exp(-decision_function(x))
  29. - ACC == accuracy score [3]
  30. accuracy(y, \hat{y}) = 1/n \sum_{i=0}^{n-1} delta_{\hat{y}_i, y_i}
  31. - AUC == area under curve ???? [4,5]
  32. From [6]:
  33. fpr, tpr, thresholds = ROC = function(y_true, y_score)
  34. We are systematically doing
  35. pred Y[i] = [ 1 : y_score[i] >= threshold
  36. [ 0 : otherwise
  37. all i
  38. and comparing with
  39. y_true[i] all i
  40. for all meaningful thresholds == y_score
  41. Target scores, can either be probability estimates of the positive class,
  42. confidence values, or non-thresholded measure of decisions (as returned by
  43. “decision_function” on some classifiers). For decision_function scores,
  44. values greater than or equal to zero should indicate the positive class.
  45. In our case y_score = prob estimate(for Y=1) as given by the model
  46. Ref:
  47. - [1] https://realpython.com/logistic-regression-python/
  48. - [2] https://web.stanford.edu/~jurafsky/slp3/5.pdf
  49. - https://en.wikipedia.org/wiki/Logistic_regression
  50. - [3] https://scikit-learn.org/stable/modules/model_evaluation.html#accuracy-score
  51. - [4] https://scikit-learn.org/stable/modules/model_evaluation.html#roc-metrics
  52. - [5] https://en.wikipedia.org/wiki/Receiver_operating_characteristic
  53. - [6] https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html
  54. - https://stats.stackexchange.com/questions/354709/sklearn-metrics-accuracy-score-vs-logisticregression-score
  55. - https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_curve.html
  56. - https://scikit-learn.org/stable/modules/model_evaluation.html#roc-metrics
  57. - https://en.wikipedia.org/wiki/Method_of_moments_(statistics)
  58. - https://en.wikipedia.org/wiki/Maximum_a_posteriori_estimation
  59. - https://en.wikipedia.org/wiki/Limited-memory_BFGS
  60. Plan:
  61. * Make notes overleaf file (ZA)
  62. - notes will the basis for the paper and presentations
  63. * Transfer as much text and results to notes (ZA)
  64. * Test calc. with bayesian model (MH)
  65. * Chat about progress at the picnic
  66. Ideal:
  67. * Have some preliminary results for bayesian model until Friday
  68. -----------------------------------------------------------------------------------
  69. PIPELINE
  70. # condprob_flowchart.py
  71. def print_flowchart():
  72. print("\n" + "="*45)
  73. print(" Conditional Probability Modeling Flowchart")
  74. print("="*45 + "\n")
  75. print(" ┌────────────────────────────┐")
  76. print(" │ Define the Modeling Goal │")
  77. print(" └────────────┬──────────────┘")
  78. print(" │")
  79. print(" ┌────────────▼──────────────┐")
  80. print(" │ Choose Meaningful Model │")
  81. print(" │ and Set Assumptions │")
  82. print(" └────────────┬──────────────┘")
  83. print(" │")
  84. print(" ┌────────────▼──────────────┐")
  85. print(" │ Fit Model to Data │")
  86. print(" └────────────┬──────────────┘")
  87. print(" │")
  88. print(" ┌────────────▼──────────────┐")
  89. print(" │ Evaluate Model & Loss │")
  90. print(" └────────────┬──────────────┘")
  91. print(" │")
  92. print(" ┌────────────▼──────────────┐")
  93. print(" │ Quantify Uncertainty (UQ) │")
  94. print(" └────────────┬──────────────┘")
  95. print(" │")
  96. print(" ┌────────────▼──────────────┐")
  97. print(" │ Interpret Results & UQ │")
  98. print(" └────────────┬──────────────┘")
  99. print(" │")
  100. print(" ┌────────────▼──────────────┐")
  101. print(" │ Apply in Decision Context │")
  102. print(" └────────────────────────────┘\n")
  103. print(" ✔ Each block corresponds to one function or module")
  104. print(" ✔ Update each step with your methods and data later")
  105. print(" ✔ Plug in visual tools or UQ techniques where needed")
  106. if __name__ == "__main__":
  107. print_flowchart()