Docsity

Assignment 3 of machine learning, Exercises of Machine Learning

Partial preview of the text

Download Assignment 3 of machine learning and more Exercises Machine Learning in PDF only on Docsity!

Assignment 3

NAFA WSHYAR SONIA SHAZAD SOMA HOSHYAR

Submitted to Dr Abbas Yeganeh

th

June 2024

Q3-1/ answer

What is the Defuzzification process?

In machine learning, particularly within the context of fuzzy logic systems,

defuzzification is defined as the process of converting a fuzzy output generated by a

fuzzy inference system into a single crisp value. This transformation is essential for

interpreting the results of fuzzy logic computations in a way that can be utilized for

decision-making, control actions, or further numerical analysis within machine

learning models.

Importance of Defuzzification

Defuzzification is crucial because it bridges the gap between fuzzy logic's linguistic

reasoning and the precise numerical outputs required by most machine learning

applications. It ensures that the fuzzy models' results can be effectively used in real-

world scenarios, enhancing the interpretability and applicability of fuzzy logic within

machine learning.

What is Gain Index?

Gain Index: "A measure used in decision tree algorithms to quantify the improvement

in data purity or class homogeneity achieved by splitting the dataset based on a specific

feature. It guides the selection of the most informative feature at each node to optimize

the decision tree's structure and enhance its predictive performance."

Q 3 - 3 /Estimate the Entropy Parameter and Gain Index for each of the

features in the given dataset.

cheating

No= 7

Yes=

Entropy = โˆ’(

3

10

log

2

3

10

7

10

log

2

7

10

Refund:

Refunded =โˆ’(

3

3

log

2

3

3

0

3

log

2

0

3

Not Refunded =โˆ’ (

3

7

log

2

3

7

4

7

log

2

4

7

Gain index Refund= 0.881-(

3

10

ร— 0 +

7

10

ร— 0. 985 ) = 0. 190

Material statues :

Single = โˆ’(

2

4

log

2

2

4

2

4

log

2

2

4

Married =โˆ’(

0

4

log

2

0

4

4

4

log

2

4

4

Divorce =โˆ’(

1

2

log

2

1

2

1

2

log

2

1

2

Gain index Material statues = 0.881-(

4

10

ร— 1 +

4

10

ร— 0 +

2

10

ร— 1 ) = 0. 281

Taxable income:

log

2

log

2

log

2

log

2

Gain Index Taxable income = 0.881-(

4

10

ร— 0. 81 +

6

10

ร— 0. 92 ) = 0. 004 Could be ignored

Q3-4/ Use the following data set and construct a Decision Tree Model?

What is the best Decision Tree Model for the dataset?

Tid Attrib1 Attrib2 Attrib3 Class

NO Small 55K NO

YES Medium 80K NO

YES Large 110K NO

NO Small 95K YES

NO Large 67K NO

Attribute 3

< 85 ๐พ 85Kโ‰ค ๐‘‹ โ‰ค 95

95 <

NO

Yes

No

Q3-6/Artificial Neural Networks (ANNs) and Fuzzy Inference

Systems (FIS) are both popular approaches in computational

intelligence, each with its own strengths and applications.

Differences Between ANN and FIS

Aspect Artificial Neural Networks

(ANN)

Fuzzy Inference Systems

(FIS)

Model Type Data-driven, learning-based Rule-based, knowledge-

driven

Learning Requires training with a

dataset

Typically, does not require

training (rules are set by

experts)

Structure Consists of neurons and

layers

Consists of rules and

membership functions

Data Handling Handles noisy and

incomplete data well

Requires precise input for

accurate output

Interpretability Often considered a black

box, hard to interpret

Highly interpretable due to

clear rule-based structure

Adaptability Learns from data and can

adapt to new patterns

Less adaptive, relies on

predefined rules

Mathematical Basis Based on computational

neuroscience

Based on fuzzy logic and

approximate reasoning

Applications Pattern recognition,

regression, classification

Control systems, decision-

making, approximate

reasoning

Combining Artificial Neural Networks (ANN) and Fuzzy Inference Systems (FIS) into a hybrid

method, known as a Neuro-Fuzzy System (NFS), leverages the adaptive learning capabilities of

ANNs with the rule-based interpretability of FIS to address complex structural engineering

problems. This approach involves gathering comprehensive data from sensors and experiments,

preprocessing it to handle missing values and normalize inputs, and setting up an initial FIS

with fuzzy sets and rules based on expert knowledge. A neural network architecture is then

developed, integrating layers for input, fuzzy rule processing, and output, allowing the system

to adjust membership functions and rule weights during training using algorithms like

backpropagation. The trained hybrid model is validated with separate data to ensure

generalization, and its performance is assessed using metrics such as mean squared error (MSE)

and R-squared. Once validated, the NFS is deployed for real-time structural health monitoring,

material property assessment, and load optimization, integrating seamlessly into existing

engineering systems for continuous monitoring and early warning. The fuzzy rules and trained

membership functions provide interpretability, allowing engineers to understand the decision-

making process and gain insights into structural behavior, while continuous updates with new

data ensure the model's accuracy and relevance. This robust, adaptive, and interpretable

framework enhances the precision and reliability of engineering analyses, supporting better-

informed decision-making in structural engineering.

Q3-8/Use Fuzzy Logic in MATLAB to simulate Compressive

Strength of a Concrete Sample with [Binder= 650 (kg/m3), Age=

28(day), Silica Foam (SF = 13%)].

weight =

1 ร— 60 + 0

1

= 60 ๐‘€๐‘ƒ๐‘Ž