Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask MATLAB Expert

Artificial Intelligence

1.    A 4-input Neuron has weights (1,-1,  0,  0.5.find out the network output when the following input vectors are applied.

1397_eqation_1.jpg

For calculation assume:

a. f(net) = unipolar binary
b. f(net) = bipolar binary

2.  The network shown in figure 2 uses neurons with:
(a) Unipolar Binary;
(b) Bipolar Binary.

702_bionomial.jpg

find out a table of responses to all four possible Boolean inputs.

Ex 3 (Portfolio).  You are to complete the subsequent coronary disease production system :-
The Rules:

Rule 1:
IF X has a risk of heart attack
AND X has had a previous heart attack
THEN give X the drug Digitalis

Rule 2:
IF X has left quadratic pain
AND X has high blood pressure
THEN X has a risk of a heart attack

Rule 3:
IF X has raised intraocular pressure
THEN X has high blood pressure

Rule 4:
IF X has high blood pressure AND X is a heavy smoker
THEN X has a risk of a heart attack

Rule 5:
IF X is an asthmatic AND X has a risk of heart attack
AND X has had a previous heart attack THEN
Give X the drug Preminol-V (this is a fictional drug name!!)

The Facts:

A: Smith has raised intraocular pressure
B: Smith has had a previous heart attack
C: Smith has left quadratic pain
D: Smith is a heavy smoker
E: Jones is an asthmatic
F: Jones has raised intraocular pressure
G: Jones is a heavy smoker
 ________________________________________

%forward chaining Production system
:-op(800,fx,if).        %set operators for if
:-op(700,xfx,then).     %then rules
:-op(300,xfy,or).
:-op(200,xfy,and).
 %dynamic(....) allows predicate inside brackets fact to be asserted and retracted,
% here were are making fact (/1 means fact has 1 argument) dynamic so we can add and
% take facts from working memory.
:-dynamic(fact/1).
fact(has(smith,raisedIntraocularPressure)).        %list of facts
...
forward:-
  new_fact(P),
  !,
  prepare('New fact '), prepare(P),nl,
  asserta(fact(P)),                        %adds a fact to working memory
  forward
;
prepare('no more facts').
new_fact(Action):-
  if Condition then Action,
  not(fact(Action)),
  composedFact(Condition).
composedFact(Cond):-
  fact(Cond).
composedFact(C1 and C2):-
  composedFact(C1),
  composedFact(C2).
composedFact(C1 or C2):-
  composedFact(C1)
;
  composedFact(C2).
if has(Person,riskOfHeartAttack) and has(Person,previousHeartAttack)        %list of rules
then need(Person,digitalis).
...
not(X):-
 X,!,fail;true.
________________________________________

Once you have added all the relevant facts and rules to the code (ensuring you have capital letters in the correct places!!) - start the ball rolling by the query  '?- forward.'  - its also worth tracing the execution of the code using 'trace' to follow the firing of the rules.
Ensure you understand how the if .. then .. definitions work and the action of the assert command.
How does your production system decide which rule to fire next?
Does this differ from those covered in the lecture and the associated texts?
Can you think of any better methods for determining the order?

Ex 4 (Portfolio).
Improve your code so that the list of facts in the database can be printed to the screen.  Similarly add a command to list all the rules in the database.

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91099

Have any Question? 


Related Questions in MATLAB

Provide matlab code as per the research paperresearch paper

Provide MATLAB code as per the research paper. Research paper - Decimeter-Level Localization with a Single WiFi Access Point We present Chronos, a system that enables a single WiFi access point to localize clients to wit ...

Assignment 1 -question 1 design a pumping system that will

Assignment 1 - Question 1: Design a pumping system that will transfer raw water from Reservoir A to Reservoirs B and C. A control valve shall be located in Line D-C next to Reservoir C to control the share of flow betwee ...

Problem 1 the two foremost aerospace companies in the usa

PROBLEM 1: The two foremost aerospace companies in the USA are Lockheed and Boeing. They often compete for government contracts. A major factor in awarding a contract is the claimed reliability of the given system to be ...

Algorithms assignmentthe following 3 tasks are to be

Algorithms Assignment The following 3 tasks are to be completed for Homework 1 - using the following MATLAB syntax for the script file "bike.m" 1) Write additional syntax to create an INPUT variable named time and prompt ...

Problem - the state estimation equation in the discrete

Problem - The state estimation equation in the discrete Kalman filter is x ^ (n|n) = A(n - 1)x ^ (n - 1|n - 1) + K(n)[y(n) - C(n)A(n - 1)x ^ (n - 1|n - 1)] Thus, given the state transition matrix A(n) and the observation ...

Project 1complete parts 1a 1b and 1cprepare a report

Project 1 Complete parts 1A, 1B, and 1C Prepare a report describing your steps and results Send by email a zip or rar file that contains the report and all MATLAB files you have used. Project 1A: In this project, we cons ...

Question 11 introductionmeasurements have been made of a

Question 1: 1 Introduction: Measurements have been made of a cantilever beam's deflection (stored in the file ass2q1in.csv). You must determine what type of loading has been applied and the magnitude of the load. There a ...

Consider the signal vt given belowwrite a matlab script to

Consider the signal v(t) given below. Write a MATLAB script to do the following (a) Display v(t) and v(2t-1) in window 1 by using subplot. (b) Display both the even component and odd component of v(t) in window 2 by usin ...

Implement copy-move image forgery detection in matlabpaper

Implement Copy-move image forgery detection in Matlab. Paper - Copy-move image forgery detection based on Gabor magnitude by Jen-Chun Lee. With advancement of media editing software, even people who are not image process ...

Qestion 11 introductionmeasurements have been made of a

Question 1: 1 Introduction: Measurements have been made of a cantilever beam's deflection (stored in the file ass2q1in.csv). You must determine what type of loading has been applied and the magnitude of the load. There a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate