# 4.1 Modeling Note from Camila: I've been reading a lot of different literature (references at the end) and copying sentences or ideas i think they are useful to make our point. ## Probability Should we assume they know this or make a quick overview? ## Generative model - generative modeling: all the parameters are known and the mathematical theory allows us to work by deduction in a top-down fashion. - A generative model describes how a dataset is generated, in terms of a probabilistic model. By sampling from this model, we are able to generate new data. - Schema showing probability and parameters that produce data (don't mention learning from data here)![](https://i.imgur.com/gHMJgc6.png) - The idea behind a generative model is that we observe data that are generated by a latent (unseen) process, usually with some amount of randomness in the process. In fact, when we take a sample of data from a population and estimate a parameter from the sample, what we are doing in essence is trying to learn the value of a latent variable (the population mean) that gives rise through sampling to the observed data (the sample mean). ## Statistical modeling, learning - In many real situations, neither the generative model nor the parameters are known, and we will need to estimate them using the data we have collected. Statistical modeling works from the data upwards to a model that might plausibly explain the data - Models are approximations of the complex dynamics that drive the observable phenomena in the world around us. - Probable some ideas from the Observational process will fit here: https://betanalpha.github.io/assets/case_studies/modeling_and_inference.html#11_the_observational_process next you zoom out and don't show the insides of the model, instead you add the learning from data bit - Figure 2.1. ![](https://i.imgur.com/7S3pn4I.png) ## Bayesian + Frequentist compartmentalising the components means that we can isolate the bits that are different between Bayesian + Frequentist (i.e. how to interpret the parameters of the generative models). ## Discriminative modeling -Generative models can generate new data instances. Discriminative models discriminate between different kinds of data instances. - A Generative Model ‌learns the joint probability distribution p(x,y). It predicts the conditional probability with the help of Bayes Theorem. A Discriminative model ‌learns the conditional probability distribution p(y|x). Both of these models were generally used in supervised learning problems. - discriminative modeling is synonymous with supervised learning, or learning a function that maps an input to an output using a labeled dataset. Generative modeling is usually performed with an unlabeled dataset (that is, as a form of unsupervised learning), though it can also be applied to a labeled dataset to learn how to generate observations from each distinct class. ## Examples of generative and discriminative models Something from here: https://medium.com/@mlengineer/generative-and-discriminative-models-af5637a66a3 ## References - https://web.stanford.edu/class/bios221/book/Chap-Generative.html - https://www.oreilly.com/library/view/generative-deep-learning/9781492041931/ch01.html - http://ai.stanford.edu/~ang/papers/nips01-discriminativegenerative.pdf - https://web.stanford.edu/group/poldracklab/statsthinking21/fitting-models-to-data.html#what-is-a-model How do handle bayesian vs frequentist? - Clause Wilkie weaves it into the text in his sections on uncertainty. - Poldrack manages to cover it succinctly in he section []'What do probabilities mean?'](https://web.stanford.edu/group/poldracklab/statsthinking21/probability.html#what-do-probabilities-mean) - Separate as much as possible the components of a model from what those components mean. https://seeing-theory.brown.edu/basic-probability/index.html https://rpsychologist.com/d3/ci/ https://setosa.io/conditional/ placeholder images: ![](https://i.imgur.com/GQJCB33.png) ![](https://i.imgur.com/PQ6zYeY.png) ![](https://i.imgur.com/Atmz8hB.png) Camila simulation plots https://gitmilab.redclara.net/ciencia-datos-material/ejercicios-clase-13-datos/-/blob/master/Practica1_Probabilidad.ipynb