20250606_minutes.txt 5.4 KB

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