20250606_minutes.txt 5.3 KB

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