Popular recipes tagged "meta:loc=206"http://code.activestate.com/recipes/tags/meta:loc=206/2014-06-16T13:20:01-07:00ActiveState Code RecipesKIndex for SOM neural networks (Python) (Python)
2014-06-16T13:20:01-07:00Roberto Bellohttp://code.activestate.com/recipes/users/4189498/http://code.activestate.com/recipes/578893-kindex-for-som-neural-networks-python/
<p style="color: grey">
Python
recipe 578893
by <a href="/recipes/users/4189498/">Roberto Bello</a>
(<a href="/recipes/tags/cv/">cv</a>, <a href="/recipes/tags/data_mining/">data_mining</a>, <a href="/recipes/tags/means/">means</a>, <a href="/recipes/tags/neural_network/">neural_network</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/som/">som</a>).
</p>
<p>Achieved cataloging into groups by a SOM neural network, the question arises
whether or not there is knowledge in the groups, namely whether the groups are between them
distinct and have homogeneous characteristics within each group.
The use of the coefficient of variation (CV) can be of help.</p>
<p>KINDEX (Knowledge Index) is an index that measures how much knowledge is
contained in the groups obtained from the SOM neural network: in the case KINDEX
reaches the maximum value of 1, each group would consist of records with constant
values in all the variables / columns, and each group would be quite distinct
from other groups.
KINDEX is calculated using the weighted-average CV of variables / columns
groups, comparing them to the CV of the variables / columns of the input file before
cataloging.</p>
Huffman coding, Encoder/Deconder (Python)
2009-01-04T04:11:37-08:00Shao-chuan Wanghttp://code.activestate.com/recipes/users/4168519/http://code.activestate.com/recipes/576603-huffman-coding-encoderdeconder/
<p style="color: grey">
Python
recipe 576603
by <a href="/recipes/users/4168519/">Shao-chuan Wang</a>
(<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/compression/">compression</a>, <a href="/recipes/tags/decompression/">decompression</a>, <a href="/recipes/tags/huffman_code/">huffman_code</a>).
Revision 2.
</p>
<p>Please refer to wikipedia: <a href="http://en.wikipedia.org/wiki/Huffman_coding" rel="nofollow">http://en.wikipedia.org/wiki/Huffman_coding</a></p>
<p>Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol. It was developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".</p>
CallQueue: Easy inter-thread communication (Python)
2006-04-22T08:52:08-07:00R Khttp://code.activestate.com/recipes/users/2810477/http://code.activestate.com/recipes/491281-callqueue-easy-inter-thread-communication/
<p style="color: grey">
Python
recipe 491281
by <a href="/recipes/users/2810477/">R K</a>
(<a href="/recipes/tags/threads/">threads</a>).
Revision 2.
</p>
<p>A framework for easy (2-way) inter-thread communication resembling normal function calling.</p>
<p>Especially useful for non-blocking UI techniques and for load distribution on jerky resources. Can replace stiff Queue.Queue techniques in most cases - making threading code more readable and functional.</p>
<p>CallQueue lets you express function directly in local context, but execute things in a target thread. It focuses naturally on 2-way communication (with return value responses) and includes a fluid concept for inter-thread exception (transfer) issues. Supports also multi-producer, multi-consumer communication.</p>
<p>A target thread just has to do callqueue.receive() periodically without worrying about any data passing. Thus CallQueue also supports naturally a high-level bulk threading concept with anonymous "default consumer threads": Allocated "thread resources" can be thrown efficently on bunches of jobs.</p>
Install LTPA config details into WAS. (Tcl)
2005-10-18T23:12:15-07:00Patrick Finneganhttp://code.activestate.com/recipes/users/1220635/http://code.activestate.com/recipes/442456-install-ltpa-config-details-into-was/
<p style="color: grey">
Tcl
recipe 442456
by <a href="/recipes/users/1220635/">Patrick Finnegan</a>
(<a href="/recipes/tags/websphere/">websphere</a>).
</p>
<p>Install LTPA config details into WAS.</p>