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

Car parking systema building of 10 floors is used for

CAR PARKING SYSTEM A building of 10 floors is used for parking cars. The area of each floor can be used for parking 100 cars. An automatic parking system is used to detect which parking slot is free at each moment. So, t ...

Problem -tom cat is chasing jerry mouse the initial

Problem - Tom cat is chasing Jerry mouse the initial distance between them is S 0 = 100m. Tom runs V c = 4-at m/s (negative accident) Jerry's velocity depends on the distance between Tom& Jerry V = Vmax - Ks (3-0.025 m/s ...

Reports of projectproblem design a fourbar grashof

REPORTS OF PROJECT PROBLEM: Design a fourbar Grashof crank-rocker to give? (Everyone will determine the terms given by professor) of rocker rotation with equal time forward and back, from a constant speed motor input. 1- ...

Question 1backgroundyou have been asked to manage a project

QUESTION 1 Background You have been asked to manage a project to install a pipeline from an offshore gas platform to an onshore gas processing plant, and to find the cheapest design that is possible. The platform is Q km ...

Use matlab to solve the following equations please i plot

Use Matlab to solve the following equations. Please (i) plot the solution as a function of t for t  ∈ [0, 100]. (ii) draw the phase diagram of the ODE. 1. dy/dt = y 2 + y with y(0) = 1         dy 1 /dt = y 2 2.           ...

Matlabproject descriptionwrite a mileage per gallons and

MATLAB Project description: Write a mileage per Gallons and miles per dollar calculator program using two functions, one to calculate MPG and one to calculate MPD. The application will prompt the user to type the odm rea ...

Question 1backgroundclimate change is a change in global or

QUESTION 1 Background Climate change is a change in global or regional climate patterns, in particular a change apparent from the mid to late 20th century onwards and attributed largely to the increased levels of atmosph ...

Plotting and computer animation in matlabinstructions for

Plotting and computer animation in MATLAB Instructions: For each of the following exercise, create an M-file to store the MATLAB commands. Copy and paste the M-file into a text document. For problems 1 and 2, include in ...

1 calculate the following for the function f x e-3x -

1) Calculate the following for the function f (x) = e -3x - 2x a. Calculate the derivative of the function by hand. Write a MATLAB function that calculates the derivative of this function and calculate the derivative at ...

Instructions for each of the following exercise create an

Instructions: For each of the following exercise, create an M-file to store the MATLAB commands. Copy and paste the M-file into a text document. Include in the text document the pictures produced by MATLAB. Resize and cr ...

  • 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen