Netlogo lput2/19/2023 In this way, starting from a initical distribution of weights (usually, a random one), SOM network tends to approximate a stable weights distribution. Roughly, since there is no goal vector to approximate, what we will do is, where the nodes of the of the network have weight vectors coincident with original vector, the surrounding learning nodes tend to approximate their respective weights to the same value. The training vectors will be stored in a global variable: TSet stores the Training Set In our first NetLogo implementation we will make use of patches as training nodes, and we will store in a custom variable the weights of the connections with the 3 input nodes (3D, RGB colors). In this way, if the input layer has size \(n\) (the dimension of the original space), then every weight vector, \(W\), will have dimension \(n\). In fact, as we don't mind the geometrical or topological representation of input nodes, it is usual to work only with the representation of learning nodes, and hence the weights are shown as vectors in these nodes (every element in this vector is the weight of the connection with the correspondent input node). As in other similar models, the idea of the algorithm is to find correct weights for the connections between to give a correct representation of the input data in the geometrical structure of learning nodes. Next figure shows a possible 2D architecture for a SOM training. Also, there exist connections between all the nodes of both layers. SOM algorithm has a 2 layer network architecture: we have a learning nodes layer, which we mind the geometrical-topological relation between them, and that finally will contain the information about the resulting representation and we have one more layer with the input nodes, where the original vectors will be feeded to the network during the training process. From a technical point of view, it considers a network of nodes in a similar way as artificial neural networks. In the obtained 2D representation, similar colors are located in adjacent regions.Īs machine learning algorithm, SOM is in the smaller bag of unsupervised methods, what means we have no feedback about a goal to require, but it provides a distribution of the vectors considering their similarities. Next figure show a trained SOM to recognize the 8 colors from the left. One important fact in Kohonen technique is that we also obtain some conservation of topological properties from the original data.Ī tipical example to see SOM working is based in the projection of colors (associated to 3D vectors from, for example, the RGB components) to a 2D space. In general, different techniques to reduce vectors dimensionality are data compression techniques also known as Vector Quantization. Using who numbers in NetLogo almost always makes your code harder and more complicated to write - rarely easier.Self Organizing Maps, or SOM, were created in 1982 by Teuvo Kohonen, professor from the Finland Academy, and provide a way to represent multidimensional data (vectors) in lower dimensional spaces, usually 2D. It's best to avoid using who numbers at all. Why not set expert? true? If you really need to use an integer here, then you should remove the question mark from the variable name. In NetLogo, it's only idiomatic to end a variable with a question mark if it contains a true or false value. Though if you want all of the turtles who are part of the question to set expert? to 2, then it's easiest to do it all at once like this: ask question [ĭone! No need for if or member? or a loop. You can make your question with n-of: set question n-of turtles 10Īnd then a turtle can check if it's in the question with member?: if member? self question Using agentsets is generally good style in NetLogo and usually easier than alternative approaches. Very much appreciate any advice you can give me!Įasier if you use an agentset instead of a list. What I intend is, if a turtle ID is ANYWHERE in array, THEN : to give-an-answer My concern is if it is looking for an exact match of the question array with the turtle ID, a match will never be found. the comparison, I have written the following but I'm unsure if this will work. And I'm definitely not asking you to write the proc for me but what I could use some advice on the right direction / commands to try.įor 2. ![]() This is my first time using NetLogo, so I apologise for the ignorance. ![]() how to compare that against the turtle IDs.how to create the random array for the question (global variable) and.I then want to ask turtles with IDs that are contained in the question to answer it. Each turtle represents a unique domain of knowledge (1, 2, 3, 4, 5.) and each question contains a random subset of domains, e.g., (3 5 8). I am trying to create a model in which a question is posed to turtles.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |