PHP
  Home arrow PHP arrow Implement Bayesian inference using PHP, Part 1
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Implement Bayesian inference using PHP, Part 1
By: developerWorks
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 23
    2005-01-05


    Table of Contents:
  • Implement Bayesian inference using PHP, Part 1
  • Conditional probability
  • Learning from experience
  • Conditional probability and SQL
  • Frequency versus probability format
  • Deriving Bayes Theorem
  • Medical diagnosis wizard
  • Implementing the calculation with Bayes.php
  • Sensitivity analysis
  • Resources

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Implement Bayesian inference using PHP, Part 1
    ( Page 1 of 10 )

    Have you ever wanted to build an intelligent Web application? Paul Meagher shows how to do it using conditional probability. (This intermediate-level article was first published by IBM developerWorks, March 16, 2004, at http://www.ibm.com/developerWorks).

    Support File Available Here.


    Conditional probability -- the probability of observing one event as a result of having observed another event -- is a potentially important factor in designing intelligent Web applications. Paul Meagher introduces Bayesian inference by discussing the basic mathematical concepts involved and demonstrating how to implement the underlying conditional probability calculations using PHP. In this article, the author discusses how Bayesian inference can be used to build an online PHP-based wizard that guides a user through the process making a medical diagnosis. This three-part series features interesting applications designed to help you appreciate the power and potential of Bayesian inference concepts.

    If you examine current artificial intelligence, statistics, and data-mining journals, books, and conferences, you will notice that Bayesian inference techniques are being applied to increasingly complex problems in a growing number of application areas. Many Web developers, however, lack a constructive understanding of Bayesian inference and this prevents them from utilizing these techniques in their own software-development practice. This article (the first of three) aims to remedy that situation.

    For a Web developer, a constructive understanding of Bayesian inference means that you are able to see how Bayesian inference can be applied to the Web development problems you are facing. To achieve this level of understanding, a developer cannot be content to simply study a few examples of how the relevant math formulas work; he must also:

    1. See how these math formulas might be distilled into software routines

    2. Determine how these mathematical software routines can be integrated into interesting Web applications

    In mathematics, we are usually concerned with declarative (what is) descriptions, whereas in computer science we are usually concerned with imperative (how to) descriptions. -- Abelson, Sussman, and Sussman in Structure and Interpretation of Computer Programs, p.22

    Bayesian inference techniques have been widely used in developing various types of Artifical Intelligence (AI) systems (for instance for text retrieval, classification, medical diagnosis, data mining, troubleshooting, and more), so this article series will be of interest to anyone interested in building intelligent Web applications.

    In this article, I will introduce some of the basic mathematical concepts and notations you need to know in order to appreciate Bayesian inference. I will also demonstrate how you can implement conditional probability and Bayes theorem calculations using PHP, and how these calculations can be used to build an online medical diagnosis wizard.

    In the next two articles, I will also explore the application of Bayesian inference to the design and analysis of Web surveys (see Resources). This article lays some of the groundwork necessary for understanding this advanced application of Bayesian inference concepts.

    The first and most important piece of groundwork to mention concerns the concept of conditional probability.



     
     
    >>> More PHP Articles          >>> More By developerWorks
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT