Article View: comp.ai
Article #9237How to get into Adaptive Logic Networks (ALNs)
From: Bill Armstrong
Date: Sat, 12 Aug 1995 00:00
Date: Sat, 12 Aug 1995 00:00
124 lines
5410 bytes
5410 bytes
Here is the one-pager I promised to help get people started using the
Atree 3.0 Educational Kit that can be found in
pub/atree/atree3/atree3ek.exe
on
ftp.cs.ualberta.ca (binary mode,~1.2Mb)
It's also a challenge to see if you can understand this very simple kind of
neural net even though you've never heard of it before.
Examples of an ADL-file in the ALN Definition Language and an
SHL-file containing commands in the (latest) Shell language.
An ALN in Atree 3.0 consists of a tree of fixed, non-adaptive logic gates
of types AND and OR, of arbitrary, not-necessarily uniform fanin, which
takes its inputs from linear threshold units (Perceptrons). An LTU i outputs
a 1 if wi0 + wi1 * x1 + ... + win * xn >=0. Otherwise it outputs a 0.
There is an output variable designated, and its weight is set to minus
1.0. That makes any constraints on weights act like constraints on
partial derivatives (where they exist).
The job of an ALN is to classify points on and below the graph of a function as
in the 1-class, and points above the function graph as in the 0-class.
We aren't trying to compute functions directly by the ALN -- we do that with
a separate decision tree structure that is very simple and extremely fast.
For functions strongly monotonic in some variable, we can get an inverse
function from the same ALN.
Setting epsilon for a variable tells the system what magnitude of change in
that variable you don't care about. It is important both for inputs and
outputs. It helps to define what is data and what is noise, and it helps
to tell the system when it has fitted well enough in a certain region.
Here is an extract from the file PROFIT.ADL from the Atree 3.0 Profit example:
// We define an ALN with 2 dimensions, the second variable is
// the output variable
ALN aProfit(2, 2)
{
var 1 // expenditure on advertising (hundreds of thousands of $)
{ min = 0; max = 5; epsilon = 0.1; }
var 2 // profit (thousands of $)
{ min = -5000; max = 5000; epsilon = 10; }
tree = AND(aLowExp, aHighExp); // tree is and AND of two subALNs
}
subALN aLowExp
{
// region of low expenditure (<= $350000)
// as more money is spent on advertising, profits will *increase*
// so set a *minimum slope* on expenditure of zero
var 1 { max = 3.5; wmin = 0; }
// surface must be convex up, use an AND of two LTUs
tree = AND(2);
}
subALN aHighExp
{
// region of high expenditure (>= $250000)
// as even more is spent on advertising, our profits will *decrease*
// so set a *maximum slope* on expenditure of zero
var 1 { min = 2.5; wmax = 0; }
// surface must be convex up, use an AND of two LTUs
tree = AND(2);
}
Note how the use of AND in the ADL file computes a MINIMUM of linear
functions of the non-output variables, and that must be convex-up
(dome-shaped). The learned function cannot possibly have any other form.
In the ambiguous region, the data will determine the point where the
aHigh curve takes over from the aLow curve.
Here is an extract from PROFIT.SHL (also from the Profit example) that
utilizes the above ADL file:
// load the ALN aProfit from profit.adl
LoadADL "profit.adl"
// train for 1000 epochs or RMS error is 250 or less... learning rate 0.1
aProfit.Train(1000, 250, 0.1, "profit.dat")
aProfit.Write("profit.aln")
// evaluate variable 2 on test set, 1024 quant levels
aProfit.Eval(2, 1024, "profit.dat", "profout1.dat")
// create a decision tree on var 2, evaluate, and save results
DTREE dProfit(aProfit, 2, 8)
dProfit.Write("profit.dtr")
dProfit.Eval("proftest.dat", "profout2.dat")
So that's about it. Now bring up the Atree 3.0 command Shell and
type, without forgetting the quotes:
run "profit.shl"
Technical support -- you are not entitled to any for the Educational Kit,
but that doesn't say you can't try to get help on the Internet:
arms@cs.ualberta.ca
or on CompuServe
GO DENDRONIC
We welcome your comments and any corrections! You can also email me about how
to order the full Atree 3.0 from Dendronic Decisions Limited at a great price
by joining the beta test program. (The beta program will end in October '95).
Bill
Disclaimer: The Atree 3.0 Educational Kit is not endorsed in any way
by my employer University of Alberta. The views and opinions
expressed are entirely my responsibility.
--
* Prof. William W. Armstrong, arms@cs.ualberta.ca
* Computing Science Department, tel(403)492 2374 fax (403)492 1071
* University of Alberta, home (403) 438 1103
* Edmonton, Alberta, Canada T6G 2H1 http://web.cs.ualberta.ca/~arms
Technical Details
Message-ID:
<40grpc$ics@scapa.cs.ualberta.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103d82,ba19c28ce37babb3,start X-Google-Attributes: gid103d82,public X-Google-Thread: 10d04f,ba19c28ce37babb3,start X-Google-Attributes: gid10d04f,public X-Google-Thread: 10461e,ba19c28ce37babb3,start X-Google-Attributes: gid10461e,public From: arms@cs.ualberta.ca (Bill Armstrong) Subject: How to get into Adaptive Logic Networks (ALNs) Date: 1995/08/12 Message-ID: <40grpc$ics@scapa.cs.ualberta.ca> X-Deja-AN: 107982668 organization: Computing Science, U of Alberta, Edmonton, Canada keywords: approximation of continuous functions, neural nets, prediction newsgroups: comp.ai,comp.ai.neural-nets,can.ai summary: A simple intro to ALN concepts and programs