Source Code Cross Referenced for NaiveBayesUpdateable.java in  » Science » weka » weka » classifiers » bayes » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » weka » weka.classifiers.bayes 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    This program is free software; you can redistribute it and/or modify
003:         *    it under the terms of the GNU General Public License as published by
004:         *    the Free Software Foundation; either version 2 of the License, or
005:         *    (at your option) any later version.
006:         *
007:         *    This program is distributed in the hope that it will be useful,
008:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
009:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
010:         *    GNU General Public License for more details.
011:         *
012:         *    You should have received a copy of the GNU General Public License
013:         *    along with this program; if not, write to the Free Software
014:         *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
015:         */
016:
017:        /*
018:         *    NaiveBayesUpdateable.java
019:         *    Copyright (C) 1999 University of Waikato, Hamilton, New Zealand
020:         *
021:         */
022:
023:        package weka.classifiers.bayes;
024:
025:        import weka.classifiers.UpdateableClassifier;
026:        import weka.core.TechnicalInformation;
027:
028:        /**
029:         <!-- globalinfo-start -->
030:         * Class for a Naive Bayes classifier using estimator classes. This is the updateable version of NaiveBayes.<br/>
031:         * This classifier will use a default precision of 0.1 for numeric attributes when buildClassifier is called with zero training instances.<br/>
032:         * <br/>
033:         * For more information on Naive Bayes classifiers, see<br/>
034:         * <br/>
035:         * George H. John, Pat Langley: Estimating Continuous Distributions in Bayesian Classifiers. In: Eleventh Conference on Uncertainty in Artificial Intelligence, San Mateo, 338-345, 1995.
036:         * <p/>
037:         <!-- globalinfo-end -->
038:         *
039:         <!-- technical-bibtex-start -->
040:         * BibTeX:
041:         * <pre>
042:         * &#64;inproceedings{John1995,
043:         *    address = {San Mateo},
044:         *    author = {George H. John and Pat Langley},
045:         *    booktitle = {Eleventh Conference on Uncertainty in Artificial Intelligence},
046:         *    pages = {338-345},
047:         *    publisher = {Morgan Kaufmann},
048:         *    title = {Estimating Continuous Distributions in Bayesian Classifiers},
049:         *    year = {1995}
050:         * }
051:         * </pre>
052:         * <p/>
053:         <!-- technical-bibtex-end -->
054:         *
055:         <!-- options-start -->
056:         * Valid options are: <p/>
057:         * 
058:         * <pre> -K
059:         *  Use kernel density estimator rather than normal
060:         *  distribution for numeric attributes</pre>
061:         * 
062:         * <pre> -D
063:         *  Use supervised discretization to process numeric attributes
064:         * </pre>
065:         * 
066:         <!-- options-end -->
067:         *
068:         * @author Len Trigg (trigg@cs.waikato.ac.nz)
069:         * @author Eibe Frank (eibe@cs.waikato.ac.nz)
070:         * @version $Revision: 1.9 $
071:         */
072:        public class NaiveBayesUpdateable extends NaiveBayes implements 
073:                UpdateableClassifier {
074:
075:            /** for serialization */
076:            static final long serialVersionUID = -5354015843807192221L;
077:
078:            /**
079:             * Returns a string describing this classifier
080:             * @return a description of the classifier suitable for
081:             * displaying in the explorer/experimenter gui
082:             */
083:            public String globalInfo() {
084:                return "Class for a Naive Bayes classifier using estimator classes. This is the "
085:                        + "updateable version of NaiveBayes.\n"
086:                        + "This classifier will use a default precision of 0.1 for numeric attributes "
087:                        + "when buildClassifier is called with zero training instances.\n\n"
088:                        + "For more information on Naive Bayes classifiers, see\n\n"
089:                        + getTechnicalInformation().toString();
090:            }
091:
092:            /**
093:             * Returns an instance of a TechnicalInformation object, containing 
094:             * detailed information about the technical background of this class,
095:             * e.g., paper reference or book this class is based on.
096:             * 
097:             * @return the technical information about this class
098:             */
099:            public TechnicalInformation getTechnicalInformation() {
100:                return super .getTechnicalInformation();
101:            }
102:
103:            /**
104:             * Set whether supervised discretization is to be used.
105:             *
106:             * @param newblah true if supervised discretization is to be used.
107:             */
108:            public void setUseSupervisedDiscretization(boolean newblah) {
109:
110:                if (newblah) {
111:                    throw new IllegalArgumentException(
112:                            "Can't use discretization "
113:                                    + "in NaiveBayesUpdateable!");
114:                }
115:                m_UseDiscretization = false;
116:            }
117:
118:            /**
119:             * Main method for testing this class.
120:             *
121:             * @param argv the options
122:             */
123:            public static void main(String[] argv) {
124:                runClassifier(new NaiveBayesUpdateable(), argv);
125:            }
126:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.