Ensemble Learning is a technique that creates multiple models and then combines them to produce improved results.
Ensemble learning usually produces more accurate solutions than a single model would.
This presentation deals with the formal presentation of anomaly detection and outlier analysis and types of anomalies and outliers. Different approaches to tackel anomaly detection problems.
Data preprocessing techniques
See my Paris applied psychology conference paper here
https://www.slideshare.net/jasonrodrigues/paris-conference-on-applied-psychology
or
https://prezi.com/view/KBP8JnekVH9LkLOiKY3w/
Ensemble Learning is a technique that creates multiple models and then combines them to produce improved results.
Ensemble learning usually produces more accurate solutions than a single model would.
This presentation deals with the formal presentation of anomaly detection and outlier analysis and types of anomalies and outliers. Different approaches to tackel anomaly detection problems.
Data preprocessing techniques
See my Paris applied psychology conference paper here
https://www.slideshare.net/jasonrodrigues/paris-conference-on-applied-psychology
or
https://prezi.com/view/KBP8JnekVH9LkLOiKY3w/
A short presentation for beginners on Introduction of Machine Learning, What it is, how it works, what all are the popular Machine Learning techniques and learning models (supervised, unsupervised, semi-supervised, reinforcement learning) and how they works with various Industry use-cases and popular examples.
This slide first introduces the sequential pattern mining problem and also presents some required definitions in order to understand GSP algorithm. At then end there is a brief introduction of GSP algorithm and some practical constraints which it supports.
Naive Bayes is a kind of classifier which uses the Bayes Theorem. It predicts membership probabilities for each class such as the probability that given record or data point belongs to a particular class.
Anomaly detection is a topic with many different applications. From social media tracking, to cybersecurity, anomaly detection (or outlier detection) algorithms can have a huge impact in your organisation.
For the video please visit: https://www.youtube.com/watch?v=XEM2bYYxkTU
This slideshare has been produced by the Tesseract Academy (http://tesseract.academy), a company that educates decision makers in deep technical topics such as data science, analytics, machine learning and blockchain.
If you are interested in data science and related topics, make sure to also visit The Data Scientist: http://thedatascientist.com.
Abstract: This PDSG workshop introduces basic concepts of splitting a dataset for training a model in machine learning. Concepts covered are training, test and validation data, serial and random splitting, data imbalance and k-fold cross validation.
Level: Fundamental
Requirements: No prior programming or statistics knowledge required.
This presentation gives the idea about Data Preprocessing in the field of Data Mining. Images, examples and other things are adopted from "Data Mining Concepts and Techniques by Jiawei Han, Micheline Kamber and Jian Pei "
As we move into a new era of ITSM computing, new big data and machine learning tools and methodologies are being developed to support IT staff by intelligently extracting insights and making predictions from the enormous amounts of data accumulated from the organization. According to Gartner, I&O leaders must take a comprehensive approach to incorporate advanced big data and machine learning technologies into their organizations or risk becoming irrelevant. But what exactly is big data and machine learning all about? How can you introduce these concepts into your existing Service Desk?
Join USF’s distinguished Computer Science and Engineering Professor Lawrence Hall and SunView Software’s VP of Marketing and Product Strategy John Prestridge as they break down the fundamentals of big data and machine learning and provide real-world examples of the impact the technologies will have on ITSM.
A short presentation for beginners on Introduction of Machine Learning, What it is, how it works, what all are the popular Machine Learning techniques and learning models (supervised, unsupervised, semi-supervised, reinforcement learning) and how they works with various Industry use-cases and popular examples.
This slide first introduces the sequential pattern mining problem and also presents some required definitions in order to understand GSP algorithm. At then end there is a brief introduction of GSP algorithm and some practical constraints which it supports.
Naive Bayes is a kind of classifier which uses the Bayes Theorem. It predicts membership probabilities for each class such as the probability that given record or data point belongs to a particular class.
Anomaly detection is a topic with many different applications. From social media tracking, to cybersecurity, anomaly detection (or outlier detection) algorithms can have a huge impact in your organisation.
For the video please visit: https://www.youtube.com/watch?v=XEM2bYYxkTU
This slideshare has been produced by the Tesseract Academy (http://tesseract.academy), a company that educates decision makers in deep technical topics such as data science, analytics, machine learning and blockchain.
If you are interested in data science and related topics, make sure to also visit The Data Scientist: http://thedatascientist.com.
Abstract: This PDSG workshop introduces basic concepts of splitting a dataset for training a model in machine learning. Concepts covered are training, test and validation data, serial and random splitting, data imbalance and k-fold cross validation.
Level: Fundamental
Requirements: No prior programming or statistics knowledge required.
This presentation gives the idea about Data Preprocessing in the field of Data Mining. Images, examples and other things are adopted from "Data Mining Concepts and Techniques by Jiawei Han, Micheline Kamber and Jian Pei "
As we move into a new era of ITSM computing, new big data and machine learning tools and methodologies are being developed to support IT staff by intelligently extracting insights and making predictions from the enormous amounts of data accumulated from the organization. According to Gartner, I&O leaders must take a comprehensive approach to incorporate advanced big data and machine learning technologies into their organizations or risk becoming irrelevant. But what exactly is big data and machine learning all about? How can you introduce these concepts into your existing Service Desk?
Join USF’s distinguished Computer Science and Engineering Professor Lawrence Hall and SunView Software’s VP of Marketing and Product Strategy John Prestridge as they break down the fundamentals of big data and machine learning and provide real-world examples of the impact the technologies will have on ITSM.
Debugging Intermittent Issues - A How ToLloydMoore
Debugging intermittent issues present a unique set of challenges and requirements to the developer. Of particular interest is question “did this fix actually solve the problem, or am I just getting lucky today?” This talk will show you how to determine, with some level of confidence, if the issue is really solved or just not showing up. In addition issues which only show up rarely have a habit of accumulating until some issue seems to be happening all the time. Techniques for untangling the interaction of multiple issues will be discussed.
Cause and Effect Analysis is a technique for identifying all the possible causes (inputs) associated with a particular problem / effect (output) before narrowing down to the small number of main, root causes which need to be addressed.
Learn how to transform from a mild-mannered online organizer into a true data-driven mastermind! What to track, how to test, and methods for creating a data-driven culture at your nonprofit.
What is the Covering (Rule-based) algorithm?
Classification Rules- Straightforward
1. If-Then rule
2. Generating rules from Decision Tree
Rule-based Algorithm
1. The 1R Algorithm / Learn One Rule
2. The PRISM Algorithm
3. Other Algorithm
Application of Covering algorithm
Discussion on e/m-learning application
I love the smell of data in the morning (getting started with data science) ...Troy Magennis
Data Science 101 for software development. I know it misses the purist view of Data Science, but this is intended to get you started! First presented at Agile 2017 in Florida.
Writing Lab Reports Earth Science Online Each lab re.docxambersalomon88660
Writing Lab Reports
Earth Science Online
Each lab report should contain the following:
I. Heading: This should be the name and number of the lab, the date, and your name.
II. Purpose: A one or two sentence purpose in your own words. Do not copy mine.
III. Procedure: A one or two paragraph explanation of what went on in the lab
exercise. I don’t want fine details—this is an overall view.
IV. Data and/or Observations: Some labs will ask you to record numbers and/or make
observations—these should be in your report. Many of the online labs do NOT ask
you to do this—don’t make up stuff that isn’t called for.
V. Sample calculations: If the lab procedure asks you to calculate something, show
your work.
VI. Results: If the lab procedure asks you to calculate something and/or make a
decision (such as the type of mineral present), you should show these results. Again,
many of the online labs do NOT ask you to do this.
VII. Questions: This is probably the most important part of the report in that it shows
me that you did the exercise and hopefully learned from it. You need to write the
QUESTIONS as well as the ANSWERS. Please write your Answers using bold or
italic letters - it will really help me grading
VIII. Conclusion: A one sentence statement as to whether you achieved the purpose or
not.
Lab Reports should always include I, II, III, VII, and VIII. They may be submitted electronically
by attaching them to the assignment box. They must be done with MS WORD.
Lab # 6 (Summer)—Earth Science
Weather
Purpose: To keep a weather diary to check the accuracy of local forecasts for a given location.
One of the forecasting tools used by weathermen is the historical record for a given location coupled with the type of weather approaching the region. Although general comments can be made such as “high pressure signals good weather” or “low pressure signals bad weather”, the actual prediction depends on the location in question and the weather for the preceding days for that location.
In this first of two weather labs, you will keep a “weather diary” for a week which will reflect the predicted high temperature, low temperature, and weather conditions for a given location each day as well as the actual weather conditions for that same location. The data for this diary must come from an Internet source or a newspaper (most of the local TV stations have a website with weather information if you don’t like one of my suggestions below.) You must use the same source everyday and you should get the predicted weather the day BEFORE each entry date and the actual high and low temperatures the day AFTER each entry date. If you are doing this for your home location (which I suggest), you can use what you observe outside in the blank labeled “Actual Weather” each day.
Procedure:
.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
3. • Data Mining: Process of discovering patterns
in data
Data Mining
3
4. • Machine Learning
– Grew out of work in AI
– New Capability for computers
• Machine Learning is a science of getting computers to
learn without being explicitly programed
• Learning= Improving with experience at some task
– Improve over task T
– With respect to P
– Based on experience E
Machine Learning
4
5. • Database Mining
– Large datasets from growth of automation/web
• Ex: web click data, medical records, biology, engineering
• Applications can’t program by hand
– Ex: Autonomous helicopter, handwriting recognition,
most of NLP, Computer vision
• Self- customizing programs
– Amazon, Netflix product recommendation
• Understand human Learning(brain, real AI)
Machine Learning
5
6. Types of Learning
– Supervised learning: Learn to predict
• correct answer for each example. Answer can be a numeric variable,
categorical variable etc.
– Unsupervised learning: learn to understand and describe the
data
• correct answers not given – just examples (e.g. – the same figures as
above , without the labels)
– Reinforcement learning: learn to act
• occasional rewards
M M MF F F
6
8. • The success of machine learning system also depends on the
algorithms.
• The algorithms control the search to find and build the
knowledge structures.
• The learning algorithms should extract useful information
from training examples.
Algorithms
8
9. • Supervised learning
– Prediction
– Classification (discrete labels), Regression (real values)
• Unsupervised learning
– Clustering
– Probability distribution estimation
– Finding association (in features)
– Dimension reduction
• Reinforcement learning
– Decision making (robot, chess machine)
Algorithms
9
10. • Problem of taking labeled dataset, gleaning information from
it so that you can label new data sets
• Learn to predict output from input
• Function approximation
Supervised Learning
10
11. • Predict housing prices
R
Supervised learning: example 1
Regression: predict continuous valued output(price) 11
12. • Breast Cancer(malignant, benign)
Supervised learning: example 2
This is classification problem : Discrete valued output(0 or 1)
12
15. 1. Input: Credit history (# of loans, how much
money you make,…)
Out put : Lend money or not?
2. Input: picture , Output: Predict Bsc, Msc
PhD
3. Input: picture, Output: Predict Age
4. Input: Large inventory of identical items,
Output: Predict how many items will sell
over the next 3 months
5. Input: Customer accounts, Output: hacked
or not
Q?
15
16. • Find patterns and structure in data
Unsupervised Learning
16
17. Unsupervised Learning-examples
• Organize computing clusters
– Large data centers: what machines work together?
• Social network analysis
– Given information which friends you send email
most /FB friends/Google+ circles
– Can we automatically identify which are cohesive
groups of friends
17
18. • Market Segmentation
– Customer data set and group customer into
different market segments
• Astronomical data analysis
– Clustering algorithms gives interesting & useful
theories ex: how galaxies are formed
18
19. 1. Given email labeled as spam/not spam, learn a
spam filter
2. Given set of news articles found on the web,
group them into set of articles about the same
story
3. Given a database of customer data,
automatically discover market segments ad
groups customer into different market segments
4. Given a dataset of patients diagnosed as either
having diabetes or nor, learn to classify new
patients as having diabetes or not
Q?
19
20. Reinforcement Learning
• Learn to act
• Learning from delayed reward
• Learning come from after several step ,the decisions that you’ve
actually made
20
23. Simplicity first
• Simple algorithms often work very well!
• There are many kinds of simple structure, eg:
– One attribute does all the work
– All attributes contribute equally & independently
– A weighted linear combination might do
– Instance-based: use a few prototypes
– Use simple logical rules
• Success of method depends on the domain
23
24. Inferring rudimentary rules
• 1R: learns a 1-level decision tree
– I.e., rules that all test one particular attribute
• Basic version
– One branch for each value
– Each branch assigns most frequent class
– Error rate: proportion of instances that don’t belong to the
majority class of their corresponding branch
– Choose attribute with lowest error rate
(assumes nominal attributes)
24
25. Pseudo-code for 1R
For each attribute,
For each value of the attribute, make a rule as follows:
count how often each class appears
find the most frequent class
make the rule assign that class to this attribute-value
Calculate the error rate of the rules
Choose the rules with the smallest error rate
• Note: “missing” is treated as a separate attribute value
25
26. Evaluating the weather attributes
Outlook Temp Humidity Windy Play
Sunny Hot High False No
Sunny Hot High True No
Overcast Hot High False Yes
Rainy Mild High False Yes
Rainy Cool Normal False Yes
Rainy Cool Normal True No
Overcast Cool Normal True Yes
Sunny Mild High False No
Sunny Cool Normal False Yes
Rainy Mild Normal False Yes
Sunny Mild Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Rainy Mild High True No
Attribute
Table 1. Weather data (Nominal) 26
27. Evaluating the weather attributes
Attribute Rules Errors Total
errors
Outlook Sunny No 2/5
Overcast
Rainy
Temp Hot
Mild
Cool
Humidity High
Normal
Windy False
True
Outlook Temp Humidity Windy Play
Sunny Hot High False No
Sunny Hot High True No
Overcast Hot High False Yes
Rainy Mild High False Yes
Rainy Cool Normal False Yes
Rainy Cool Normal True No
Overcast Cool Normal True Yes
Sunny Mild High False No
Sunny Cool Normal False Yes
Rainy Mild Normal False Yes
Sunny Mild Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Rainy Mild High True No
* indicates a tie
27
28. Evaluating the weather attributes
Attribute Rules Errors Total
errors
Outlook Sunny No 2/5 4/14
Overcast Yes 0/4
Rainy Yes 2/5
Temp Hot No* 2/4 5/14
Mild Yes 2/6
Cool Yes 1/4
Humidity High No 3/7 4/14
Normal Yes 1/7
Windy False Yes 2/8 5/14
True No* 3/6
Outlook Temp Humidity Windy Play
Sunny Hot High False No
Sunny Hot High True No
Overcast Hot High False Yes
Rainy Mild High False Yes
Rainy Cool Normal False Yes
Rainy Cool Normal True No
Overcast Cool Normal True Yes
Sunny Mild High False No
Sunny Cool Normal False Yes
Rainy Mild Normal False Yes
Sunny Mild Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Rainy Mild High True No
* indicates a tie
28
29. Evaluating the weather attributes
Attribute Rules Errors Total
errors
Outlook Sunny No 2/5 4/14
Overcast Yes 0/4
Rainy Yes 2/5
Temp Hot No* 2/4 5/14
Mild Yes 2/6
Cool Yes 1/4
Humidity High No 3/7 4/14
Normal Yes 1/7
Windy False Yes 2/8 5/14
True No* 3/6
Outlook Temp Humidity Windy Play
Sunny Hot High False No
Sunny Hot High True No
Overcast Hot High False Yes
Rainy Mild High False Yes
Rainy Cool Normal False Yes
Rainy Cool Normal True No
Overcast Cool Normal True Yes
Sunny Mild High False No
Sunny Cool Normal False Yes
Rainy Mild Normal False Yes
Sunny Mild Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Rainy Mild High True No
* indicates a tie
29
30. Evaluating the weather attributes
Attribute Rules Errors Total
errors
Outlook Sunny No 2/5 4/14
Overcast Yes 0/4
Rainy Yes 2/5
Temp Hot No* 2/4 5/14
Mild Yes 2/6
Cool Yes 1/4
Humidity High No 3/7 4/14
Normal Yes 1/7
Windy False Yes 2/8 5/14
True No* 3/6
Outlook Temp Humidity Windy Play
Sunny Hot High False No
Sunny Hot High True No
Overcast Hot High False Yes
Rainy Mild High False Yes
Rainy Cool Normal False Yes
Rainy Cool Normal True No
Overcast Cool Normal True Yes
Sunny Mild High False No
Sunny Cool Normal False Yes
Rainy Mild Normal False Yes
Sunny Mild Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Rainy Mild High True No
* indicates a tie
30
31. Evaluating the weather attributes
Attribute Rules Errors Total errors
Outlook Sunny->No 2/5 4/14
Overcast->Yes 0/4
Rainy->Yes 2/5
Temp Hot->No* 2/4 5/14
Mild->Yes 2/6
Cool->Yes 1/4
Humidity High->No 3/7 4/14
Normal->Yes 1/7
Windy False->Yes 2/8 5/14
True->No* 3/6
Table 2. Rules for Weather data (Nominal) 32
32. Dealing with numeric attributes
• Discretize numeric attributes
• Divide each attribute’s range into intervals
– Sort instances according to attribute’s values
– Place breakpoints where the class changes
(the majority class)
– This minimizes the total error
33
33. Example: temperature from weather data
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Y | N
Outlook Temperature Humidity Windy Play
Sunny 85 85 False No
Sunny 80 90 True No
Overcast 83 86 False Yes
Rainy 70 96 False Yes
Rainy 68 80 False Yes
Rainy 65 70 True No
Overcast 64 65 True Yes
Sunny 72 95 False No
Sunny 69 70 False Yes
Rainy 75 80 False Yes
Sunny 75 70 True Yes
Overcast 72 90 True Yes
Overcast 81 75 False Yes
Rainy 71 91 True No
34
34. Example: temperature from weather data
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Yes | No | Yes Yes Yes | No No | Yes | Yes Yes | No | Yes Yes | No
Outlook Temperature Humidity Windy Play
Sunny 85 85 False No
Sunny 80 90 True No
Overcast 83 86 False Yes
Rainy 70 96 False Yes
Rainy 68 80 False Yes
Rainy 65 70 True No
Overcast 64 65 True Yes
Sunny 72 95 False No
Sunny 69 70 False Yes
Rainy 75 80 False Yes
Sunny 75 70 True Yes
Overcast 72 90 True Yes
Overcast 81 75 False Yes
Rainy 71 91 True No
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Yes | No | Yes Yes Yes | No No Yes | Yes Yes | No | Yes Yes | No
The simplest fix is to move
the breakpoint at 72 up one
example, to 73.5, producing a
mixed partition in which no is
the majority class.
35
35. Evaluating the weather attributes
Attribute Rules Errors Total errors
Outlook Sunny->No 2/5
Overcast->
Rainy->
Temp Hot->
Mild->
Cool->
Humidity High->
Normal->
Windy False->
True->
Table :Rules for Weather data (Nominal) 36
36. Dealing with numeric attributes
Attribute Rules Errors Total errors
Temperature <=64.5->Yes 0/1 1/14
>64.5->No 0/1
>66.5 and <=70.5->Yes 0/3
>70.5 and <=73.5->No 1/3
>73.5 and <=77.5->Yes 0/2
>77.5 and <=80.5->No 0/1
>80.5 and <=84->Yes 0/2
>84->No 0/1
Table 5. Rules for temperature from weather data (overfitting)
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Yes | No | Yes Yes Yes | No No Yes | Yes Yes | No | Yes Yes | No
Break points :64.5, 66.5, 70.5, 73.5, 77.5, 80.5, and 84
37
37. The problem of overfitting
• This procedure is very sensitive to noise
– One instance with an incorrect class label will probably produce a
separate interval
• Simple solution:
enforce minimum number of instances in majority class per
interval
38
38. Discretization example
• Example (with min = 3):
• Final result for temperature attribute
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Yes | No | Yes Yes Yes | No No Yes | Yes Yes | No | Yes Yes | No
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Yes No Yes Yes Yes | No No Yes Yes Yes | No Yes Yes No
64 65 68 69 70 71 72 72 75 75 80 81 83 85
Yes | No | Yes Yes Yes | No No Yes | Yes Yes | No | Yes Yes | No
which leads to the rule set
temperature: ≤ 77.5 → yes
> 77.5 → 39
39. With overfitting avoidance
• Resulting rule set:
Attribute Rules Errors Total errors
Outlook Sunny No 2/5 4/14
Overcast Yes 0/4
Rainy Yes 2/5
Temperature 77.5 Yes 3/10 5/14
> 77.5 No* 2/4
Humidity 82.5 Yes 1/7 3/14
> 82.5 and 95.5 No 2/6
> 95.5 Yes 0/1
Windy False Yes 2/8 5/14
True No* 3/6
40
40. Discussion of 1R
• 1R was described in a paper by Holte (1993)
– Contains an experimental evaluation on 16 datasets (using
cross-validation so that results were representative of
performance on future data)
– Minimum number of instances was set to 6 after some
experimentation
– 1R’s simple rules performed not much worse than much more
complex decision trees
• Simplicity first pays off!
Very Simple Classification Rules Perform Well on Most Commonly Used
Datasets
Robert C. Holte, Computer Science Department, University of Ottawa
41
41. Statistical modeling
• “Opposite” of 1R: use all the attributes
• Two assumptions: Attributes are
– equally important
– statistically independent (given the class value)
• I.e., knowing the value of one attribute says nothing about the
value of another
(if the class is known)
• Independence assumption is almost never correct!
• But … this scheme works surprisingly well in practice
42
42. Probabilities for weather data
Outlook Temperature Humidity Windy Play
Yes No Yes No Yes No Yes No Yes No
Sunny 2 3 Hot 2 2 High 3 4 False 6 2 9 5
Overcast 4 0 Mild 4 2 Normal 6 1 True 3 3
Rainy 3 2 Cool 3 1
Sunny 2/9 3/5 Hot 2/9 2/5 High 3/9 4/5 False 6/9 2/5 9/14 5/14
Overcast 4/9 0/5 Mild 4/9 2/5 Normal 6/9 1/5 True 3/9 3/5
Rainy 3/9 2/5 Cool 3/9 1/5
Outlook Temp Humidity Windy Play
Sunny Hot High False No
Sunny Hot High True No
Overcast Hot High False Yes
Rainy Mild High False Yes
Rainy Cool Normal False Yes
Rainy Cool Normal True No
Overcast Cool Normal True Yes
Sunny Mild High False No
Sunny Cool Normal False Yes
Rainy Mild Normal False Yes
Sunny Mild Normal True Yes
Overcast Mild High True Yes
Overcast Hot Normal False Yes
Rainy Mild High True No 43
43. Probabilities for weather data
Outlook Temp. Humidity Windy Play
Sunny Cool High True ?
• A new day: Likelihood of the two classes
For “yes” = 2/9 3/9 3/9 3/9 9/14 = 0.0053
For “no” = 3/5 1/5 4/5 3/5 5/14 = 0.0206
Conversion into a probability by normalization:
P(“yes”) = 0.0053 / (0.0053 + 0.0206) = 0.205
P(“no”) = 0.0206 / (0.0053 + 0.0206) = 0.795
Outlook Temperature Humidity Windy Play
Yes No Yes No Yes No Yes No Yes No
Sunny 2 3 Hot 2 2 High 3 4 False 6 2 9 5
Overcast 4 0 Mild 4 2 Normal 6 1 True 3 3
Rainy 3 2 Cool 3 1
Sunny 2/9 3/5 Hot 2/9 2/5 High 3/9 4/5 False 6/9 2/5 9/14 5/14
Overcast 4/9 0/5 Mild 4/9 2/5 Normal 6/9 1/5 True 3/9 3/5
Rainy 3/9 2/5 Cool 3/9 1/5
44
44. Bayes’s rule
• Probability of event H given evidence E :
• A priori probability of H :
– Probability of event before evidence is seen
• A posteriori probability of H :
– Probability of event after evidence is seen
]Pr[
]Pr[]|Pr[
]|Pr[
E
HHE
EH =
]|Pr[ EH
]Pr[H
Thomas Bayes
Born: 1702 in London, England
Died: 1761 in Tunbridge Wells, Kent, England
from Bayes “Essay towards solving a problem in the
doctrine of chances” (1763)
45
45. Naïve Bayes for classification
• Classification learning: what’s the probability of the class
given an instance?
– Evidence E = instance
– Event H = class value for instance
• Naïve assumption: evidence splits into parts (i.e. attributes)
that are independent
Pr[H | E]=
Pr[E1 | H]Pr[E2 | H]…Pr[En | H]Pr[H]
Pr[E]
46
46. Weather data example
Outlook Temp. Humidity Windy Play
Sunny Cool High True ?
Evidence E
Probability of
class “yes”
]|Pr[]|Pr[ yesSunnyOutlookEyes ==
]|Pr[ yesCooleTemperatur =´
]|Pr[ yesHighHumidity =´
]|Pr[ yesTrueWindy =´
]Pr[
]Pr[
E
yes
´
]Pr[
14
9
9
3
9
3
9
3
9
2
E
´´´´
=
47
47. The “zero-frequency problem”
• What if an attribute value doesn’t occur with every class value?
(e.g. “Outlook = Overcast” for class “No”)
– Probability will be zero!
– A posteriori probability will also be zero!
(No matter how likely the other values are!)
• Remedy: add 1 to the count for every attribute value-class
combination (Laplace estimator)
• Result: probabilities will never be zero!
(also: stabilizes probability estimates)
Pr[no| E]= 0
Pr[Outlook =Overcast |no]= 0
Outlook Temperature Humidity Windy Play
Yes No Yes No Yes No Yes No Yes No
Sunny 2 3 +1 Hot 2 2 High 3 4 False 6 2 9 5
Overcast 4 0 Mild 4 2 Normal 6 1 True 3 3
Rainy 3 2 Cool 3 1
Sunny 2/9 3/5 Hot 2/9 2/5 High 3/9 4/5 False 6/9 2/5 9/14 5/14
Overcast 4/9 0/5 Mild 4/9 2/5 Normal 6/9 1/5 True 3/9 3/5
Rainy 3/9 2/5 Cool 3/9 1/5
48
48. The “zero-frequency problem”
• What if an attribute value doesn’t occur with every class value?
(e.g. “Outlook = Overcast” for class “No”)
– Probability will be zero!
– A posteriori probability will also be zero!
(No matter how likely the other values are!)
• Remedy: add 1 to the count for every attribute value-class
combination (Laplace estimator)
• Result: probabilities will never be zero!
(also: stabilizes probability estimates)
Pr[no| E]= 0
Pr[Outlook =Overcast |no]= 0
Outlook Temperature Humidity Windy Play
Yes No Yes No Yes No Yes No Yes No
Sunny 2 3 +1 Hot 2 2 High 3 4 False 6 2 9 5
Overcast 4 0 +1 Mild 4 2 Normal 6 1 True 3 3
Rainy 3 2 +1 Cool 3 1
Sunny 2/9 3/5 4/8 Hot 2/9 2/5 High 3/9 4/5 False 6/9 2/5 9/14 5/14
Overcast 4/9 0/5 1/8 Mild 4/9 2/5 Normal 6/9 1/5 True 3/9 3/5
Rainy 3/9 2/5 3/8 Cool 3/9 1/5
49
49. *Modified probability estimates
• In some cases adding a constant different from 1 might be
more appropriate
• Example: attribute outlook for class yes
• Weights don’t need to be equal
(but they must sum to 1)
m
m
+
+
9
3/2
m
m
+
+
9
3/4
m
m
+
+
9
3/3
Sunny Overcast Rainy
m
m
+
+
9
2 1p
m
m
+
+
9
4 2p
m
m
+
+
9
3 3p
50
50. Missing values
• Training: instance is not included in
frequency count for attribute value-class
combination
• Classification: attribute will be omitted
from calculation
• Example: Outlook Temp. Humidity Windy Play
? Cool High True ?
Likelihood of “yes” = = 0.0238
Likelihood of “no” = = 0.0343
P(“yes”) = 0.0238 / (0.0238 + 0.0343) = 41%
P(“no”) = 0.0343 / (0.0238 + 0.0343) = 59%
51
51. Missing values
• Training: instance is not included in
frequency count for attribute value-class
combination
• Classification: attribute will be omitted
from calculation
• Example: Outlook Temp. Humidity Windy Play
? Cool High True ?
Likelihood of “yes” = 3/9 3/9 3/9 9/14 = 0.0238
Likelihood of “no” = 1/5 4/5 3/5 5/14 = 0.0343
P(“yes”) = 0.0238 / (0.0238 + 0.0343) = 41%
P(“no”) = 0.0343 / (0.0238 + 0.0343) = 59%
52
52. Numeric attributes
• Usual assumption: attributes have a normal or
Gaussian probability distribution (given the class)
• The probability density function for the normal
distribution is defined by two parameters:
– Sample mean
– Standard deviation
– Then the density function f(x) is
å=
=
n
i
ix
n 1
1
m
å=
-
-
=
n
i
ix
n 1
2
)(
1
1
ms
2
2
2
)(
2
1
)( s
m
sp
-
-
=
x
exf
Karl Gauss, 1777-1855
great German mathematician
53
53. Statistics for weather data
• Example density value:
0340.0
2.62
1
)|66(
2
2
2.62
)7366(
=== *
-
-
eyesetemperaturf
p
Outlook Temperature Humidity Windy Play
Yes No Yes No Yes No Yes No Yes No
Sunny 2 3 64, 68, 65, 71, 65, 70, 70, 85, False 6 2 9 5
Overcast 4 0 69, 70, 72, 80, 70, 75, 90, 91, True 3 3
Rainy 3 2 72, … 85, … 80, … 95, …
Sunny 2/9 3/5 =73 =75 =79 =86 False 6/9 2/5 9/14 5/14
Overcast 4/9 0/5 =6.2 =7.9 =10.2 =9.7 True 3/9 3/5
Rainy 3/9 2/5
54
54. Classifying a new day
• A new day:
• Missing values during training are not included in
calculation of mean and standard deviation
Outlook Temp. Humidity Windy Play
Sunny 66 90 true ?
Likelihood of “yes” = 0.0221 = 0.000036
Likelihood of “no” = 0.0291 0.0380 = 0.000136
P(“yes”) = 0.000036 / (0.000036 + 0. 000136) = 20.9%
P(“no”) = 0.000136 / (0.000036 + 0. 000136) = 79.1%
55
55. Classifying a new day
• A new day:
• Missing values during training are not included in
calculation of mean and standard deviation
Outlook Temp. Humidity Windy Play
Sunny 66 90 true ?
Likelihood of “yes” = 2/9 0.0340 0.0221 3/9 9/14 = 0.000036
Likelihood of “no” = 3/5 0.0291 0.0380 3/5 5/14 = 0.000136
P(“yes”) = 0.000036 / (0.000036 + 0. 000136) = 20.9%
P(“no”) = 0.000136 / (0.000036 + 0. 000136) = 79.1%
56
56. Naïve Bayes: discussion
• Naïve Bayes works surprisingly well (even if
independence assumption is clearly violated)
• Why? Because classification doesn’t require
accurate probability estimates as long as
maximum probability is assigned to correct class
• However: adding too many redundant attributes
will cause problems (e.g. identical attributes)
• Note also: many numeric attributes are not
normally distributed ( kernel density
estimators)
57
57. Naïve Bayes Extensions
• Improvements:
– select best attributes (e.g. with greedy search)
– often works as well or better with just a
fraction of all attributes
• Bayesian Networks
58
58. 59
Summary
• OneR – uses rules based on just one attribute
• Naïve Bayes – use all attributes and Bayes rules to
estimate probability of the class given an
instance.
• Simple methods frequently work well,
– 1R and Naïve Bayes do just as well—or even better.
• but …
– Complex methods can be better (as we will see)