Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

6 Pages

rubric4

Course: CS 171, Fall 2009
School: CSU Channel Islands
Rating:

Word Count: 790

Document Preview

Assignment Homework 4 Solution (CS 171, Winter, 2008) Graded on a 10 point scale. Problem 1 a, worth 1 point. .5 point for a correctly structured tree. .5 point for correctly classifying all examples. Problem 1 b, worth 5 points. Points were given out for correct calculations and choices: 1 point for initial information value 1 point for outlook on the first level .5 points for humidity calculation on the first...

Register Now

Unformatted Document Excerpt

Coursehero >> California >> CSU Channel Islands >> CS 171

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Assignment Homework 4 Solution (CS 171, Winter, 2008) Graded on a 10 point scale. Problem 1 a, worth 1 point. .5 point for a correctly structured tree. .5 point for correctly classifying all examples. Problem 1 b, worth 5 points. Points were given out for correct calculations and choices: 1 point for initial information value 1 point for outlook on the first level .5 points for humidity calculation on the first level .5 points for windy calculation on the first level .5 points for temperature calculation on the first level .5 points for humidity calculation on the second level .5 points for windy calculation on the second level .5 points for making the correct classifications For constructing a decision tree in general using the given algorithm, we want to split at each node based on the attribute which gives us the greatest information gain. We then continue to split nodes until each leaf node contains only one class. The information gain for splitting on attribute A with 3 possible values is defined by: Info. Gain(A) = Info(old) - (prob. v1 * Info(v1) + prob. v2 * Info(v2) + prob. v3 *Info(v3)) Where the Info is defined by the equation: Info(c1, c2) = -P(c1)*log P(c1) - P(c2)*log P(c2) Where P(c1) is the probability of class 1, and all logarithms are base two. So our first task is to find which attribute to split our root node on. We begin by calculating initial information content Info for our data set: Info (p, n) = -P(p)*logP(p) - P(n)*logP(n) = -(9/14)*log(9/14) - (5/14)*log(5/14) = 0.41 + 0.53 = 0.94 This value is henceforth referred to as Info(old). We next calculate the information content of each of the child nodes after splitting on each of the possible attributes (outlook, temperature, humidity, wind). For outlook: Info(sunny) = I(2/5,3/5) = -(2/5)*log(2/5) - (3/5)*log(3/5) = 0.44 + .53 .97 Info(rain) = I(3/5,2/5) = .44 + .53 = .97 Info(overcast) = I(4/4,0) =0+0 =0 Info. Gain (outlook) = Info(old) -(5/14*Info(sunny) + 5/14*Info(rain) + 4/14*Info(Overcast)) = .94 -(.346 + .346 + 0) = .25 For temperature: Info(hot) = I(2/4,2/4) =1 Info (mild) = I(4/6, 2/6) = .39 + .53 = .92 Info (cool) = I(3/4, 1/4) = .31 + .5 = .81 Info. Gain (temperature) = Info(old) -(4/14*Info(hot) + 6/14*Info(cool) + 4/14*Info(Mild)) = .94 -(.29 + .39 + .23) = .02 For Humidity: Info (high) = I(3/7, 4/7) = .98 Info (normal) = I(6/7, 1/7) = .59 Info. Gain (Humidity) = Info(old) -(7/14*Info(high) + 7/14*Info(normal) = .94 - .49 -.29 = .16 For Windy: Info (true) = I(3/6, 3/6) =1 Info (False) = I(6/8, 2/8) = .81 Info. Gain (Windy) = Info(old) -(6/14*Info(true) + 8/14*Info(false) = .94 .43 - - .46 = .05 So we choose to split on Outlook, which has the highest Info gain. So our tree now looks like this: Outlook Sunny P:2 N:3 OverCast P:4 N:0 Rain P:2 N:3 Now we need to expand each of the subnodes with the same process, calculating based on the instances within the subnode. Since the Overcast node already has only one class, we don't need to expand it any further. For the Sunny node: Info(Sunny) = .97 splitting on Windy: Info (true) = I(1/2, 1/2) =1 Info (false) = I(1/3, 2/3) = .92 Info. Gain (Windy) = Info(sunny) - (2/5*Info(true) + 3/5*Info(false) = .97 -.4 - .55 = .02 splitting on Humidity: Info (high) = I(0, 3/3) =0 Info (normal) = I(2/2, 0) =0 Info. Gain (Humidity) = Info(sunny) - (3/5*Info(high) + 2/5*Info(normal) = .97 - 0 - 0 = .97 Because this split of the classes is the best possible, we can choose humidity as our attribute, without calculating temperature. A similar calculation on the rainy node will find that the windy will split the same way. Our final tree will then look like: Outlook Sunny P:2 N:3 Humidity High P:0 N:3 N Y Normal P:2 N:0 OverCast P:4 N:0 Y True P:0 N:3 N Rain P:2 N:3 Windy False P:2 N:0 Y Problem 2, worth 2 points. Sample answer: The reason a node is not revisited is all records that have passed through a given node once are homogenous in regards to the result of the test performed by that node and hence will not be divided with respect to another test performed by the same node. Problem 3, worth 2 points. Following the same notation in the book, we get the following. If training set con...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

CSU Channel Islands - MATH - 120
MATH120 Practice Problems for Test 1 1. The conjugacy classes of S4 are the permutations of the same cycle type:April 13, 2006(This is not so hard to prove, although you dont need to prove it here.) I leave the conjugacy classes of A4 for you - b
CSU Channel Islands - MATH - 120
MATH1 2 0 Practice P roblems for Test 2 1 . Show that Z / pZ is a eld i p is prime.April 27, 2 006( ) Suppose p is prime. Let a Z / pZ be non-zero, and consider 1 a p 1 to be an integer in the class of a. ( That is, lift the class a = { a , a
Cornell - CS - 632
Reliability Protocols in Distributed Database SystemsChang Won Choi CS632 Advanced Database Systems Cornell University April 24, 20091IntroductionIn the past, implementation of distributed database systems was deemed impractical because netwo
LSU - WW - 557196
WAVEWATCH III 20050831 060000 -100.00 -60.00 401 5.00 50.00 451 .hs 0.0100 m 1 2 (1X,32I4) -999 -999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999-999 -999
CSU Channel Islands - ICS - 141
C+ History C+ and JavaChris Stork most slides stolen from John Mitchell (chapter 12 &amp; 13) ! C+ is an object-oriented extension of C ! C was designed by Dennis Ritchie at Bell Labs used to write Unix based on BCPL! C+ designed by Bjarne Stroustru
LSU - PHYS - 2101
Physics 2101, First Exam, Spring 2006January 24, 2006Name : Section: (Circle one)KEY1 (Rupnik, MWF 7:40am) 2 (Rupnik, MWF 9:40am) 3 (Rupnik, MWF 11:40am)4 (Kirk, MWF 2:40pm) 5 (Kirk, TTh 10:40am) 6 (Gonzlez, TTh 1:40pm) a Please be sure t
CSU Channel Islands - ANTHRO - 243
NSF Proposal 2001 (White) p. 1 Developing Theory of Network Structure/Dynamics and Ethnographic Applications Introduction Concepts A: Cohesive Blocking (A New Methodology) Concepts B: Formal Patterns in Networks Concepts C: Coherence among Formal Pat
CSU Channel Islands - BIOSCID - 126
Lecture 23 Readings Overview: A. A.S. Perelson. Immunology for Physicists. Reviews of Modern Physics 69:1219 1225 (1997) A review of immunology written for people interested in modeling the immune system.Immunology for physicistsAlan S. Perelson
CSU Channel Islands - DEVBIO - 206
Research article299Neural induction in Xenopus requires early FGF signalling in addition to BMP inhibitionEmilie Delaune, Patrick Lemaire and Laurent Kodjabachian*Institut de Biologie du Dveloppement de Marseille, Laboratoire de Gntique et Phys
CSU Channel Islands - BIOSCID - 126
ANSWER KEY to Problem Set 1 Bio Sci D126 (2006)1. Problem 1 (15 points) 1A) Simulate by hand (show your work) the following differential equation: condition A(0) = 1 over the time interval 0 A tdA dt = -Awith initial2 (e.g. calculate A(0.1), A(
CSU Channel Islands - BC - 225
R.K. Brachmann, 2006Chromatin architecture, histone modications, the histone code and the regulated nucleosome mobility model BC225 Rainer K. Brachmann R.K. Brachmann, 2006The challenge~ 2 yards of DNAmammalian cells of ~ 10 to 20 m diamete
CSU Channel Islands - BC - 225
Cell, Vol. 109, 745756, June 14, 2002, Copyright 2002 by Cell PressDot1p Modulates Silencing in Yeast by Methylation of the Nucleosome CoreFred van Leeuwen,1 Philip R. Gafken,2 and Daniel E. Gottschling1,3 1 Division of Basic Sciences 2 Proteomics
LSU - PHYS - 271
Physics 271 - Homework Set 9 - due Wednesday 15 April 2009 From the textbook: Chapter 8: 9, 19; Chapter 9: 7, 9a , 13b , 17c , 22d , 24e , 35. Hints: (a)Atomic masses can be found in Appendix 8. (b)Consider the escape velocity from earth, vesc = 2GM/
CSU Channel Islands - ICS - 184
Relational DesignDatabaseDesign Process Conceptual Modeling - ER diagrams ER schema transformed to relational schema Designer may add additional integrity constraints at this stage to reflect real world constraints. Resulting relational sch
CSU Channel Islands - ICS - 121
ICS 121 / Informatics 111: Software Tools and Methods Fall Quarter 2005 Assignment 1Due Monday, October 17, 2005, at 11:59pmPart 1. Effort Estimation (30 points)Effort estimation is the practice of making accurate estimates of how long it will ta
CSU Channel Islands - ICS - 121
ICS 121 / Informatics 111: Software Tools and Methods Fall Quarter 2005 Assignment 2Due Monday, November 7, 2005 at 11:59 pmPart 1. Effort Estimation (30 points)This problem is the similar to Part 1 from Assignment 1. If you added categories prev
CSU Channel Islands - ICS - 123
ACME/Armani (Carnegie Mellon U/USC ISI) C2SADL (UC Irvine) CHAM (University of Colorado/Universit di LAquila) Darwin (Imperial College) MetaH (Honeywell) Rapide (Stanford University) SADL (SRI International) UniCon (Carnegie Mellon University) Wright
CSU Channel Islands - ICS - 221
ICS 221 Fall 2001Software RequirementsSoftware Lifecycle Context (Waterfall Model) Software RequirementsDavid S. Rosenblum ICS 221 Winter 2001Requirements Requirements Design Design Implementation Implementation Integration Integration Validati
CSU Channel Islands - ICS - 221
ICS 221 Winter 2001Formal Specification MethodsWhat Are Formal Methods? Formal Specification MethodsDavid S. Rosenblum ICS 221 Winter 2001!Use of formal notations .!first-order logic, state machines, etc. system models, constraints, specif
CSU Channel Islands - ICS - 121
ICS 121 Lecture NotesICS 121 - Software Methods and Tools1ICS 121 - Software Methods and ToolsDesignDesign GuidelinesGoal is to develop a coherent representation of software that will satisfy requirements and provide a blueprint for impleme
CSU Channel Islands - CHEMISTRY - 131
All calculations are according to page 135 on textbook. All results are listed in a table in the end of the file. Formulas used:V ( R) = De 1 e ( R Re ) k = 2 De 2 1 2 k2=De = 2 E ( N ) Ee (to avoid errors in fitting) h ( h )2 D0
CSU Channel Islands - ICS - 132
New Premise in Science: Get the Word Out Quickly, Online2002-12-17 13:52:02 -0800December 17, 2002New Premise in Science: Get the Word Out Quickly, OnlineBy AMY HARMONgroup of prominent scientists is mounting an electronic challenge to the l
CSU Channel Islands - ICS - 105
user interface hall of shame ICS 105: Project in HCIWvhy9rvthqTprr9rvtuser interface hall of shametwo questions pvqruvvhv urrrvtuyvqyrs rrqhhtrsruv uhhrsvrvurrphrhvy rhpu4 uv Hhprihhrhursurprr Xvqrihhrhursurvq Hhprihhrsvrvrrshr u4vis
CSU Channel Islands - ESS - 130
1) a. If the field has no convergence nor divergence, we must have u/x + v/y = 0. Taking the derivative of u respect to x and of v respect to y we get a + b = 0, or b = -a. b. u is a linear function of x. If we choose a &gt; 0 then the plot is as in fig
CSU Channel Islands - ESS - 130
Frictional forceEddy viscosity is typically much larger than molecular viscosity. We dene a horizontal and a vertical eddy viscosity coefcient ( Ah and Av ). The horizontal is larger than the vertical because turbulent motion in the vertical is inhi
CSU Channel Islands - ESS - 130
Western boundary intensicationNorth Atlantic currentsGulf stream ringsEastern boundaryEquatorial current systemTrade winds: from NE in the NH, from SE in the SH. The latter blow across the equator. Doldrums (very weak winds) at about 5N. Ekm
CSU Channel Islands - E - 835
This article was published in an Elsevier journal. The attached copy is furnished to the author for non-commercial research and education use, including for instruction at the author's institution, sharing with colleagues and providing to institution
CSU Channel Islands - E - 835
ELSEVIERNuclear Physics A72 1 (2003) 809c-8 12c www.elsevier.com/locate/npeCharmonium states at the Fermilab Antiproton results from E835.M.M.Obertino E835 Collaboration* &amp;University of MinnesotaAccumulator.NewExperiment E835 has collected
CSU Channel Islands - PRE - 20080512
1 2 0.8292401 3 1.4175192 3 0.4439722 4 1.1286293 4 0.6956221 6 1.4193702 6 0.4445753 6 0.0000004 6 0.6966221 7 1.6705432 7 0.7668963 7 0.3479964 7 0.9882716 7 0.3484951 8 1.7033692 8 0.7860413 8 0.3591884 8 1.0105466 8 0.3597597 8
CSU Channel Islands - ICS - 153
ICS 153 Introduction to Computer NetworksInst: Chris Davison cbdaviso@uci.edu1ICS 153 Introduction to Computer Networks Course Goals Understand the basic principles of computer networks Design Architecture Understand the Internet and its
CSU Channel Islands - ICS - 223
The 4+1 View Model of ArchitecturePHILIPPEB.KRUCHTEN,RationalSoftware*The4+1 V?ew Modelorganizes a description of a sojimare architecture usingjive concurrent views, each of which addressesa speczj%set of concerns. Architects capture t
Maryland - ECON - 781
detail in Bawa and some additional results on optimal pollution control policies are obtained. Reference Bawa, V. S., &quot;On Optimal Pollution Control Policies&quot;(unpublishedpaper).CHAPTER14Taxes versus subsidies: a partial analysis~We can rest
UNLV - BIO - 351
Microbial growthLecture 5 Bio 351Please turn off your cell phone!Carfuel = gasolineoxidant = oxygenEnergy!Humanfuel = pizzaoxidant = oxygenEnergy!Bacteriumfuel = gasoline oxidant = oxygen Energy! pizza Fe3+ (rust) hydrogen (H2)
Virginia Tech - ETD - 05242002
A Comparative Analysis of Weaving Areas in HCM, TRANSIMS, CORSIM, VISSIM and INTEGRATIONNanditha KoppulaThesis submitted to the Faculty of the Virginia Polytechnic Institute and State University in partial fulfillment of the requirements for the
UNLV - GEOL - 101
UNLV GEOL101 Lecture Outline Fall 2008Week of 11/24/08 I. Natural resourcesA. definition of a natural resource 1. naturally occurring material 2. can be put to beneficial use B. renewable resources 1. can be replenished in a reasonable amount of t
UNLV - GEOL - 101
GEOL101 Fall 2008, Exam 3 - Important termsGroundwater infiltration groundwater permeability porosity aquiclude aquifer confined aquifer unconfined aquifer perched aquifer water table artesian gaining stream losing stream recharge saturated zone un
UNLV - HPS - 102
HPS 102/RAD 102 Module 5 XI. Radiation DetectionDetector - instrument to measure radiation fields or to count radiations emanating from a source. Dosimeter - device worn on a person to assess the amount of dose received by that worker while working
UNLV - ECO - 2612008
Lecture SlidesEssentials of StatisticsThird Editionby Mario F. TriolaSlide 1Copyright 2007 Pearson Education, Inc Publishing as Pearson Addison-Wesley.Chapter 6 Normal Probability Distributions6-1 Overview 6-2 The Standard Normal Distribu
Maryland - ASTR - 109
NAME _ASTR109/PHYS109: 2008HOMEWORK #6Due 1.00 pm, Thursday 18 September 2008 Bring to lecture or tutorial or leave with Rosalie in room 705, Physics and AstronomyThese questions are based on topics covered in lectures. Any additional material
Maryland - PHYS - 161
Physics 161, section 03 GuptaAssignment 3 Due February 19, start of classReference reading: Vectors, 2-d kinematics, starting forces. So we're starting some of the ideas in Knight chapter 4, and chapter 6 has material on 2-d kinematics. 1) Two m
Maryland - PHYS - 161
This was the first exam, last time I taught this course. The average score was 54, which was a C.University of Maryland Department of PhysicsFall 2007 Physics 161First examDavid Hammer October 2, 2007Answer all questions on these sheets. Pl
Maryland - GEOG - 371
Data Acquisition The world is infinitely complexData Acquisition and Integration, Vector DataLecture 5 October 3, 2002 The contents of a spatial database represent a particular view o f the world The user sees the real world through the medium
Maryland - ASTRO - 487
J/ApJS/112/487 Planetary nebulae classification (Soker 1997)=Properties that cannot be explained by the progenitors of planetary nebulae Soker N. &lt;Astrophys. J. Suppl. Ser. 112, 487 (1997)&gt; =1997ApJS.112.487S (S
UNLV - MGT - 302
ChapterPromoting &amp; DistributingUse Of Advertising Opportunities &amp; Problems Physical Distribution Channels Of Distribution Functions Of Intermediaries Creative Selling Process88-1Advertising&quot;.informs customers of the availability, desirabili
UNLV - CSC - 456
n j C B C @ 9 8 B E B 9 E E9 E i D B B E B A9 z q p j l B C9 s B C B C @ i D D C D j @ l C D d d B i g C B A E9 9 E9 e9 C @ B l C D f B E B 8 i D B E l C l E @ B 8 E 9 @ g e C B 8 9 B f B E i D B B
UNLV - CSC - 789
2Competitive AnalysisRefer to Borodin and El Yaniv for a denition of competitive analysis.2.1Why Competitive Analysis?Why should we try to minimize competitiveness, instead of simply minimizing cost? Consider the paging problem. If we are s
UNLV - CSC - 789
3PotentialsPotentials are a commonly used tool for proving performance, for example, for proving competitiveness.3.1Alternating Weighted Directed GraphsA common problem in the theory of weighted directed graphs is detection of negative cycl
UNLV - CSC - 789
5Metrical Task SystemsA metrical task system consists of a metric space M , whose members are called the states of the system, and a set of tasks, where each task is a cost function on M . Given a metrical task system, our problem is to design an
Maryland - M - 111
Math 111: Introduction to Probability Quiz 3 - February 19, 2008Name:Answer KeyThis quiz covers material from 6.4, 7.1, and 7.2. Show your work. It is acceptable if you set up but do not compute the answers.1. (2 points) For the 4th of July h
NJIT - CS - 104
Chapter 2: What the Digerati Know: Exploring the Human-Computer InterfaceFluency with Information Technology Third Editionby Lawrence SnyderLearning About Technology People do not have any innate technological abilities Our experience using (re
Maryland - CMSC - 330
CMSC330 - SUMMER 2006 - PSEUDO-MIDTERM 1INSTRUCTOR: GUILHERME FONSECA(1) (20 points) What is the output of each Ruby program below? Ignore any possible warning message. All programs are syntatically valid. (a) if 0 puts &quot;ab&quot; elsif &quot; puts &quot;cd&quot; else
Maryland - ENEE - 114
qz3p1Soln.txt: ENEE 114 Section 0101 Quiz 3 Problem 1 Solution 1. In C, two user-defined functions CAN have the same name. (True/False) Ans: False 2. Name three functions that you used in the first two homework assignments Ans: a) main b) scanf c) pr
Maryland - ENEE - 114
Name:_ Glue Logon:_ Quiz 4: Pointers Directions: Write all answers on this sheet, closed notes, closed books, no computer use. 1) Given the declarations below answer the following questions int a; int *p = &amp;a; int b = 7; int arr[5]; a) (4 points) Cir
Maryland - ENEE - 114
Name: Glue Logon: Quiz 3: Functions Directions: This quiz is closed-book, closed-notes, and NO COMPUTER USE. Write all of your answers on these quiz pages. Problem 1 (8 points) Place the data types int, char, float, string, and int array in the colum
Maryland - ENEE - 114
ENEE114 Fall 2003 Quiz 1 3 questions, 30 minutes Closed Book, Closed Notes Put your answers in a file qz1ans.txt and submit with assignment name qz1 1. (5) a) List three data types used in C. b) Write the line of code used to read an integer from the
Maryland - ENEE - 114
ENEE114 Quiz 3 Section 0105 1. Solution: 320 23 2 0 1267924680 2. Solution: a. int foo(int a[][4]) { int i; int sum = 0; for( i = 0 ; i &lt; 3; i+) sum += a[i][0]; return sum; } b. int foo(int a[][4]) { int i, j; int least = a[0][0]; for( i = 0; i &lt; 3;
Maryland - ENEE - 114
Answers to Quiz 1 (section 0101) 1. a) True b) True c) False 2. The program asks the user to answer the question Do you enjoy programming so far? with a y or an n. If the user answers y, the output is Good for you!; if the user answers n, the output
Maryland - ENEE - 623
Problem 5.24 : (a) Since m2 (t) = m3 (t) the dimensionality of the signal space is two. (b) As a basis of the signal space we consider the functions:1 Tf1 (t) =00tT otherwisef2 (t) = 1 T 1 T00t T 2 T &lt;tT 2 otherwiseThe vect
NJIT - CS - 101
Chapter 3 MATLAB ProgrammingTop-Down DesignIt starts with a large task and breaks it down into smaller subtasks. Each subtask may in turn be subdivided into even smaller building blocks if needed. Each building block can be coded and tested indepe
Maryland - ASTRO - 126
J/ApJS/126/37 Morphologies and Spectra of Compact Radio Sources (Kaplan+, 2000)=Radio Morphologies and Spectra of Compact Radio Sources with the SteepestSpectra Kaplan D.L., Cordes J.M., Condon J. J. &lt;Astrophys. J. Suppl. 126, 37 (2000)&gt;
Maryland - PHASER - 750
PHASER 750 Laser Printer1 Placement43 kg 94 lbs.Place in well ventilated area2 Remove TapeS e t up G ui de3Prepare Imaging Unit4 Unpack All TonerRemove cover1.11.2tter A/LeFrontTransptter arency A/Letter A/Le55.1P H