The document summarizes various sampling methods used in machine learning including Monte Carlo methods, Markov chain Monte Carlo, Gibbs sampling, slice sampling, and Hamiltonian Monte Carlo. The key points are:
1. Sampling methods like Monte Carlo and Markov chain Monte Carlo allow approximating expectations or probabilities that cannot be directly computed.
2. Markov chain Monte Carlo techniques like Metropolis-Hastings and Gibbs sampling generate dependent samples that converge to the desired distribution through Markov chain transitions.
3. Gibbs sampling is a special case of Metropolis-Hastings that directly samples from the conditional distributions to satisfy detailed balance.
4. Slice sampling restricts sampling to a region defined by a "slice" to efficiently explore the
MM - KBAC: Using mixed models to adjust for population structure in a rare-va...Golden Helix Inc
Confounding from population structure, extended families and inbreeding can be a significant issue for burden and kernel association tests on rare variants from next generation DNA sequencing. An obvious solution is to combine the power of a mixed model regression analysis with the ability to assess the rare variant burden using methods such as KBAC or CMC. Recent approaches have adjusted burden and kernel tests using linear regression models; this method adjusts for the relatedness of samples and includes that directly into a logistic regression model.
This webcast will focus on the details of bringing Mixed Model Regression and KBAC together, including: deriving an optimal logistic mixed model algorithm for calculating the reduced model score, how the kinship or random effects matrix should be specified, and how it all comes together into one algorithm. Results from applying the method to variants from the 1000 Genomes project will also be presented and compared to famSKAT.
What happens if measure the electron spin twice?Fausto Intilla
Abstract: The mainstream textbooks of quantum mechanics explains the quantum state collapses into an eigenstate in the measurement, while other explanations such as hidden variables and multiuniverse deny the collapsing. Here we propose an ideal thinking experiment on measuring the
spin of an electron with 3 steps. It is simple and straightforward, in short, to measure a spin-up electron in x-axis, and then in z-axis. Whether there is a collapsing predicts different results of the experiment. The future realistic experiment will show the quantum state collapses or not in the measurement.
Tutorial on Markov Random Fields (MRFs) for Computer Vision ApplicationsAnmol Dwivedi
The goal of this mini-project is to implement a pairwise binary label-observation Markov Random Field
model for bi-level image segmentation. Specifically, two inference algorithms, i.e., the Iterative
Conditional Mode (ICM) and Gibbs sampling methods will be implemented to perform image segmentation.
These are my note in the class of probabilistic analysis for the "average case" input. The look at:
1.- The use of the indicator function
2.- Enforcing the "Uniform Assumption"
At the end, we look at the application of the insertion sort average case.
This 10 hours class is intended to give students the basis to empirically solve statistical problems. Talk 1 serves as an introduction to the statistical software R, and presents how to calculate basic measures such as mean, variance, correlation and gini index. Talk 2 shows how the central limit theorem and the law of the large numbers work empirically. Talk 3 presents the point estimate, the confidence interval and the hypothesis test for the most important parameters. Talk 4 introduces to the linear regression model and Talk 5 to the bootstrap world. Talk 5 also presents an easy example of a markov chains.
All the talks are supported by script codes, in R language.
MM-KBAC – Using Mixed Models to Adjust for Population Structure in a Rare-var...Golden Helix Inc
Confounding from population structure, extended families and inbreeding can be a significant issue for burden and kernel association tests on rare variants from next generation DNA sequencing. An obvious solution is to combine the power of a mixed model regression analysis with the ability to assess the rare variant burden using methods such as KBAC or CMC. Recent approaches have adjusted burden and kernel tests using linear regression models; this method adjusts for the relatedness of samples and includes that directly into a logistic regression model.
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Subhajit Sahu
Abstract — Levelwise PageRank is an alternative method of PageRank computation which decomposes the input graph into a directed acyclic block-graph of strongly connected components, and processes them in topological order, one level at a time. This enables calculation for ranks in a distributed fashion without per-iteration communication, unlike the standard method where all vertices are processed in each iteration. It however comes with a precondition of the absence of dead ends in the input graph. Here, the native non-distributed performance of Levelwise PageRank was compared against Monolithic PageRank on a CPU as well as a GPU. To ensure a fair comparison, Monolithic PageRank was also performed on a graph where vertices were split by components. Results indicate that Levelwise PageRank is about as fast as Monolithic PageRank on the CPU, but quite a bit slower on the GPU. Slowdown on the GPU is likely caused by a large submission of small workloads, and expected to be non-issue when the computation is performed on massive graphs.
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...John Andrews
SlideShare Description for "Chatty Kathy - UNC Bootcamp Final Project Presentation"
Title: Chatty Kathy: Enhancing Physical Activity Among Older Adults
Description:
Discover how Chatty Kathy, an innovative project developed at the UNC Bootcamp, aims to tackle the challenge of low physical activity among older adults. Our AI-driven solution uses peer interaction to boost and sustain exercise levels, significantly improving health outcomes. This presentation covers our problem statement, the rationale behind Chatty Kathy, synthetic data and persona creation, model performance metrics, a visual demonstration of the project, and potential future developments. Join us for an insightful Q&A session to explore the potential of this groundbreaking project.
Project Team: Jay Requarth, Jana Avery, John Andrews, Dr. Dick Davis II, Nee Buntoum, Nam Yeongjin & Mat Nicholas
Show drafts
volume_up
Empowering the Data Analytics Ecosystem: A Laser Focus on Value
The data analytics ecosystem thrives when every component functions at its peak, unlocking the true potential of data. Here's a laser focus on key areas for an empowered ecosystem:
1. Democratize Access, Not Data:
Granular Access Controls: Provide users with self-service tools tailored to their specific needs, preventing data overload and misuse.
Data Catalogs: Implement robust data catalogs for easy discovery and understanding of available data sources.
2. Foster Collaboration with Clear Roles:
Data Mesh Architecture: Break down data silos by creating a distributed data ownership model with clear ownership and responsibilities.
Collaborative Workspaces: Utilize interactive platforms where data scientists, analysts, and domain experts can work seamlessly together.
3. Leverage Advanced Analytics Strategically:
AI-powered Automation: Automate repetitive tasks like data cleaning and feature engineering, freeing up data talent for higher-level analysis.
Right-Tool Selection: Strategically choose the most effective advanced analytics techniques (e.g., AI, ML) based on specific business problems.
4. Prioritize Data Quality with Automation:
Automated Data Validation: Implement automated data quality checks to identify and rectify errors at the source, minimizing downstream issues.
Data Lineage Tracking: Track the flow of data throughout the ecosystem, ensuring transparency and facilitating root cause analysis for errors.
5. Cultivate a Data-Driven Mindset:
Metrics-Driven Performance Management: Align KPIs and performance metrics with data-driven insights to ensure actionable decision making.
Data Storytelling Workshops: Equip stakeholders with the skills to translate complex data findings into compelling narratives that drive action.
Benefits of a Precise Ecosystem:
Sharpened Focus: Precise access and clear roles ensure everyone works with the most relevant data, maximizing efficiency.
Actionable Insights: Strategic analytics and automated quality checks lead to more reliable and actionable data insights.
Continuous Improvement: Data-driven performance management fosters a culture of learning and continuous improvement.
Sustainable Growth: Empowered by data, organizations can make informed decisions to drive sustainable growth and innovation.
By focusing on these precise actions, organizations can create an empowered data analytics ecosystem that delivers real value by driving data-driven decisions and maximizing the return on their data investment.
As Europe's leading economic powerhouse and the fourth-largest hashtag#economy globally, Germany stands at the forefront of innovation and industrial might. Renowned for its precision engineering and high-tech sectors, Germany's economic structure is heavily supported by a robust service industry, accounting for approximately 68% of its GDP. This economic clout and strategic geopolitical stance position Germany as a focal point in the global cyber threat landscape.
In the face of escalating global tensions, particularly those emanating from geopolitical disputes with nations like hashtag#Russia and hashtag#China, hashtag#Germany has witnessed a significant uptick in targeted cyber operations. Our analysis indicates a marked increase in hashtag#cyberattack sophistication aimed at critical infrastructure and key industrial sectors. These attacks range from ransomware campaigns to hashtag#AdvancedPersistentThreats (hashtag#APTs), threatening national security and business integrity.
🔑 Key findings include:
🔍 Increased frequency and complexity of cyber threats.
🔍 Escalation of state-sponsored and criminally motivated cyber operations.
🔍 Active dark web exchanges of malicious tools and tactics.
Our comprehensive report delves into these challenges, using a blend of open-source and proprietary data collection techniques. By monitoring activity on critical networks and analyzing attack patterns, our team provides a detailed overview of the threats facing German entities.
This report aims to equip stakeholders across public and private sectors with the knowledge to enhance their defensive strategies, reduce exposure to cyber risks, and reinforce Germany's resilience against cyber threats.
The affect of service quality and online reviews on customer loyalty in the E...
PRML Chapter 11
1. Chapter 11
Reviewer : Sunwoo Kim
Christopher M. Bishop
Pattern Recognition and Machine Learning
Yonsei University
Department of Applied Statistics
2. Chapter 11. Sampling Methods
2
What are we doing?
In this chapter, we are studying some approximation methods via sampling.
We know the weak law of large number(WLLN), which indicates, a sample mean converges in probability to the true expectation.
𝒙
𝒑
𝝁 = 𝑬[𝒙]
This means, if we have enough samples that were generated true distribution, we can estimate the desired expectation or probability!
For example, we are trying to evaluate the following expectation.
However, we cannot guarantee the independence of samples 𝑧(𝑙)
!
Thus, we are processing it under full-joint distribution. Consider general graphical model.
1st Sampling!
2nd Sampling!
2nd Sampling!
3rd Sampling!
We may sequentially sampling from its
ancestor. Thus this sampling strategy is
called an ‘ancestral sampling.’
3. Chapter 11.1. Basic Sampling Algorithms
3
Basic Monte Carlo
We have covered this strategy in theoretical statistics. This can be done by…
By uniform i.i.d. random sampling
𝑈~𝑢𝑛𝑖𝑓𝑜𝑟𝑚(0,1), and let 𝐹 be a continuous cumulative distribution function of 𝑥 (𝐹 𝑥 = 𝑃(𝑋 ≤ 𝑥))
Then, 𝑋 = 𝐹−1
𝑈 has distribution of 𝐹.
To implement this method, we need two assumptions.
1. We should be able to sample random uniform sample from [0, 1]. (This is not easy but can.)
2. We should be able to compute inverse CDF of 𝒙.
In fact, second condition is almost impossible.
Why? Because this means ‘we cannot compute integration but can compute inverse function.’
This is quite non-sense! So, we need alternate method!
Still, we can use this algorithm in computing value of 𝝅 and some other values!
𝒑 𝒚 = 𝝀 𝒆𝒙𝒑 −𝝀𝒚
𝒚 = −
𝟏
𝝀
𝒍𝒏(𝟏 − 𝒛)
If 𝑧 follows uniform, then 𝑦 follows
exponential distribution!
4. Chapter 11.1. Basic Sampling Algorithms
4
Rejection sampling
This is a process of finding samples with some rejection rule!
However, functional form of 𝑧 is pretty complicated, and we cannot directly compute some functional value of 𝑧.
Thus, we are approximating the overall procedure by using ‘proposal distribution’ 𝒒(𝒛).
Note that q(z) is a distribution which has a relatively simple functional form, and tractable! (e.g. Normal dist.)
1. Find a constant 𝑘 which can envelope target distribution 𝑝(𝑧).
2. Find a sample from distribution 𝑘𝑞(𝑧0)
3. Generate a random number 𝑢0 from uniform ( 0, 𝑘𝑞 𝑧0 )
4. If 𝑢0 < 𝑘𝑞(𝑧0), accept 𝑧0. O.W. Reject.
That is, we reject sample 𝑧0 if it lies in grey-shaded region.
Reason why this works is as following.
5. Chapter 11.1. Basic Sampling Algorithms
5
Importance sampling
This sampling directly computes expectation of a desired distribution.
Rewind a sampling method which we covered at the beginning.
However, as dimension is getting higher, computation of this formula is
growing exponentially. Thus, we need other method which makes this
computation possible for high-dimension!
Similarly, we use proposal distribution 𝑞(𝑧), and we are generating
samples 𝒛(𝒍)
from proposal distribution 𝒒(𝒛).
Here, importance weight 𝑟𝑙 =
𝑝 𝑧 𝑙
𝑞(𝑧(𝑙))
acts as the weight of each sample.
We can replace this equation by using some normalizing constant(𝑍𝑞).
6. Chapter 11.1. Basic Sampling Algorithms
6
Sampling and the EM algorithm
Sampling strategy is pretty important under Bayesian framework, but it also plays significant role in various computation!
Consider the 𝑀 − 𝑆𝑡𝑒𝑝 of EM algorithm. This is called a monte-carlo EM algorithm.
Here, we can generate samples of 𝑧 from posterior 𝑝(|𝑋, 𝜃𝑜𝑙𝑑
), and we can generate hard assignment of data to the specific clusters.
This can be implemented to the IP-algorithm, which can be used in data augmentation process.
7. Chapter 11.2. Markov Chain Monte Carlo
7
Markov Chain
** I’ve got help from https://kaist.edwith.org/machinelearning1_17
Before discussing MCMC, it is beneficial to review the idea of Markov chain.
We have covered basic concept of Markov chain in stochastic process, but its noteworthy to revise some important facts.
First, there is a transition probability which defines the probability of moving from one state to another.
There are some properties of Markov Chain.
1. Irreducible : We can move 𝑖 ↔ 𝑗 (We can move from here to there, there to here.)
2. Recurrent : We can get back to state 𝑗 after some transition loop.
3. Aperiodic : We are not moving in a certain circle (not rotating 𝑗 𝑝 𝑐 𝑗 𝑝 …)
A state which is recurrent and aperiodic is an ‘ergodic’ state.
With the help of these conditions, we can define ‘stationary distribution.’
‘If a Markov chain is irreducible and ergodic, we can define stationary distribution!’
If we are performing transition a lot of time, we can get into stationary distribution. That is,
𝝅𝑻 = 𝝅
Note that this is inverse of expected return time, and it is uniquely determined and is a
probability distribution.
8. Chapter 11.2. Markov Chain Monte Carlo
8
Markov Chain
So, we have covered some interesting characteristic of Markov chain. Now, we have to connect the basic idea of Markov chain to sampling
methodology. First, we are not throwing away previous samples. Instead, we are re-using it in the next sampling process.
Let’s look at the overall idea of MCMC. (I’ll write it in Korean)
1. 우리의 목표는 𝑝(𝑧)에서 sample을 생성하는 것임.
2. 근데 그것이 쉽지 않음. 그래서 Markov Chain의 idea를 빌려옴.
3. 𝑝(𝑧)를 stationary distribution인 𝜋라고 생각하고, 그 𝜋𝑖를 생성하는 transition probability인 𝑃𝑖𝑗를 추정하는 개념임.
4. 이는 꽤 합리적인 방법인 것이, 우리는 sample을 sequential하게 생성하기 때문에, 일종의 transition으로 생각할 수 있음.
5. 그리고 궁극적으로 그것은 우리가 추정하고자 하는 true-distribution인 𝑷로 수렴해야 목표를 달성하는 전체적인 process인 것이다!
Summary.
We are trying to generate sample from 𝑝 𝑧 ≈ 𝜋.
That is, we already know stationary probability
But it’s intractable, so we are approximating 𝑃𝑖𝑗 , and generate samples there.
After large amount of transition, sampling from 𝑷𝒊𝒋 will be similar to
that of from 𝝅𝒊.
9. Chapter 11.2. Markov Chain Monte Carlo
9
Metropolis-Hastings Algorithm
However, in order to get stationary probability, transition should satisfy balance equation!
That is, 𝝅𝒊𝑷𝒊,𝒋 = 𝝅𝒋𝑷𝒋,𝒊. Here, we are approximating P with proposal distribution 𝑞(𝑧∗
|𝑧𝑡
).
Setting is done. Here again we are accepting or rejecting samples according to acceptance probability 𝜶.
Current sample 𝑧𝑡
. Suggested sample 𝒛∗
1. Accept 𝑧𝑡+1
= 𝑧∗
2. Reject 𝑧𝑡+1
= 𝑧𝑡
Problem is, ‘When should we accept? When should we reject?’
To satisfy 𝝅𝒊𝑷𝒊𝒋 = 𝝅𝒋𝑷𝒋𝒊, 𝒒 𝒛𝒕
𝒛∗
𝒑 𝒛∗
= 𝒒 𝒛∗
𝒛𝒕
𝒑(𝒛𝒕
)
But this is not easy! So, we are continuously adjusting transition probability 𝒒(𝒛∗
|𝒛𝒕
)
1. If 𝑞 𝑧∗
𝑧𝑡
𝑝 𝑧𝑡
> 𝑞 𝑧𝑡
𝑧∗
𝑝(𝑧∗
), going from current state to next state (𝑧𝑡
𝑧∗
) is bigger. So, we should make it smaller.
2. If 𝑞 𝑧𝑡
𝑧∗
𝑝 𝑧∗
> 𝑞 𝑧∗
𝑧𝑡
𝑝(𝑧𝑡
), going from current state to next state (𝑧𝑡
𝑧∗
) is smaller. So, we should always accept!
Then here, consider weight 𝑟 𝑧∗
𝑧𝑡
=
𝑞 𝑧𝑡
𝑧∗
𝑝 𝑧∗
𝑞 𝑧∗
𝑧𝑡
𝑝 𝑧𝑡
. Ideal value is one. Thus, acceptance ratio will be
10. Chapter 11.2. Markov Chain Monte Carlo
10
Metropolis-Hastings Algorithm
Before moving on, let’s make a short summary!
1. We assume a desired distribution(to be sampled) as a stationary distribution.
2. To acquire 𝜋, we need our distribution to satisfy balance equation.
3. Balance equation is an equation which indicates 𝜋𝑖𝑃𝑖𝑗 = 𝜋𝑗𝑃
𝑗𝑖.
4. That means, probability of moving from here to there is equal to there to here!
5. This can be expressed by acceptance rate 𝛼,
6. Ideal condition of
𝑞 𝑧𝑡
𝑧∗
𝑝 𝑧∗
𝑞 𝑧∗
𝑧𝑡
𝑝 𝑧𝑡
is to be equal to 1.
7. Thus, we are trying to make this ratio as close to 1 by selecting appropriate sample at each iteration.
However, here again we face a problem of choosing a good approximation 𝑞(𝑧).
Gibbs-sampling suggests a good 𝑞(𝑧).
Why don’t we simply use 𝒑(𝒛∗
|𝒛𝒕
) itself?
11. Chapter 11.3. Gibbs Sampling
11
Ideation
Gibbs sampling is a MCMC sampling, which is a special case of a Metropolis-Hastings algorithm!
Overall mechanism is equal to that of MH. Only difference is we are not using approximate 𝑞𝑘, but 𝒑(𝒛𝒌
∗
|𝒛−𝒌)
Idea is simple. We are rotating again and again between various components.
Then, how can we guarantee aforementioned process achieves desired
samples from given distribution??
We can simply show that by suggesting 𝑝 𝑧𝑘 𝑧−𝑘 = 𝑞(𝑧∗
|𝑧𝑡).
Note that our goal was to obtain detailed-balance.
By setting 𝒒𝒌 𝒛∗
𝒛 = 𝒑(𝒛𝒌
∗
|𝒛𝒌), we can see this always satisfies
detailed balance condition!!
12. Chapter 11.4. Slice Sampling
12
Throwing away step-size
In this example, we are not considering step size. Rather, we are restricting the next-level(aespa) sampling!!
1. From a given sample z(τ)
, we sample 𝑢 uniformly from 0 ≤ 𝑢 ≤ 𝑝(𝑧(𝜏)
)
2. Define a ‘slice’, which is a horizontal line in the above distribution.
3. We generate new sample from this slice region. But in reality, we cannot easily know this.
4. Thus, we empirically decide it! Let region be 𝑤.
5. Estimate functional value at the end 𝑝 𝑧𝑚𝑎𝑥 &𝑝 𝑧𝑚𝑖𝑛 and finds whether it lies in or out of the region.
6. According to the functional value of end region, we extend or shrink the region 𝒘.
We iteratively extend and
shrink the sampling region
𝒘 according to the ‘slice’
13. Chapter 11.5. The Hybrid Monte Carlo Algorithm
13
Hamiltonian Monte Carlo
** I’ve studied overall algorithm in https://www.youtube.com/watch?v=a-wydhEuAm0
Note that Metropolis-Hasting was a random-surfing on the estimated distribution.
Just like gradient descent’s momentum and speed, let’s modify some characteristics of ‘surfing’.
It is a ‘Hamiltonian Monte Carlo(HMC)’
HMC is a sampling method which comes from physics. Let’s think of energy
Absorbing
energy
Emitting
energy
Many of the individuals stays under
less energy state. Thus, the proportion
of high energy decreases
exponentially! That is why we can
model energy function with 𝑒−𝐸(𝑥)
This idea can be applied to our probability
distribution! That is,
𝒑 𝒙 = 𝒆−𝑬(𝒙)
However, we do not use simple energy function.
Rather, we use joint function of potential energy
and kinetic energy. Thus, total energy can be
𝐸(𝑧) is a potential energy
𝐾(𝑟) is a kinetic energy
14. Chapter 11.5. The Hybrid Monte Carlo Algorithm
14
Hamiltonian Monte Carlo
Here, we can set potential energy to be negative log-posterior.
And for the kinetic, we can simply set
Please note that 𝐻 𝑧, 𝑟 = 𝑐𝑜𝑛𝑠𝑡. I couldn’t understand the explanation why this value is
almost fixed. Anyone understood..?
Thus, overall estimation can be…
𝐸 𝑧 = − log 𝑝(𝑧),
here, 𝑝(𝑧) is our desired distribution!
We can iteratively get samples by generating 𝑟, then 𝑧, again and again.
Note that 𝑟 and 𝑧 are independent in their functional form.
Generating 𝑟 is relatively simple since 𝑝(𝑟|𝑧) is a standard normal!
𝒆
𝟏
𝟐
∑𝒓𝒊
~𝑵(𝟎, 𝟏)
Obviously, straight sampling from 𝑝(𝑧, 𝑟) is impossible. Why? Because if its possible, we would not get help of 𝒓!
Thus, we use leapfrog discretization, which is an approximation of this sampling.
Here, we alternatively choose 𝑧 and 𝑟.
Interesting thing is, we move ‘a half-way’ further.
15. Chapter 11.5. The Hybrid Monte Carlo Algorithm
15
Leapfrog algorithm
That is, we are getting help of the ‘momentum!’
This approximation is tractable since calculating gradient is not that hard task!
𝜖 here work as a step size movement in the algorithm(hyper-param)
We can think of this movement intuitively with right figure.
(Figure from previous Youtube-link!)
This helps us to stay within the high-region!