Ask Question, Ask an Expert

+61-413 786 465

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

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

Lab assignment - matlab matrix relationallogical operators

Lab Assignment - MATLAB Matrix, Relational/Logical Operators and Plotting This laboratory exercise/assignment will involve you 1) practicing multiplication operators in MATLAB; 2) practicing relational and logical operat ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

  • 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

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As