A review of one of the most popular methods of clustering, a part of what is know as unsupervised learning, K-Means. Here, we go from the basic heuristic used to solve the NP-Hard problem to an approximation algorithm K-Centers. Additionally, we look at variations coming from the Fuzzy Set ideas. In the future, we will add more about On-Line algorithms in the line of Stochastic Gradient Ideas...
A gentle introduction to 2 classification techniques, as presented by Kriti Puniyani to the NYC Predictive Analytics group (April 14, 2011). To download the file please go here: http://www.meetup.com/NYC-Predictive-Analytics/files/
A review of one of the most popular methods of clustering, a part of what is know as unsupervised learning, K-Means. Here, we go from the basic heuristic used to solve the NP-Hard problem to an approximation algorithm K-Centers. Additionally, we look at variations coming from the Fuzzy Set ideas. In the future, we will add more about On-Line algorithms in the line of Stochastic Gradient Ideas...
A gentle introduction to 2 classification techniques, as presented by Kriti Puniyani to the NYC Predictive Analytics group (April 14, 2011). To download the file please go here: http://www.meetup.com/NYC-Predictive-Analytics/files/
Sequential quasi-Monte Carlo (SQMC) is a quasi-Monte Carlo (QMC) version of sequential Monte Carlo (or particle filtering), a popular class of Monte Carlo techniques used to carry out inference in state space models. In this talk I will first review the SQMC methodology as well as some theoretical results. Although SQMC converges faster than the usual Monte Carlo error rate its performance deteriorates quickly as the dimension of the hidden variable increases. However, I will show with an example that SQMC may perform well for some "high" dimensional problems. I will conclude this talk with some open problems and potential applications of SQMC in complicated settings.
We will describe and analyze accurate and efficient numerical algorithms to interpolate and approximate the integral of multivariate functions. The algorithms can be applied when we are given the function values at an arbitrary positioned, and usually small, existing sparse set of function values (samples), and additional samples are impossible, or difficult (e.g. expensive) to obtain. The methods are based on local, and global, tensor-product sparse quasi-interpolation methods that are exact for a class of sparse multivariate orthogonal polynomials.
A fundamental numerical problem in many sciences is to compute integrals. These integrals can often be expressed as expectations and then approximated by sampling methods. Monte Carlo sampling is very competitive in high dimensions, but has a slow rate of convergence. One reason for this slowness is that the MC points form clusters and gaps. Quasi-Monte Carlo methods greatly reduce such clusters and gaps, and under modest smoothness demands on the integrand they can greatly improve accuracy. This can even take place in problems of surprisingly high dimension. This talk will introduce the basics of QMC and randomized QMC. It will include discrepancy and the Koksma-Hlawka inequality, some digital constructions and some randomized QMC methods that allow error estimation and sometimes bring improved accuracy.
Probabilistic Matrix Factorization (PMF)
Bayesian Probabilistic Matrix Factorization (BPMF) using
Markov Chain Monte Carlo (MCMC)
BPMF using MCMC – Overall Model
BPMF using MCMC – Gibbs Sampling
MVPA with SpaceNet: sparse structured priorsElvis DOHMATOB
The GraphNet (aka S-Lasso), as well as other “sparsity + structure” priors like TV (Total-Variation), TV-L1, etc., are not easily applicable to brain data because of technical problems
relating to the selection of the regularization parameters. Also, in
their own right, such models lead to challenging high-dimensional optimization problems. In this manuscript, we present some heuristics for speeding up the overall optimization process: (a) Early-stopping, whereby one halts the optimization process when the test score (performance on leftout data) for the internal cross-validation for model-selection stops improving, and (b) univariate feature-screening, whereby irrelevant (non-predictive) voxels are detected and eliminated before the optimization problem is entered, thus reducing the size of the problem. Empirical results with GraphNet on real MRI (Magnetic Resonance Imaging) datasets indicate that these heuristics are a win-win strategy, as they add speed without sacrificing the quality of the predictions. We expect the proposed heuristics to work on other models like TV-L1, etc.
One of the central tasks in computational mathematics and statistics is to accurately approximate unknown target functions. This is typically done with the help of data — samples of the unknown functions. The emergence of Big Data presents both opportunities and challenges. On one hand, big data introduces more information about the unknowns and, in principle, allows us to create more accurate models. On the other hand, data storage and processing become highly challenging. In this talk, we present a set of sequential algorithms for function approximation in high dimensions with large data sets. The algorithms are of iterative nature and involve only vector operations. They use one data sample at each step and can handle dynamic/stream data. We present both the numerical algorithms, which are easy to implement, as well as rigorous analysis for their theoretical foundation.
Multidimensional integrals may be approximated by weighted averages of integrand values. Quasi-Monte Carlo (QMC) methods are more accurate than simple Monte Carlo methods because they carefully choose where to evaluate the integrand. This tutorial focuses on how quickly QMC methods converge to the correct answer as the number of integrand values increases. The answer may depend on the smoothness of the integrand and the sophistication of the QMC method. QMC error analysis may assumes the integrand belongs to a reproducing kernel Hilbert space or may assume that the integrand is an instance of a stochastic process with known covariance structure. These two approaches have interesting parallels. This tutorial also explores how the computational cost of achieving a good approximation to the integral depends on the dimension of the domain of the integrand. Finally, this tutorial explores methods for determining how many integrand values are needed to satisfy the error tolerance. Relevant software is described.
In this tutorial I will provide a survey of recent research efforts on the application of QMC methods to PDEs with random coefficients. Such PDE problems occur in the area of uncertainty quantification. A prime example is the flow of water through a disordered porous medium. There is a huge body of literature on this topic using a variety of methods. QMC methods are relatively new to this application area. The aim of this tutorial is to provide an entry point for QMC experts wanting to start research in this direction, for PDE analysts and practitioners wanting to tap into contemporary QMC theory and methods, and for anyone else who sees how to cross-fertilize the ideas to other application areas.
Sequential quasi-Monte Carlo (SQMC) is a quasi-Monte Carlo (QMC) version of sequential Monte Carlo (or particle filtering), a popular class of Monte Carlo techniques used to carry out inference in state space models. In this talk I will first review the SQMC methodology as well as some theoretical results. Although SQMC converges faster than the usual Monte Carlo error rate its performance deteriorates quickly as the dimension of the hidden variable increases. However, I will show with an example that SQMC may perform well for some "high" dimensional problems. I will conclude this talk with some open problems and potential applications of SQMC in complicated settings.
We will describe and analyze accurate and efficient numerical algorithms to interpolate and approximate the integral of multivariate functions. The algorithms can be applied when we are given the function values at an arbitrary positioned, and usually small, existing sparse set of function values (samples), and additional samples are impossible, or difficult (e.g. expensive) to obtain. The methods are based on local, and global, tensor-product sparse quasi-interpolation methods that are exact for a class of sparse multivariate orthogonal polynomials.
A fundamental numerical problem in many sciences is to compute integrals. These integrals can often be expressed as expectations and then approximated by sampling methods. Monte Carlo sampling is very competitive in high dimensions, but has a slow rate of convergence. One reason for this slowness is that the MC points form clusters and gaps. Quasi-Monte Carlo methods greatly reduce such clusters and gaps, and under modest smoothness demands on the integrand they can greatly improve accuracy. This can even take place in problems of surprisingly high dimension. This talk will introduce the basics of QMC and randomized QMC. It will include discrepancy and the Koksma-Hlawka inequality, some digital constructions and some randomized QMC methods that allow error estimation and sometimes bring improved accuracy.
Probabilistic Matrix Factorization (PMF)
Bayesian Probabilistic Matrix Factorization (BPMF) using
Markov Chain Monte Carlo (MCMC)
BPMF using MCMC – Overall Model
BPMF using MCMC – Gibbs Sampling
MVPA with SpaceNet: sparse structured priorsElvis DOHMATOB
The GraphNet (aka S-Lasso), as well as other “sparsity + structure” priors like TV (Total-Variation), TV-L1, etc., are not easily applicable to brain data because of technical problems
relating to the selection of the regularization parameters. Also, in
their own right, such models lead to challenging high-dimensional optimization problems. In this manuscript, we present some heuristics for speeding up the overall optimization process: (a) Early-stopping, whereby one halts the optimization process when the test score (performance on leftout data) for the internal cross-validation for model-selection stops improving, and (b) univariate feature-screening, whereby irrelevant (non-predictive) voxels are detected and eliminated before the optimization problem is entered, thus reducing the size of the problem. Empirical results with GraphNet on real MRI (Magnetic Resonance Imaging) datasets indicate that these heuristics are a win-win strategy, as they add speed without sacrificing the quality of the predictions. We expect the proposed heuristics to work on other models like TV-L1, etc.
One of the central tasks in computational mathematics and statistics is to accurately approximate unknown target functions. This is typically done with the help of data — samples of the unknown functions. The emergence of Big Data presents both opportunities and challenges. On one hand, big data introduces more information about the unknowns and, in principle, allows us to create more accurate models. On the other hand, data storage and processing become highly challenging. In this talk, we present a set of sequential algorithms for function approximation in high dimensions with large data sets. The algorithms are of iterative nature and involve only vector operations. They use one data sample at each step and can handle dynamic/stream data. We present both the numerical algorithms, which are easy to implement, as well as rigorous analysis for their theoretical foundation.
Multidimensional integrals may be approximated by weighted averages of integrand values. Quasi-Monte Carlo (QMC) methods are more accurate than simple Monte Carlo methods because they carefully choose where to evaluate the integrand. This tutorial focuses on how quickly QMC methods converge to the correct answer as the number of integrand values increases. The answer may depend on the smoothness of the integrand and the sophistication of the QMC method. QMC error analysis may assumes the integrand belongs to a reproducing kernel Hilbert space or may assume that the integrand is an instance of a stochastic process with known covariance structure. These two approaches have interesting parallels. This tutorial also explores how the computational cost of achieving a good approximation to the integral depends on the dimension of the domain of the integrand. Finally, this tutorial explores methods for determining how many integrand values are needed to satisfy the error tolerance. Relevant software is described.
In this tutorial I will provide a survey of recent research efforts on the application of QMC methods to PDEs with random coefficients. Such PDE problems occur in the area of uncertainty quantification. A prime example is the flow of water through a disordered porous medium. There is a huge body of literature on this topic using a variety of methods. QMC methods are relatively new to this application area. The aim of this tutorial is to provide an entry point for QMC experts wanting to start research in this direction, for PDE analysts and practitioners wanting to tap into contemporary QMC theory and methods, and for anyone else who sees how to cross-fertilize the ideas to other application areas.
Cuckoo Search Algorithm: An IntroductionXin-She Yang
This presentation explains the fundamental ideas of the standard Cuckoo Search (CS) algorithm, which also contains the links to the free Matlab codes at Mathswork file exchanges and the animations of numerical simulations (video at Youtube). An example of multi-objective cuckoo search (MOCS) is also given with link to the Matlab code.
Here are my slides for my preparation class for possible students in the Master in Electrical Engineering and Computer Science (Specialization in Computer Science)... for the entrance examination here at Cinvestav GDL.
Corisco is a method for monocular camera orientation estimation in anthropic environments using edgels. This is my doctorate defense presentation, updated and translated to english.
Characterization of Subsurface Heterogeneity: Integration of Soft and Hard In...Amro Elfeki
Park, E., Elfeki, A. M. M., Dekking, F.M. (2003). Characterization of subsurface heterogeneity: Integration of soft and hard information using multi-dimensional Coupled Markov chain approach. Underground Injection Science and Technology Symposium, Lawrence Berkeley National Lab., October 22-25, 2003. p.49. Eds. Tsang, Chin.-Fu and Apps, John A.
http://www.lbl.gov/Conferences/UIST/index.html#topics
BackTracking Algorithm: Technique and ExamplesFahim Ferdous
This slides gives a strong overview of backtracking algorithm. How it came and general approaches of the techniques. Also some well-known problem and solution of backtracking algorithm.
Senior data scientist and founder of the company Intelligentia Data I+D SA de CV. We are offering consultancy services, development of projects and products in Machine Learning, Big Data, Data Sciences and Artificial Intelligence.
My first set of slides (The NN and DL class I am preparing for the fall)... I included the problem of Vanishing Gradient and the need to have ReLu (Mentioning btw the saturation problem inherited from Hebbian Learning)
It has been almost 62 years since the invention of the term Artificial Intelligence by Samuel and Minsky et al. at the Dartmouth workshop College in 1956 (“Dartmouth Summer Research Project on Artificial Intelligence”) where this new area of Computer Science was invented. However, the history of Artificial Intelligence goes back to previous millennia, when the Greeks in their Myths spoke about golden robots at Hephaestus, and the Galatea of Pygmalion. They were the first automatons known at the dawn of history, and although these first attempts were only myths, automatons were invented and built through multiple civilizations in history. Nevertheless, these automatons resembled in quite limited way their final objectives, representing animals and humans. In spite of that, the greatest illusion of an automaton, the Turk by Wolfgang von Kempelen, inspired many people, trough its exhibitions, as Alexander Graham Bell and Charles Babbage to develop inventions that would change forever human history. Thus, the importance of the concept “Artificial Intelligence” as a driver of our technological dreams. And although Artificial Intelligence has never been defined in a precise practical way, the amount of research and methods that have been developed to tackle some of its basics tasks have been and are quite humongous. Thus, the importance of having an introduction to the concepts of Artificial Intelligence, thus the dream can continue.
Here a Review of the Combination of Machine Learning models from Bayesian Averaging, Committees to Boosting... Specifically An statistical analysis of Boosting is done
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSEDuvanRamosGarzon1
AIRCRAFT GENERAL
The Single Aisle is the most advanced family aircraft in service today, with fly-by-wire flight controls.
The A318, A319, A320 and A321 are twin-engine subsonic medium range aircraft.
The family offers a choice of engines
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Automobile Management System Project Report.pdfKamal Acharya
The proposed project is developed to manage the automobile in the automobile dealer company. The main module in this project is login, automobile management, customer management, sales, complaints and reports. The first module is the login. The automobile showroom owner should login to the project for usage. The username and password are verified and if it is correct, next form opens. If the username and password are not correct, it shows the error message.
When a customer search for a automobile, if the automobile is available, they will be taken to a page that shows the details of the automobile including automobile name, automobile ID, quantity, price etc. “Automobile Management System” is useful for maintaining automobiles, customers effectively and hence helps for establishing good relation between customer and automobile organization. It contains various customized modules for effectively maintaining automobiles and stock information accurately and safely.
When the automobile is sold to the customer, stock will be reduced automatically. When a new purchase is made, stock will be increased automatically. While selecting automobiles for sale, the proposed software will automatically check for total number of available stock of that particular item, if the total stock of that particular item is less than 5, software will notify the user to purchase the particular item.
Also when the user tries to sale items which are not in stock, the system will prompt the user that the stock is not enough. Customers of this system can search for a automobile; can purchase a automobile easily by selecting fast. On the other hand the stock of automobiles can be maintained perfectly by the automobile shop manager overcoming the drawbacks of existing system.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
1. Markov Chain Monte Carlo Methods
Applications in Machine Learning
Andres Mendez-Vazquez
June 1, 2017
1 / 61
2. Images/cinvestav-
Outline
1 Introduction
The Main Reason
Examples of Application
Basically
2 The Monte Carlo Method
FERMIAC and ENIAC Computers
Immediate Applications
3 Markov Chains
Introduction
Enters Perron-Frobenious Theorem
Enter Google’s Page Rank
4 Markov Chain Monte Carlo Methods
Combining the Power of the two Methods
5 Metropolis Hastings
Introduction
A General Idea
Applications in Machine Learning
6 The Gibbs Sampler
Introduction
The Simplest Algorithm
Applications in Machine Learning
2 / 61
3. Images/cinvestav-
Chance
There are many phenomenas that introduce chance in their models
Therefore
Why not use SAMPLING to understand those
phenomenas?
4 / 61
4. Images/cinvestav-
Thus
Markov Chain Monte Carlo (MCMC) Methods
Algorithms that use Markov Chains to achieve samples of a target
phenomena!!!
Thus
They are computer based simulations able to obtain samples of π (x).
5 / 61
5. Images/cinvestav-
The Reason
There are several high dimensional problems
For Example, computing the volume of a convex body in d dimensions.
It is the only known general approach for providing a solution within a
reasonable time, O dk .
Therefore
MCMC plays significant role in statistics, econometrics, physics and
computing science.
6 / 61
8. Images/cinvestav-
What do we want?
Given a probability distribution of interest
π (x) , x ∈ RN
Which has the following structure
π (x) =
1
Z
h (x)
where h (x) is a PDF and Z is a unknown normalization constant.
Thus,
We want to understand such distribution!!!
11 / 61
9. Images/cinvestav-
The beginning of Monte Carlo Methods
1945 two events change the world forever
The successful nuclear test at Alamogordo.
The building of the first electronic computer, ENIAC.
Pushed for the creation of the Monte Carlo Methods
Original idea came from Stan Ulman... He loved relaxing by playing
poker and solitary!!!
Stan had an uncle who borrowed money from relatives because he
“just had to go to Monte Carlo.”
13 / 61
10. Images/cinvestav-
Together with Von Neumann
The Guy Behind the Minimax Algorithm
They started to develop an idea to trace the path of neutrons in a
spherical reactor.
14 / 61
11. Images/cinvestav-
Thus
We have then
At each stage a sequence of decisions has to be made based on statistical
probabilities appropriate to the physical and geometric factors.
For this, we only need a source of uniform random numbers!!!
Because it is possible to use the inverse of the cumulative of the target
function to obtain the necessary samples!!!
15 / 61
13. Images/cinvestav-
However
Once the ENIAC went on-line again
It took two months to have the basic controls for the Monte-Carlo
One fortnight for the last phases of the implementation.
Then, the tests were ran
And Monte Carlo was born!!!
17 / 61
15. Images/cinvestav-
Monte Carlo Integration
We can get integral of complex functions
I =
Ω
sin ln (x + y + 1)dxdy
Where Ω is a disk with
(x, y) | x −
1
2
2
+ y −
1
2
2
≤
1
4
We only need a source of randomly uniform points at that area
I ≈ Volume of Ω × Average Value of f in Ω
20 / 61
16. Images/cinvestav-
Getting the First Moment!!!
The goal is to compute the following expectation
E [f] = f (z) p (z) dz
Solution
Obtain a set of samples z(i) where i = 1, ..., N drawn independently from
p(z)
Approximate the expectation as
E [f] ≈ E [f] =
1
N
N
i=1
f z(i)
21 / 61
17. Images/cinvestav-
Clustering Using Stochastic Process
We use the following process
Imagine a Chinese restaurant with an infinite number of circular tables, each with
infinite capacity!!!
Customer ONE sits at the first table
The next customer either sits at the same table as customer ONE
Or the next table
Something like this
22 / 61
18. Images/cinvestav-
Thus, it is possible to build and entire Random Process
Simply Asking
p (customer i assigned to table j|D, α) =
f (dij) if j = i
α if i = j
Where
D is the distance between customers
with a similarity dij = d (ci, cj)
Let see the code
There we have a series of nice ideas.
23 / 61
19. Images/cinvestav-
Markov Chains
The random process Xt ∈ S for t = 1, 2, ..., T has a Markov property
If and only if
p (XT |XT−1, XT−2, ..., X1) = p (XT |XT−1)
Finite-State Discrete Time Markov Chains
It can be completely specified by the transition matrix.
P = [pij] with pij = P [Xt = j|Xt−1 = i]
25 / 61
21. Images/cinvestav-
What kind of Markov Chain do we like to study?
Ergodic
A Markov chain is called an ergodic chain if it is possible to go from every
state to every state (not necessarily in one move).
Aperiodic
A state i has period k if any return to state i must occur in multiples of k
time steps.
k = gcd {n > 0|P (Xn = i|X0 = i) > 0}
27 / 61
22. Images/cinvestav-
Therefore
Thus
If k = 1, then the state is said to be aperiodic.
Otherwise (k > 1), the state is said to be periodic with period k.
A Markov chain is aperiodic if every state is aperiodic
28 / 61
24. Images/cinvestav-
This and other theorems allows to calculate something
quite interesting
Using the Power method
The method is described by the recurrence relation
w(i+1)
=
Tw(i)
Tw(i)
where Tw(i) =
√
w(i)tTtTw(i)
Then
The sub-sequence {wki
}∞
i=1 converges to an eigenvector associated with
the dominant eigenvalue.
31 / 61
25. Images/cinvestav-
Long Ago in a Long Forgotten Land
Dozens of Companies fought for the Search Landscape
American On-Line
Netscape
Yahoo
Infoseek
Lycos
Altavista
33 / 61
27. Images/cinvestav-
Enters Larry Paige and Sergey Brin (Circa 1996)
They Invented the Google Matrix (A Misspelling of Googol = 10100
)
G = αS + (1 − α) 1v
Where
S is a modified version of an adjacency matrix by converting the
number of links into a probability
35 / 61
28. Images/cinvestav-
In addition
Also
1 is the Column Vector of ones.
v is a row vector of probabilities
v =
1
n
,
1
n
, ...,
1
n
(At the initial experiments)
The Matrix n × n, (1 − α) 1v
(1 − α) 1
n (1 − α) 1
n · · · (1 − α) 1
n
(1 − α) 1
n (1 − α) 1
n · · · (1 − α) 1
n
...
... ... ...
(1 − α) 1
n (1 − α) 1
n · · · (1 − α) 1
n
36 / 61
29. Images/cinvestav-
The Dampening Factor
Finally α
In the Google matrix indicates that Random Web surfers move to a
different web-page by some means other than selecting a link with
probability 1 − α
37 / 61
32. Images/cinvestav-
Now Imagine the following
You have a target distribution π that you want to sample
You can use a generative q distribution that you know to try to generate
the necessary samples.
Then, you have a process like this
1 Sample x ∼ q (x).
2 Use the functional form of the target distribution π to
Accept or Reject the sample x as being generated by π (x)
41 / 61
35. Images/cinvestav-
History - The not so great remarks...
Metropolis
Generalized
−→ Metropolis-Hasitngs
Special Case
−→ Gibbs Sampling
All developments are done in Computational Physics.
The Landmark 1953 Paper N. Metropolis, A. Rosenbluth, M.
Rosenbluth, A. Teller, and E. Teller:
“Equation of state calculations by fast computing machines, Journal of
Chemical Physics.”
There is a quote by A. Rosenbluth
“Metropolis played no role in its development other than providing
computer time!”
After all, Metropolis was the supervisor in Los Alamos National Lab.
45 / 61
36. Images/cinvestav-
Steps of the Metropolis-Hastings
An M-H steps involves the following
A M-H step uses
1 The Target/Invariant Distribution l (x)
2 The Proposal/Sampling Distribution q (x |x)
Then
It involves sampling a candidate value x given the current value x
according to q (x |x)
The Markov chain then moves towards x
With acceptance probability
A (x, x ) = min 1,
l (x ) q (x|x )
l (x) q (x |x)
47 / 61
37. Images/cinvestav-
Logistic Regression
We know
l (w|x, y) =
n
i=1
exp wT xi
1 + exp {wT xi}
yi
1
1 + exp {wT xi}
1−yi
(1)
In our case, we use as q a Multi-variate Gaussian
π (w) ∼ N (µ, Σ)
49 / 61
41. Images/cinvestav-
The Assumptions
Suppose
We have an n-dimensional vector x.
The expressions for the full conditionals
p (xj|x1, ..., xj−1, xj+1, ..., xn)
Here, we have the following proposal distribution
q x |x(i)
=
p xj |x
(i)
−j if x−j = x
(i)
−j
0 otherwise
54 / 61
42. Images/cinvestav-
The Gibbs Sampler
The Algorithm
1 Init x0,1:n
2 For i = 0 to N − 1
Sample x
(i+1)
1 ∼ p x1|x
(i)
2 , ..., x
(i)
n
Sample x
(i+1)
2 ∼ p x2|x
(i)
1 , x
(i)
3 , ..., x
(i)
n
· · ·
Sample x
(i+1)
j ∼ p xj|x
(i)
1 , ..., x
(i)
j−1, x
(i)
j+1, ..., x
(i)
n
· · ·
Sample x
(i+1)
n ∼ p xn|x
(i)
1 , ..., x
(i)
n−1
56 / 61
43. Images/cinvestav-
Latent Dirichlet Allocation
It is an algorithm for finding topics composed by sets of words
You require to have documents!!!
Data consists
Of documents di consisting of a set of words wi
In a universe of W = {w1, ..., wn} words.
58 / 61
44. Images/cinvestav-
Then
We want to find the mixture of words to topics
Thus, we can easily do this by counting:
Counts of topic k in document d
The distribution of topics in a document
Counts of word v in document d
The distribution of words in a document
Thus, we can compute the probability of topics Zi (Gibbs Term)
p (Zi|Z−i, W)
59 / 61
45. Images/cinvestav-
For this
We need to introduce some extra terms
Ωd,k - count of topic k in document d.
Ψk,v- counts of word v in document d.
Thus the Gibbs Term
p (Zi|Z−i, W) =
Ψ−i
k,v + β
v Ψ−i
k,v + Nv · β
×
Ω−i
d,k + α
k Ω−i
d,k + Kα
With
Nv = number of different words.
β = Renovation Dirichlet Parameter for words
K = Number of topics
α= Renovation Dirichlet Parameter for topics
60 / 61