DATA MINING Assi4 Sowmya Gonugunta
pdf
keyboard_arrow_up
School
Georgia State University *
*We aren’t endorsed by this school
Course
320
Subject
Mechanical Engineering
Date
Dec 6, 2023
Type
Pages
6
Uploaded by SargentDuckMaster1010
DATA MINING 1) Calculating the information gain of each attribute as follows: First calculate information gain of the given data set A formula: = -(7/16)*log(7/16)-(9/16)*log(9/16) = -(0.438)*(1.191)-(0.563)*(-0.829) = (0.522)+(0.467) = 0.989 Expected information needed to classify a data object in 𝐷
after partitioning by attribute 𝐴
Rain: Info(Rain) =(4/16)*(-(3/4)*log(3/4)-(1/4)*log(1/4))+(12/16*(-(4/12)*log(4/12)-(8/12)*log(8/12)) = (0.25) -(0.75)*(-0.415)-(0.25)*(-2)) + (0.75)*(-(0.333)*(-1.586)-(0.667)*(-0.584)) = 0.892 Gain(Rain) = 0.989-0.892=
0.097 Sprinkler:Info(Sprinkler) =(6/16)*(-(5/6)*log(5/6)-(1/6)*log(1/6))+(10/16)*(-(2/10)*log(2/10)-(8/10)*log(8/10)) =(0.375) (-(0.833)*(-0.264)-(0.167)*(-2.582))+(0.625)*(-(0.2)*(-2.322)-(0.8)*(-0.322)) =0.695 Gain(Sprinkler) = 0.989-0.695=
0.294 As the “sprinkler”
has the highest gain
, it will be the root node of the decision tree. We have only one more attribute. rain. Thus, “rain”
will be the child of Sprinkler. Split the tuples based on the labels of Sprinkler.
For, Sprinkler=Yes Index Rain Grass 1 No Wet 2 No Wet 3 No Wet 4 Yes Wet 5 No Dry 6 No Wet For, Sprinkler=No Index Rain Grass 1 No Dry 2 No Dry 3 Yes Wet 4 No Dry 5 No Dry 6 Yes Dry 7 No Dry 8 No Dry 9 Yes Wet 10 No Dry Again Split the tuples based on the labels of Rain.
Final Decision Tree, 2)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
2.1) Classification accuracy = TP+TN/P+N = 4+3/10 = 0.7 => 70% 2.2) Error rate = FP+FN/P+N = 1+2/10 = 0.3 => 30% 2.3) Sensitivity = TP/P = 4/5 = 0.8 => 80% 2.4) Specificity = TN/N =3/5= 0.6 =>60% 2.5) Precision = TP/TP+FP = 4/6 = 0.666 =>66.6% 2.6) Recall = TP/TP+FN = 4/5 = 0.8 => 80 % 2.7) F-score = 2-Precision-Recall/Precision+Recall = 2-(4/5)-(4/6)/(4/5) + (4/6) =0.7272 = 72.72 3) Prior Calculation: P(Grass = dry) = 5/10=0.5 P(Grass = wet) = 5/10=0.5 Likelihood: P(rain = no|grass = dry) = 5/5 = 1 P(rain = no|grass = wet) = 3/5 = 0.6 P(Sprinkler = yes|grass = dry) = 2/5 = 0.4 P(Sprinkler = yes|grass = wet) = 3/5= 0.6
Posterior Calculation: P(Grass=wet|(Rain=no and Sprinkler=yes)=
(P(rain=no|Grass=wet)* P(Sprinkler=yes |Grass=wet)*P(Grass=wet))/P(Rain=no and Sprinkler=yes) P(Grass=Dry|(Rain=no and Sprinkler=yes)= (P(rain=no|Grass=dry)* P(Sprinkler=yes |Grass=dry)*P(Grass=wet))/P(Rain=no and Sprinkler=yes) As Evidence is the same for both classes we can ignore it for simplicity: Then, P(Grass=wet|(Rain=no and Sprinkler=yes) (P(rain=no|Grass=wet)* P(Sprinkler=yes|Grass=wet)*P(Grass=wet) =3/5*3/5*0.5=0.18 P(Grass=Dry|(Rain=no and Sprinkler=yes) (P(rain=no|Grass=Dry) P(Sprinkler=yes|Grass=dry)*P(Grass=Dry)=1*2/5*0.5=0.2 Since P(Grass=wet|(Rain=no and Sprinkler=yes)+ P(Grass=Dry|(Rain=no and Sprinkler=yes) =1 These numbers can be converted into a probability by making the sum equal to 1 (normalization): P(Grass=wet|(Rain=no and Sprinkler=yes)= P(Grass=wet|(Rain=no and Sprinkler=yes)/(P(Grass=wet|(Rain=no and Sprinkler=yes))+ P(Grass=Dry|(Rain=no and Sprinkler=yes))= 0.18/(0.18+0.2)=0.47 P(Grass=Dry|(Rain=no and Sprinkler=yes)/(P(Grass=wet|(Rain=no and Sprinkler=yes))+ P(Grass=Dry|(Rain=no and Sprinkler=yes))= 0.2/(0.18+0.2)=0.53 Since P(Grass=dry|(Rain=no and Sprinkler=yes) is greater than P(Grass=wet|(Rain=no and Sprinkler=yes) NB Classifier will predict the grass label is dry. 4) Then conditional probability tables can be defined as given below: P(rain) True False 4/16 = 0.25 11/16=0.75 P(sprinkler|rain) Rain True False False 5/12 = 0.41 7/12 = 0.583 True ¼ = 0.25 ¾ = 0.75
P(grass|rain,sprinkler) Sprinkler Rain True False False False 0 1 False True 0.67 0.44 True False 0.8 0.2 True True 1 0
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Documents
Related Questions
R5 please answer all problems and also write out all steps and reasoning. The second image shows the correct answers.
arrow_forward
MULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .
arrow_forward
In your biomechanical testing lab, you perform a series of compression tests to determine the relationship
between apparent bone density (p, units of g/cm³) and ultimate stress (ơult, units of MPa). Using the set of
experimental measurements below, write an m-file to fit a power relationship of the form
O uli = Ap
to the data. Use the log transform method to linearize the system and data, followed by linear regression.
Plot the data points and the power relationship on a single plot. Be sure to label your axes and provide a
legend. Provide a printout of your m-file and a printout of the command window showing your results.
Write down the best fit equation and box it.
8.76
5.25
4.26
5.51
3.88
18.45
2.09
13.72
5.42
2.17
Oult (MPa)
p (g/cm³)
0.598 | 0.459
0.319 | 0.235
0.141
0.754
0.177
0.553
0.394
0.246
arrow_forward
HW Matlab 1) Create a variable ftemp to store a temperature in degrees Fahrenheit (F). Write m-file to convert this to degrees Celsius and store the result in a variable ctemp. The conversion factor is C = (F —32) * 5/9. 2) Write m-file to generate a matrix of random integers of size 100 by 100 their values between 15 to 80. 3) Free fall of objects is given by y =5mgt? where a is the acceleration, v is the velocity, y is the distance, m is the mass of the object, g is the gravitational acceleration. Plot the distance and velocity of the object for 15 seconds after its fall from rest (y = 0). Take m = 0.2 kg.
arrow_forward
I need help with this question. :)
arrow_forward
A certain system contains three branches in parallel. One branch contains units A and B in series. A second
branch contains units C and D in series. The third branch contains unit E alone. These non-identical units have
constant hazard rates in order of their unit number of 0.1/year, 0.15/year, 0.2/year, 0.15/year, and 0.25/year.
a) Draw a block diagram and compute the reliability of the system from the reliabilities of the individual units.
b) Draw a signal flow graph.
c) Identify the cut sets and the minimal cut sets.
d) Find reliability of the system.
e) Find the mean time to failure
arrow_forward
Could you please fix my code it’s supposed to look like the graph that’s on the picture. But the lines do not cross eachother at the beginning. Could you make the lines look like the lines on the graph?
Use this code in MATLAB and fix it.
% Sample data for Diesel and Petrol cars
carPosition = linspace(1, 60, 50); % Assumed positions of cars
% Define your seed here
seed = 50;
rand('seed',seed); % Set the seed for reproducibility
% Assumed CO2 emissions for Diesel and Petrol
CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel
CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol
% Fit polynomial curves with a reduced degree of 2
pDiesel = polyfit(carPosition, CO2Diesel, 2);
pPetrol = polyfit(carPosition, CO2Petrol, 2);
% Generate points for best fit lines
fitDiesel = polyval(pDiesel, carPosition);
fitPetrol = polyval(pPetrol, carPosition);
% Plotting the data
figure;
hold on;
% Plot Diesel best fit line…
arrow_forward
For all the following problems,
5.
a)
b)
You need to show at least 3 iterations calculated manually with all steps.
You do not need to include the M.files for the bisection method (bisect.m) and for false position (falspos.m). You
must, however, show the command lines for the given functions with their variables and other parameters.
Fanning friction factor
For fluid flow in pipes, friction is described by a dimensionless number, the Fanning friction factor
f. The Fanning friction factor is dependent on a number of parameters related to the size of the pipe
and the fluid, which can all be represented by another dimensionless quantity, the Reynolds number
Re. A formula that predicts ƒ given Re is the von Karman equation:
4log₁0 (Re√) - 0.4
=
Typical values for the Reynolds number for turbulent flow are 10,000 to 500,000 and for the
Fanning friction factor are 0.001 to 0.01.
(a) Develop a function that uses bisection to solve for fgiven a user-supplied value of Re between
500 and…
arrow_forward
Don't Use Chat GPT Will Upvote And Give Handwritten Solution Please
arrow_forward
The subject is Engineering Data Analysis
p.s please answer my question. Please thank you so much
arrow_forward
For all the following problems,
a)
b)
4.
You need to show at least 3 iterations calculated manually with all steps.
You do not need to include the M.files for the bisection method (bisect.m) and for false position (falspos.m). You
must, however, show the command lines for the given functions with their variables and other parameters.
Zero-pressure specific heat of dry air
Mechanical engineers, as well as most other engineers, use thermodynamics extensively
in their work.
The following polynomial can be used to relate the zero-pressure specific heat of
dry air cp kJ/(kg K) to temperature (K):
11
0.99403 +1.671×10-4T + 9.7215-10-8T²-9.5838×10-
Cp
=
T3+1.9520×10-14T4
(a) Develop a plot of cp versus a range of T=0 to 1200 K.
(b) Use bisection to determine the temperature T that corresponds to a specific heat of 1.1 kJ/(kg K).
(c) What will be the value of T if you use false position method?
(d) What is the percentage error between the results of (b) and (c)?
For both methods use maximum…
arrow_forward
How do I input this code for this MATLAB problem? Thanks!
arrow_forward
Use MATLAB please make code for this.
arrow_forward
Supercomp Ltd produces two computer models PC1086 and PC1186. The matrix A
shows the cost per computer (in thousands of dollars) and B the production figures for
the year 2010 (in multiples of 10,000 units.) Find a matrix C that shows the
shareholders the cost per quarter (in millions of dollars) for raw material, labor, and
miscellaneous.
Quarter
1 2 3 4
PC1086 PC186
1.2
1.6
Raw Components
3 8 6 9
B
PC1086
0.3
0.4
Labor
6 2 4 3
PC1186
0.5
0.6
Miscellaneous
arrow_forward
Please help, this for Matlab the image is the first question with following 2 and 3 they go together.
2. Solving the question by using bisection.m with the stopping criterion at 1%. Report the root and # of iterations.
3. by using newton-Raphson matlab script with the stopping criterion at 0.1%. Report the root and # of iterations.
arrow_forward
In the Blasius equation
stream function:
j is a dímensionless plane
p(x, y)
f(n)
VDUX
Values of f are not given in Table 7.1, but one published
value is f(2.0) = 0.6500. Consider airflow at 6 m/s, 20°C,
and 1 atm past a flat plate. Atx= 1 m, estimate (a) the height
y; (b) the velocity, and (c) the stream function at 7= 2.0.
arrow_forward
I am having trouble with the folloiwng MATLAB code. I am getting an error that says "unrecognized function or variable 'numericalPropogatorOptions". I have the aerospace toolbox and the aerospace blockset added. what add on do I have to download to use that function. How do I make this code work?
% Define Keplerian Elements
a = 29599.8; e = 0.0001; i = 0.9774; Omega = 1.3549; w = 0; M = 0.2645;
[RECI, VECI] = Kepler2RV(a, e, i, Omega, w, M);
initialState = [RECI * 1e3; VECI * 1e3]; % Initial position (m) and velocity (m/s)
% Define constants
mu = 3.986004418e14; % Gravitational constant (m^3/s^2)
earthRadius = 6378.1363 * 1e3; % Earth radius in meters
j2 = 1.08263e-3; % J2 perturbation coefficient
% Define propagator options
propOptions = numericalPropagatorOptions('CentralBody', 'Earth', ...
'GravitationalParameter', mu, ...
'InitialState', initialState, ...
'OutputTimeStep', 300); % Output every 300 seconds
% Add perturbations
addGravityModel(propOptions, 'Degree', 2,…
arrow_forward
Develop a confusion matrix for the following observations during land cover mapping
2
1
2
3
4
2
4
5
1
3
1 Sorghum
4
4
1
2
3
1
5
2
2
3
2
Maize
5
2
4
2
3
2
3
4
4
3
3 House
5
3
4
5
1
5
3
5
5
1
4 Water
2 5
1
4
3
5
1
1
4
3
5 Shop
Classified
Actual
Table of consistency ratio
Matrix order
1 2 3 4 5 6 7 8
number
RI
0
0.52 0.90
1.12
1.25
1.35
1.42
Matrix order
9
10
11
12
13
14
15
number
RI
1.46
1.49
1.52
1.54
1.56
1.58
1.59
List of formula
R = 0.5*P*17.3
M = silt(100-clay)
K = [2.1*M1.14* (104)*(12-OC)+3.25*(structure-2)+2.5*(permeability-3)]/100
Structure: 1-VFG, 2-FG, 3-medium, 4-platty
Permeability: 1-rapid, 2moderate to rapid, 3-moderate, 4-slow to moderate, 5-slow, 6- very slow
C = exp(2*ndvi/(1-ndvi))
LS = sqrt(1/22)* (0.065+0.045*s+0.0065*s²)
arrow_forward
help me fill in % error please
arrow_forward
sample calculations
目
File Edit View Insert Format Data To
100%
$ % .0
.00 12:
fx |
A
1
Variable
Value
Units
diameter
height
m
4
volume
m^3
3
The image above shows a section of a Google sheet. What formula should be written in cell
B4 to calculate the volume of a cylinder with a diameter value in B2 and height in B3?
a) =0.25*PI()*B2^2 * B3
b) =PI()*B2^2 * B3
c) =pi*diameter^2 * height
d) =PI*B2^2 * B3
3 5
arrow_forward
Chapter 12 - Lecture Notes.pptx: (MAE 272-01) (SP25) DY...
Scores
arrow_forward
I already have the answer and provide it. Show work please
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY
Related Questions
- R5 please answer all problems and also write out all steps and reasoning. The second image shows the correct answers.arrow_forwardMULTIPLE CHOICE -The answer is one of the options below please solve carefully and circle the correct option Please write clear .arrow_forwardIn your biomechanical testing lab, you perform a series of compression tests to determine the relationship between apparent bone density (p, units of g/cm³) and ultimate stress (ơult, units of MPa). Using the set of experimental measurements below, write an m-file to fit a power relationship of the form O uli = Ap to the data. Use the log transform method to linearize the system and data, followed by linear regression. Plot the data points and the power relationship on a single plot. Be sure to label your axes and provide a legend. Provide a printout of your m-file and a printout of the command window showing your results. Write down the best fit equation and box it. 8.76 5.25 4.26 5.51 3.88 18.45 2.09 13.72 5.42 2.17 Oult (MPa) p (g/cm³) 0.598 | 0.459 0.319 | 0.235 0.141 0.754 0.177 0.553 0.394 0.246arrow_forward
- HW Matlab 1) Create a variable ftemp to store a temperature in degrees Fahrenheit (F). Write m-file to convert this to degrees Celsius and store the result in a variable ctemp. The conversion factor is C = (F —32) * 5/9. 2) Write m-file to generate a matrix of random integers of size 100 by 100 their values between 15 to 80. 3) Free fall of objects is given by y =5mgt? where a is the acceleration, v is the velocity, y is the distance, m is the mass of the object, g is the gravitational acceleration. Plot the distance and velocity of the object for 15 seconds after its fall from rest (y = 0). Take m = 0.2 kg.arrow_forwardI need help with this question. :)arrow_forwardA certain system contains three branches in parallel. One branch contains units A and B in series. A second branch contains units C and D in series. The third branch contains unit E alone. These non-identical units have constant hazard rates in order of their unit number of 0.1/year, 0.15/year, 0.2/year, 0.15/year, and 0.25/year. a) Draw a block diagram and compute the reliability of the system from the reliabilities of the individual units. b) Draw a signal flow graph. c) Identify the cut sets and the minimal cut sets. d) Find reliability of the system. e) Find the mean time to failurearrow_forward
- Could you please fix my code it’s supposed to look like the graph that’s on the picture. But the lines do not cross eachother at the beginning. Could you make the lines look like the lines on the graph? Use this code in MATLAB and fix it. % Sample data for Diesel and Petrol cars carPosition = linspace(1, 60, 50); % Assumed positions of cars % Define your seed here seed = 50; rand('seed',seed); % Set the seed for reproducibility % Assumed CO2 emissions for Diesel and Petrol CO2Diesel = 25 + 5*cos(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Diesel CO2Petrol = 20 + 5*sin(carPosition/60*2*pi) + randn(1, 50)*5; % Random data for Petrol % Fit polynomial curves with a reduced degree of 2 pDiesel = polyfit(carPosition, CO2Diesel, 2); pPetrol = polyfit(carPosition, CO2Petrol, 2); % Generate points for best fit lines fitDiesel = polyval(pDiesel, carPosition); fitPetrol = polyval(pPetrol, carPosition); % Plotting the data figure; hold on; % Plot Diesel best fit line…arrow_forwardFor all the following problems, 5. a) b) You need to show at least 3 iterations calculated manually with all steps. You do not need to include the M.files for the bisection method (bisect.m) and for false position (falspos.m). You must, however, show the command lines for the given functions with their variables and other parameters. Fanning friction factor For fluid flow in pipes, friction is described by a dimensionless number, the Fanning friction factor f. The Fanning friction factor is dependent on a number of parameters related to the size of the pipe and the fluid, which can all be represented by another dimensionless quantity, the Reynolds number Re. A formula that predicts ƒ given Re is the von Karman equation: 4log₁0 (Re√) - 0.4 = Typical values for the Reynolds number for turbulent flow are 10,000 to 500,000 and for the Fanning friction factor are 0.001 to 0.01. (a) Develop a function that uses bisection to solve for fgiven a user-supplied value of Re between 500 and…arrow_forwardDon't Use Chat GPT Will Upvote And Give Handwritten Solution Pleasearrow_forward
- The subject is Engineering Data Analysis p.s please answer my question. Please thank you so mucharrow_forwardFor all the following problems, a) b) 4. You need to show at least 3 iterations calculated manually with all steps. You do not need to include the M.files for the bisection method (bisect.m) and for false position (falspos.m). You must, however, show the command lines for the given functions with their variables and other parameters. Zero-pressure specific heat of dry air Mechanical engineers, as well as most other engineers, use thermodynamics extensively in their work. The following polynomial can be used to relate the zero-pressure specific heat of dry air cp kJ/(kg K) to temperature (K): 11 0.99403 +1.671×10-4T + 9.7215-10-8T²-9.5838×10- Cp = T3+1.9520×10-14T4 (a) Develop a plot of cp versus a range of T=0 to 1200 K. (b) Use bisection to determine the temperature T that corresponds to a specific heat of 1.1 kJ/(kg K). (c) What will be the value of T if you use false position method? (d) What is the percentage error between the results of (b) and (c)? For both methods use maximum…arrow_forwardHow do I input this code for this MATLAB problem? Thanks!arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY

Elements Of Electromagnetics
Mechanical Engineering
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Oxford University Press

Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:9780134319650
Author:Russell C. Hibbeler
Publisher:PEARSON

Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:9781259822674
Author:Yunus A. Cengel Dr., Michael A. Boles
Publisher:McGraw-Hill Education

Control Systems Engineering
Mechanical Engineering
ISBN:9781118170519
Author:Norman S. Nise
Publisher:WILEY

Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:9781337093347
Author:Barry J. Goodno, James M. Gere
Publisher:Cengage Learning

Engineering Mechanics: Statics
Mechanical Engineering
ISBN:9781118807330
Author:James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:WILEY