Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Artificial neuron
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Pseudocode algorithm== The following is a simple [[pseudocode]] implementation{{Citation needed|date=September 2024}} of a single Threshold Logic Unit (TLU) which takes [[Boolean data type|Boolean]] inputs (true or false), and returns a single Boolean output when activated. An [[object oriented|object-oriented]] model is used. No method of training is defined, since several exist. If a purely functional model were used, the class TLU below would be replaced with a function TLU with input parameters threshold, weights, and inputs that returned a Boolean value. '''class''' TLU '''defined as:''' '''data member''' threshold ''':''' number '''data member''' weights ''': list of''' numbers '''of size''' X '''function member''' fire(inputs ''': list of''' booleans '''of size''' X) ''':''' boolean '''defined as:''' '''variable''' T ''':''' number T '''β''' 0 '''for each''' i '''in''' 1 '''to''' X '''do''' '''if''' inputs(i) '''is''' true '''then''' T '''β''' T + weights(i) '''end if''' '''end for each''' '''if''' T > threshold '''then''' '''return''' true '''else:''' '''return''' false '''end if''' '''end function''' '''end class'''
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)