20250606_minutes.txt 5.6 KB

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