Class Notes (807,938)
Computing (443)
CISC 101 (29)
Lecture

# 5.docx

8 Pages
102 Views

School
Queen's University
Department
Computing
Course
CISC 101
Professor
David Skillicorn
Semester
Fall

Description
5.1 class 10/9/2012 10:35:00 AM If statements can have many branchs in a single statement If condition 1 Else if condition 2 Else if condition 3 .. .. .. else end Creates algorithm, But conditions tested in order Cont1=0; Cont2=0; Cont3=0; For i=1:n If a(i)==1 Count1=count1+1 Else if a(i)==2 Count2=count2+1 Elseif a(i)=3 Count3=count3+1 End End But if a contains 1’s2’s3’s4’s5’s6’s7’s8’s9’s1-‘s New version: Counts= zeros(10); For i=1:n Idx=a(i);  BIG IDEA value becomes an index Counts(idx)=counts(idx)+1 End ***** counts the # of numbers in a vector ex [1,2,4,4,4,2,1] counts1 2 Counts2 2 counts3 0 Count4 4 prediction power of an attribute classes attrib values classes take actual word frequencies & convert them to coded versions (1,2,3…………) such that similar frequencies get coded the same way. 12 2 select boundries that might be meaningful 15 2 0 1 -none 0 1 35 4 -few 1-15 2 87 4 -moderate 16-30 3 293 4 -lots >30 4 21 3 85 4 recode m NB! uses order of the tests Build the table of frequencies counts of a particular word & the meaning matching IC classws word word Recoded IC 1 2 1 3 2 1 4 1 2 0 3 2 counter array
More Less

Related notes for CISC 101

OR

Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Join to view

OR

By registering, I agree to the Terms and Privacy Policies
Just a few more details

So we can recommend you notes for your school.