pax_global_header00006660000000000000000000000064127010073410014505gustar00rootroot0000000000000052 comment=dd0570b229c0a552dcb1b2ca7f8f81daa7681fcd python-cluster-1.3.3/000077500000000000000000000000001270100734100145115ustar00rootroot00000000000000python-cluster-1.3.3/.gitignore000066400000000000000000000001011270100734100164710ustar00rootroot00000000000000*.pyc /*.egg-info /MANIFEST /build /dist /docs/_build /env /env3 python-cluster-1.3.3/AUTHORS000066400000000000000000000001101270100734100155510ustar00rootroot00000000000000Michel Albert (exhuma@users.sourceforge.net) Sam Sandberg (@LoisaidaSam)python-cluster-1.3.3/CHANGELOG000066400000000000000000000037511270100734100157310ustar00rootroot000000000000001.2.1 - Fixed an issue in multiprocessing code. 1.2.0 - Multiprocessing (by loisaidasam) - Python 3 support - Split up one big file into smaller more logical sub-modules - Fixed https://github.com/exhuma/python-cluster/issues/11 - Documentation update. 1.1.1b3 - Fixed bug #1727558 - Some more unit-tests - ValueError changed to ClusteringError where appropriate 1.1.1b2 - Fixed bug #1604859 (thanks to Willi Richert for reporting it) 1.1.1b1 - Applied patch [1535137] (thanks ajaksu) --> Topology output supported --> data and raw_data are now properties. 1.1.0b1 - KMeans Clustering implemented for simple numeric tuples. Data in the form [(1,1), (2,1), (5,3), ...] can be clustered. Usage: >>> from cluster import KMeansClustering >>> cl = KMeansClustering([(1,1), (2,1), (5,3), ...]) >>> clusters = cl.getclusters(2) the method "getclusters" takes the amount of clusters you would like to have as parameter. Only numeric values are supported in the tuples. The reason for this is that the "centroid" method which I use, essentially returns a tuple of floats. So you will lose any other kind of metadata. Once I figure out a way how to recode that method, other types should be possible. 1.0.1b2 - Optimized calculation of the hierarchical clustering by using the fact, that the generated matrix is symmetrical. 1.0.1b1 - Implemented complete-, average-, and uclus-linkage methods. You can select one by specifying it in the constructor, for example: cl = HierarchicalClustering(data, distfunc, linkage='uclus') or by setting it before starting the clustering process: cl = HierarchicalClustering(data, distfunc) cl.setLinkageMethod('uclus') cl.cluster() - Clustering is not executed on object creation, but on the first call of "getlevel". You can force the creation of the clusters by calling the "cluster" method as shown above. python-cluster-1.3.3/INSTALL000066400000000000000000000010211270100734100155340ustar00rootroot00000000000000INSTALLATION ============ Simply run:: pip install cluster Or, if you run it in a virtualenv: /path/to/your/env/bin/pip install cluster Source installation ~~~~~~~~~~~~~~~~~~~ Untar the archive:: tar xf Next, go to the folder just created. It will have the same name as the package (for example "cluster-1.2.2") and run:: python setup.py install This will require superuser privileges unless you install it in a virtual environment:: /path/to/your/env/bin/python setup.py install python-cluster-1.3.3/LICENSE000066400000000000000000000635411270100734100155270ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! python-cluster-1.3.3/MANIFEST.in000066400000000000000000000001251270100734100162450ustar00rootroot00000000000000include README.rst LICENSE CHANGELOG include cluster.bmp include cluster/version.txt python-cluster-1.3.3/README.rst000066400000000000000000000043421270100734100162030ustar00rootroot00000000000000DESCRIPTION =========== .. image:: https://readthedocs.org/projects/python-cluster/badge/?version=latest :target: http://python-cluster.readthedocs.org :alt: Documentation Status python-cluster is a "simple" package that allows to create several groups (clusters) of objects from a list. It's meant to be flexible and able to cluster any object. To ensure this kind of flexibility, you need not only to supply the list of objects, but also a function that calculates the similarity between two of those objects. For simple datatypes, like integers, this can be as simple as a subtraction, but more complex calculations are possible. Right now, it is possible to generate the clusters using a hierarchical clustering and the popular K-Means algorithm. For the hierarchical algorithm there are different "linkage" (single, complete, average and uclus) methods available. Algorithms are based on the document found at http://www.elet.polimi.it/upload/matteucc/Clustering/tutorial_html/ .. note:: The above site is no longer avaialble, but you can still view it in the internet archive at: https://web.archive.org/web/20070912040206/http://home.dei.polimi.it//matteucc/Clustering/tutorial_html/ USAGE ===== A simple python program could look like this:: >>> from cluster import HierarchicalClustering >>> data = [12,34,23,32,46,96,13] >>> cl = HierarchicalClustering(data, lambda x,y: abs(x-y)) >>> cl.getlevel(10) # get clusters of items closer than 10 [96, 46, [12, 13, 23, 34, 32]] >>> cl.getlevel(5) # get clusters of items closer than 5 [96, 46, [12, 13], 23, [34, 32]] Note, that when you retrieve a set of clusters, it immediately starts the clustering process, which is quite complex. If you intend to create clusters from a large dataset, consider doing that in a separate thread. For K-Means clustering it would look like this:: >>> from cluster import KMeansClustering >>> cl = KMeansClustering([(1,1), (2,1), (5,3), ...]) >>> clusters = cl.getclusters(2) The parameter passed to getclusters is the count of clusters generated. .. image:: https://readthedocs.org/projects/python-cluster/badge/?version=latest :target: http://python-cluster.readthedocs.org :alt: Documentation Status python-cluster-1.3.3/cluster.bmp000066400000000000000000003504361270100734100167050ustar00rootroot00000000000000BMÑ6(˜èÐ  jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj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¥c¥c¥c¥c¥c¥c¥c¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c999¥c¥c¥c999999999999999999999999999¥c¥c¥c999999999999999999999jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c999ÿÿÿ999„„„ÿÿÿÿÿÿÿÿÿ„„„„„„ÿÿÿ„„„ÿÿÿ„„„„„„ÿÿÿÿÿÿÿÿÿ999999ÿÿÿ999¥c¥c„„„ÿÿÿÿÿÿÿÿÿ999„„„ÿÿÿÿÿÿÿÿÿÿÿÿ999¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c999ÿÿÿ„„„999999999ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ„„„„„„„„„999999ÿÿÿ999999ÿÿÿ„„„„„„„„„999999ÿÿÿ„„„999„„„ÿÿÿ999¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c999ÿÿÿÿÿÿÿÿÿÿÿÿ„„„999ÿÿÿ999999ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ„„„ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ„„„ÿÿÿ„„„999999ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ„„„ÿÿÿ999„„„ÿÿÿ999¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c999ÿÿÿ„„„„„„„„„ÿÿÿ„„„ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ999999999ÿÿÿ„„„ÿÿÿ„„„„„„„„„ÿÿÿ„„„ÿÿÿÿÿÿ„„„„„„ÿÿÿ„„„ÿÿÿ„„„„„„„„„ÿÿÿ„„„ÿÿÿ„„„„„„ÿÿÿÿÿÿ999¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c999ÿÿÿÿÿÿÿÿÿÿÿÿ„„„„„„ÿÿÿÿÿÿÿÿÿ„„„999ÿÿÿ999999ÿÿÿ999„„„ÿÿÿÿÿÿÿÿÿ„„„999ÿÿÿ„„„ÿÿÿÿÿÿ„„„„„„ÿÿÿÿÿÿÿÿÿ„„„„„„ÿÿÿÿÿÿ„„„ÿÿÿ999¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c999999999999¥c999999999999¥c999999999999999999999999999999999999999ÿÿÿ999¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c¥c¥c999¥c¥c¥c¥c999¥c¥c999999999999999999999999999ÿÿÿ999¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c¥c¥c999ÿÿÿ999¥c¥c¥c¥c999ÿÿÿ999¥c¥c999ÿÿÿ999999ÿÿÿ999999ÿÿÿ999„„„ÿÿÿÿÿÿÿÿÿ„„„999ÿÿÿ999999ÿÿÿ999999¥c¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c¥c999ÿÿÿ999¥c999ÿÿÿ999¥c999ÿÿÿ999999ÿÿÿ999999ÿÿÿ„„„ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ999„„„ÿÿÿ999¥c¥c¥c¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c¥c999ÿÿÿ„„„999999„„„ÿÿÿ„„„999ÿÿÿ999999ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ999999ÿÿÿ„„„ÿÿÿ999„„„ÿÿÿÿÿÿ999¥c¥c¥c¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c¥c¥c999ÿÿÿÿÿÿÿÿÿÿÿÿ„„„„„„ÿÿÿ„„„ÿÿÿ„„„999ÿÿÿ999999ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ„„„ÿÿÿ999999ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ„„„ÿÿÿ999¥c¥c¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c¥c999ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ„„„„„„ÿÿÿ999999ÿÿÿ999999ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ999999ÿÿÿ„„„ÿÿÿÿÿÿ„„„999ÿÿÿ999¥c¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c¥c¥c999ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ999999ÿÿÿ999999„„„ÿÿÿ„„„999999ÿÿÿ999999ÿÿÿ„„„ÿÿÿ„„„999„„„ÿÿÿ„„„ÿÿÿ„„„999ÿÿÿ999¥c¥c¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj¥c999ÿÿÿÿÿÿÿÿÿÿÿÿ„„„999ÿÿÿ999999ÿÿÿ„„„ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ„„„ÿÿÿ999999ÿÿÿ999„„„ÿÿÿÿÿÿÿÿÿ„„„999ÿÿÿ999999ÿÿÿ999¥c¥cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj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jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk n n l kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk np o onn m m m l l l l l l l l l l l l l l l l l l l l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl l l l l l l l l l l l l l l l l k kkkkkkkjjjjjjjjkk l l nnoo p q r r r q p onn m m m m m m l l l l l l l l m n kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk k k k k k k k k k k k k k l l l l l l l l l m m n n n m m m m n n nnnnoo p r stutsq o nm l l l l l l k k k k k k k k l k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkkk k k k k k l l m noooonnnnoo p p p p p q suwyy xvtq om l k k k k k kkkkkkkkk kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkk l n op r rrrq p p p q rsttssuvy|$~"(~#)}!'z"wsp n l k kkkkkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkk l n o r uvwxwvuttuwyy y yxyz"}!'€',*0€).)/%+{#vr om l k kkkkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkk l m o rvz!} &~#)$*~"(|$y xyz"|%~#)$*$*~"(} &} &~#)(.‚+1x#)lx#)).~"(xsp n l k k k k k k kkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkk l nq uz"€%+„-3†16‡27…/5ƒ*0$*}!'}!'$*‚)/‚+0*0ƒ,2ƒ,1(.'-(.„-3ƒ.4lUl*/$*y tp n l l l l l l k k k kkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkk m o sy$*…/4ˆ5;†6;‡7<‰8=ˆ4:….4‚)/‚)/„,2„/4y%+lz',†17†06„-3„-3†06†28z(-ly&+‚+1$*y tp nm m m m n m m l l k kkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkl n p u{#‚)/†38z+1cc{.3‹CŽ=BCŒ:?Œ;@Ž>C’DI•JO˜NS˜OT—NS–KP”HM“FK‘DIBGŽ>C‹9>‡28ƒ*0~#){#yxy {#}!'%+%+~#)|$wtp n l k kk jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkk l m or v|$(.ˆ39Ž>C“FK–KP—MR–KP’EK‘BG?D?D‘CH•JO™QVœUZ™TY–QV™TX›TY™QV”KOEICH@EŒ;@ˆ4:„-3'-~#)~"($*(.„,2„/4ƒ-3ƒ,2(.|%wrol k k k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkk l np sw|%(.‡17‹9>AF“GL•IN‘GLBGBG‘DI“FK•JO™QVžY^[_†FJn/3…EI[`›X\ƒ>Cm'+8=’HL“FK?D‹9>ˆ38….4„-3…/5ˆ4:ˆ6;{+0l"z(-„.4€&,y tp m l k k kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkk l n o rvz!~#)ƒ*0‡17‹8=Ž>C‘CHDI38m"'38‘FK–LQ™QVžY]¢af_co26A n26_c›\`n-1Gm)-“MQ—OT’GLŒ>C‹Ž=B@FŒ>Cm!&Nm#'FK™QUœV[[__c ei‹RVo6:ŠQT¥im£fj†FKm,1„BF›W[™TX‚;@m$)38AF‘CH’DI•IN”JO9=m$)~38Š:?….4} &vq n l k k l k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkl l nq uy ~"(ƒ*0…/5…27‰7<Œ;@Ž=B?D>C}16m!&5:”JOšRWšUZ†EIn15‰OS£ko¤mp¨ps¬qu©lp¡bf›Z^\a¡_c™VZn*.Im%*FK–KP—MR™QVœUZ™TX”NR’HM?E†06}!'vq n l k k l m kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkk l np tx}!'‚*0…06z(.l"{+0Š:?CŒ=BŒ?DDI–LQ™QV•PUn-1C n37£jn®vy®ux¬qt©lp¦hl¤cg£bf£ae\`…CGm*.‚=A–OS™QVšRWœV[šVZ—TX™TX—NS@E†06}!'vp n l k k l l kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkk l n p sw|%(.‡27†5:m"Qm#‰9>Bj(,€;?“JO@E…/5} &vp n l k k l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkl m or v{#€&,†06‹9>Œ‹9>Œ;@?D‘CH”HM—MR™QV™SX˜UYŸ_c¦hl¤gk‰MQn26ˆKO¢dh¥fj¤dh£bgž^bšX]›X]žY^œUZšSX›UY‘LQa"H b!ŒBG=B„-3|$up n l k k l kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkk l n p uy $*….4Š7<Ž>C‘BHAF‹=B?DŽ>CŒ;@‹9>Œ:?Ž=B@E‘DI”GL–LQ˜OTšSXœW[ ]a£bf^bo26A n26Ÿae§im¥fjŸ_c†EIn,0„@E˜SWšSX™PU™QUHMb!Jb‰=B‹8>ƒ*0{#up n l k k k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkk l orw|%‚*/†17‡6;>D‘CH’DIBG@EŽ>CŽ=BŽ=B?D‘BG’EK‘EJEI“JO˜NS™QV›TYX]¡^b `dˆJNn26ŠOS¤hl©lp§hlœ\`n-1G n).“MQ˜OT–KP–KP‘GL}38j %{05Œ•MQ™QVšSXœV[Ÿ[`¢af¢cgŸcg eh dh¤gk¦hlŸ_d…DHn*/ƒ=B•MR•JO“FK‘CHBGŽ@E‹CŽ>C@EŽAFBG”JO™QV“LPm',J n',“LPšSW›TYœVZŸ[_£ae¦gk£gk‰MQn26ˆKO¡af¢afœY^–QV–OT—MR“GL@EŠ8=‰6;‡17ƒ+1$*z"vro n l l kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkl m p sx~"(*0x$)m z).‰8=Œ:?Œ:?Cn)-‚ˆ39….4ƒ+1ƒ+1„-3„/5y%*lx#(€(.}!'wso n n k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkk k k l l l l l l k k k k k k kkkkkkkkkkkkl m oq svy z"|$|$|%}!'$*‚)/….4ˆ49‹9>Ž>C‘CH“GLEIm#(M m"'Œ?D‘BH‘BG’DI•IN—NS›TXX]¡^bšY]n.2D n.2˜VZœV[˜OT”HM’DIAFŽ>CŒ:?Š6<‡17….4„,2„-3….4ƒ-3‚+1*/%+{#vr om n l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkkkkk k k k k l l l m m n n m m l l l l l l k k kkkkkkkkkk l n p sw{#~"(%+€&,€&,€%+'-ƒ+1†05‡39‡6<Œˆ4:….4‚)/€%+}!'z"wtq om l m m kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkkk l l m m n nnop q rsttssr r q p p onm l k kkkkkkkl m o sw}!'€(.x"(ly%+†17‡28‡28‰6;ˆ7‡17‚)/~"(z!wsq om l l l n l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk k l m nop p p q r suwyz!y ywwvvutrp om l k kkkkkkl m o sy~#)(-lUl„06ˆ38ˆ4:‹8=Œ=B~38m%*‚B—PU™QV˜NS—MR”JO9>m&+:?”KO“FKC•JOœV[¢`e `d†FJn+0‚;@’HM‘DI@EAFBG5:m%*:?–NS—NS”IN’DI‘CH’EJ”HM”KO’KP—PUšSW™QV˜OT˜OT˜OT–NS“MQ—QU•NSŽDIŒ=C‡28€&,z!tp n l k kk l ol jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk l l n o r uy|%$*€&,'-€&,€&,(.„,2„/4y%+lz(-ˆ6;Š7<Š6<‰5;‡49„05„.4‚*0}!'xsp n l k kkkkk l n p swz"}!'$*$*$*$*(.…/5Œ;@•JOžY]£cgž`dn/3F n(-EJ‘CI@EAFŒ?Dm"'L m%*FK”GLAFm"'|.3†28(.z"up n l k kk l m jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl m m np ruy ~"(‚)/ƒ,2‚,2„/4….4….4….4‡27„16l!Sm"‰9>?D?DŒ=C|.3l#{+0†28ƒ+1|%vr ol k kkkkkl m oq svxy z!z!{#~"(„,2‹9>”HM™TYœ[``d‡IMm-1ƒ=B’HL‘CH?D@EAF49m#(6;‘EJ‘BGŒ;@Š7<‰5;Š7<ˆ38'-z!tp m l k kkkkk l m np r stuuw{#(.Š7‰:??D’DJ”HM–LQ”KP:?m'+€8=‘EJCm&+G n-2šX\W\—MR‘BGC’DI•JO–LQ–KP“FK@EAFCH49m"'~16Œ=CŒ;@Š7<Š6<Š7<Œ;@?D‘CH“GL–LQ™QVœV[›W\—TXšUZ˜PU‘DI‰5;€&,yso m l kkkkkkk l l m m n op sw~"(†05Œ?D“FK–LQ—MR—MR•IN’DI‘BGAGŽAFŒ?DDI”HM•IN”HMCH‹>C‹ˆ39…/5„,2ƒ+1ƒ*0(.$*|$wsp n l k kkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjknrrtw|$€&,….4Š7Ž=B‘BG“GL—MRšSXžY^¢_c¤dh¤ei\a–QU’GLŒ;@ƒ+1{#up n l k kkkkkkk k k l l m nq u|$„,2Œ;@DI’IN–OT™PU”HM?D‹8=‰5;‹9>?EDIDIŽFK”KP–LQ•JO•IN‘FK€6;m$)€8=”LP—MR•JO“FKAFŒ;@ˆ4:„-3'-~#)}!'|%{#y vtq om l kkkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl p sux|%(.‡17Š9>Œ>C’HMšSXX\žZ_žZ_X\šRW–KP’DI?DŽ=BŽ>C‘BG”HM—NSœUZ \`¤cg§im©mq¥hlˆJNn,09=Œ=C†06~"(wrom l k kkkkkkkk k k l n p tz!(.Š6<‘CH•JO—MR•JO‘CHŒ:?‰5;ˆ4:‹8=Œ=B|05cb ~7;”LP˜NS—NS‘INm',I n).”NSšRV–LQ“GLAFŒ:?ˆ39ƒ+1~#){#ywvtrp om l k kkkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkn r ux|%‚)/ˆ39‹:@~27m%*ƒ?CœZ_Ÿ^b›Z^ž]a¡^cžY^šSX–LQ“GL’EJ“FK•IN”LP•OT[_¥ej¥hl¢hl¨or¢ilo37D m'+Œ?D‰5:€&,y tp n l k kkkkkkkkkk l m o sy€%+‡28Ž>CBGBGBGŽ?DŠ7<‡28‡28Š7<‰9?i#M K j"'‘HM—NS˜PT—QUƒ?Cm+/„BG›X\œW[™PU•JO‘CHCAFm%*H m-1˜Y]‡JNn15‡IM ae¢`ešV[”MR”KP—MR˜OT–NS‚=Bn,0‡HM¡eiŠRUo8<ŒVY¥nqŠOSn/3ƒ>CDI‹8=ƒ*0|$vro m l k kkkkkkkkkk l orw~"(….4‰7<|.3l$|.3‰8=ˆ49…/5…/5ˆ38‰8={-2cc|27‘GL–KP˜NSšSXšV[•SW•UYœZ^žZ^›TY—MRCH‰:?‡5:„-3$*y ur p nm l l k kkkkkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl p v|$€&,‡38Ž=B“FK”KO‚=An,0‡HLš]an26A o26žae ae…DIn+0‚=B˜QVœVZ•PUn+0D n26šadn8<; o:>¦pt§mq_c™UY•JO?EAF@EAF‘BH?DŒ;Aˆ6;„05ƒ,1€&,{#vr ol k kkkkkkkkkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjp v|%ƒ+1…06|,1m %5:”JO›TXW\œY]šY^¡af¨jnªnr«os§lp¡gk§lp©mq©lp¦gk¥ei¤dh¤dh¥ei§hl©lp«ps§mq‡OS_&*`%)ƒDHœY^›UYŽCHm"Vƒ*0|%wrol k kkkjjjkkkkl m oq svxyxwusr q r suwz!}!'(.…/5Š6<Œ;@Ž=B=BŒ:?Š6<‡28…/5„-3‚)/$*|$wsp n l k kkkkjjjjkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjp w}!'„,2‰5:‹:@Œ>CEJ–LQšRW™TX„AEn-2ˆIM£gk«pt¦lpŠPTo59ŠOS¥jn©mq£fj_c¡bf¥fj§hl¦hl©koªnr¡fjj04@ A j,0˜V[›UY’GL|-2lƒ+1} &wrol k kkkjjjkkkkk l m op r sssrp o ooop ruy} &(.†05‰6;‹9>‹8=‰5;†06ƒ+1€&,~#)} &|$y wsq om l kkkkkjjjjkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjp w}!'ƒ*0ˆ39=B‘CH“GL–LQšRV•OTn,0D n15 ei«qu¢ilo59? o48 ei¤hlˆKOn26ˆLP¢ei£fjŸae¤gk©mq¤im…KO`%)`$(ƒDH[_œV[–KPŒ=B„16ƒ*0|%vr ol k kkkjjjkkkkkk l m n oo p o onm m l m op ty~"(ƒ*0…06…27ˆ5;‰5:…/5(.}!'z"xvutrp om l k kkkkkjjjjkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjo u|%(.ˆ39C“FK–LQ™QVW\Ÿ[_ž^b_c¤hl¦ko¢il¦ko¤hlŸbf¢cg¤ei `e†GKn04ˆKO›`dn37@ o37 dh©mqªnr©mq¨jn¦gk¢aeX]˜PT’DI‹8=ƒ+1|$vq nl k kkkjjjkkkkkkkk k k l l l k k k k k l n p ty $**/lUl‚,2(.|%wsp o nn m l l k kkkkkkkjjjjkk l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl p w€&,‡28Œ=BŽDI–OSW\ ]a£ae¥ei§im¤hlŠNRn37‰MQ£ei¥ei£ae¡^b ]b[_›[_¢cg£fj‰MQn26ˆMQ¤hl©lp©mq©lp©ko§hl `d™VZ˜QV•INŽ=B….4}!'vr nl k kkkjjjkkkkkkkkkk k k k k kkkk l m o sx~"()/x#(lx#(*/~#)y uq om l l l k k kkkkkkkkjjjjkk l kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk ov$*†28}/4m%*„@Dž\`¤dh¦gk§im¨koŸaen26B n04›Z^¡_cŸZ_W\œV[žY^¡^b£cg¥fk£eiŸae£fj§jn¤fkŸae£fj¨jn£fj‡IMn-2ƒ?D•LQ‘CHˆ39$*xrol k kkkjjjjkkkkkkkkkkkkkkkkkl m orv{#%+).€).)/%+|$wso n l l k k kkkkkkkkkkjjjjkk l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkn s} &ƒ.4l$J n-1œ^b¡dhŸae£ei§im¢cg‡HLn/3†EIœY]žY^œUZšRWšRW›TYžY^¡^b£cg¥fj¥fj¦gk¡bf‡IMn/3ˆJN¢dhžaen15D n-1”NS”HM‹8=(.z!so m k kkkjjjjjkkkkkkkkkkkkkkkkk l np tw{#}!'~#)}!'{#wsp nl l k kkkkkkkkkkkjjjjjkk l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl r{$„/5}05m(-‡GKžaeˆMQo37ˆKO¢dh¤eiŸ^b™W[›X\X]œV[šRV™PU™PUšRW›UZšV[˜VZ\`£bg£cgšZ^n-2E n.3œ]a afˆIMn04†EI•PUEIC‡5;†06$*yso m k kkkjjjjjjjkkkkkkkkkkk l m op rsttsr p o onnnnn n m l l l k k kkkkkkkkkkkkkk k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkm r x(.‰8=38m(,„BFŸ_c¦gk¡bf†FKn-2…CG›W[žY]œV[˜RV•OT™TXœUZ›TY™QV—NS–LQ–KP–KP–KP“INEJ‘FK’EK‘CHAF@EAF@EŽ=B‰6;„,2}!'wrol k kkkjjjjjjkkkkkkkkkkk l m oq tvxy ywusq p p p p p p p o nn l l k k kkkkkkkkkkkkk kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkm r x€&,„16m %L n)-˜VZ¢afœ\an04D n-2™W[ ]aŸ[`žZ^Ÿ[_žZ^žY]œVZ™QV—MR•IN”HM”HM‘FK5:m#(49CH‘CH@E?D?DŽ>CŒ:?ˆ39‚)/|$vr nl k kkkjjjjjjkkkkkkkkkk l m np tw{#~"($*~#)} &z!wussstuutsq p nm l l k k kkkkkkkkkkk kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl p v}!'ƒ,2|,1m!&€8=™TX¡_cŸ_d‡HLn04‡HLŸ_c£bf¢`d¢`d¢`d¡_dœY]–QV—PT—MR•IN“FK“GLŽCHm#(M m"'AF‘DI‘BG@FŒ=B‰9>‰7<‡27(.{#uq nl k kkkjjjjjjkkkkkkkk k l m np sw|$€&,‚+0+1ƒ,2ƒ*0€&,} &z"yyy z!{#z"z!wvsq o nn l l k k k k k k k k kkk k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk n sy €',†17ˆ9>DI™PUžY^¢af¡cgŸbf¤hl¨ko¨jn¦hl¦gk§im¢cg‡HLn-1ƒ?C•MR–KP“GL“GL‘FK5:m#(€6;‘EJ“FK‘CH>D|.3m#z).„/5(.{#up n l k kkkjjjjjjkkkkkkk l l m np rvz!%+‚+1y%+l z(-‡49†16„,2'-€%+€%+€&,(.‚)/‚)/€&,~"({#xusq p nm l l l l l l l k k k k k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl p uz"(.ˆ49Ž>C”HM›TY¡^c¡cg dh¦lp¬rv¬qu¥jn¡fj¥jn ein26C n,0”NS—NS•IN”HM•IN“INFK“IN•IN“FK‘CHŠC‹9>‰5;ˆ4:ˆ4:‰5;Š7<‡4:„16…06„-2'-}!'z"wusq o nm m m m n m m l l l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk n q v|%‚)/ˆ4:@E—NSšV[„EIj/3‡NR©ptªqu‹SVo7:‹RV£jnŠQTn26†FJšUZ™QV–KP•IN•JO—MR—MR–KP”HM’DI@E‹;@{*0l y%*‚+0~#)ysp m l kkkkjjjjjjkkkkk l m np rtvx{#$*„-3‡49|,2m %49’GL”IN“GL‘DI‘BH‘CH‘CHŽ@E|.3m#{*0ˆ5;‡28„,2'-}!'z"wurp o o o p p o on m l l kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl o sv} &ƒ+1‹8=“FK‘KP`!%@ _'* hl¥nqo7;= o7:£ko§nq dh aeŸ[`šSX–LQ•JO•JO“INFK‘FK’EJ@EŒ;@Š7=‡39‚-3‚*0€&,{#vr ol k kkkkjjjjjjkkkkl m oq svy{#} &~#)(.…/5Š8=>DŽDI•MQšSXœUZšTX–NS’JO•MR—NSGLm#(Om$ˆ9>Œ:?‰5;†16„,2€&,} &yusrrsstsrp on m l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl n p sy~#)‡17@FŽFKa $A _&* hk©pt‹RVo69ŠPT§mq«os£fj›[_›W\šRW–LQ•JO‘FK49m"'~16Œ=CŒ:?ˆ4:…/5„,2(.$*|$wsp n l k kkkkjjjjjjkkkk l n p sw{#~"(€&,(.‚)/„,2‡17‹8=‘BG–KP›UYŸ\`¢`d\`…DHm+/„@D™TX–OT8=m"'}16?D?D‘EJ€<@j+/…IM§mq¬qu¥imŸae¢dh§hl¡bf‡GKn,0ƒ=B•LQ•JO“GLŒ?Dm %Pm#†5:ˆ38„,2€&,~"(|$y vsq om l kkkkkjjjjjjkkkk l or v{#%+)/*0ƒ-3…/4…/5‡28‹8=AF–LQ™TX™W\¡af_cn04D m,1—SWšTX”KPŽCHAFAG@EŒ=B{+0l y%+ƒ,2'-} &z"z!{#}!'$*$*~"({#wtq p p njjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl m o r w~#)‡17AG•MR˜UZ¡af§im§im¥ei¢ae¡^bŸ\`—SWn)-J m$)ŽBG‘DIAFŒCŽ>C‰9>m"Slƒ.4ƒ+1€%+~"(~#)€&,ƒ+0ƒ,2+1‚+0€&,|$wsp p o jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl m np uz"ƒ*0‹9>”HM›TY›X\™W[œY^žY^›TY™PU—NS’HM5:m!&}05‹C’GL:?m',:?“JO”HM‘BG?D=BŠ9>‡5;‡49‡38…/5„,2ƒ+1‚*0(.$*|%yusp onm l l k kkkkkkkjjjjjjkkkl m o sy~#)‚+0y%*l z',†28‡17…/5‡28Œ:?AF9=n+0‡HM¥im¬qt¨lp¦fj \`™QV“FKŽ=BŠ6<ˆ39ˆ39ˆ49‡39…27†28‡27…/5….4…/5ˆ39‹8=‰9>l#Ql"ƒ/4‚)/{#vrp kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl m n p uz"(.‰5:‰:?m!&Nm!&‹CŠ6<‡17…/5…/5†05†16†16‡17‡17ˆ39Š6<Œ;@AFCH49m!&}/4‡5:ƒ+1|%vsp jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl l m orw} &ƒ+1†28{*/l"{+0‡49†06‚)/$*}!'} &|${#y xwvuusrp on l l k k kkkkkkkkkkjjjkkkkkkk l or v|$'-….4‡27ˆ39‡17….4„,2….4ˆ4:Ž>C•IN›UY¢`d¡cgˆLPn26ˆJNŸ^bžZ^˜OT’DIŒ;@ˆ4:†06….4„-3….4…/5‡28ˆ4:‹9>Ž>C’DI•JO˜NS•LQFKBGŒ;@„-3} &vsp jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl l l n p sx}!'‚*0ƒ-3‚-3ƒ-3ƒ+0€%+|$y wvvutsrr q p p onm l l k kkkkkkkkkkkjjjkkkkkkkk l nq uz"$*„,2‡17ˆ39‡28…/5….4†06‰5;Ž=B”HMšSX \a›[_n15A n26œ^b[`•OS’HLAF‹9>ˆ39…/5….4….4†06ˆ4:‹9>Œ—QVX]™TX’KP‘EJŒ;A….4} &wsp jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl l l l m oq twyy ywurp o onn n m l l l l l k k k kkkkkkkkjjjjjjjjjkkkkkkkl m or v{#€&,….4‡39†5:‰7<‹9>‹8=Œ:?Ž>CŽAFEI–OTŸ[`¢af¡bfŸae£gkžaen/3F n(-‘HM”GLAFC@EŽAF38m%*ƒ=BœY^£cg¦gk§im¨ko£ei†GKn,0‚=B–NS–LQDI‹=B‹}/4m %}16Ž@E‘DI’EJ‘EJ€7CŽ=BŽ=BŽ>CAF‘DI“FK’EK?Dˆ8=‡39ƒ+0}!'wso kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk k kk k l l m n noooooo p p p p onm l l k k k k kkkkkkkkkkjjjjjjjkkkkl m oq uy ~"(ƒ*0ˆ39Œ;@AFBGAFCH’DJ’DI’EJ”HM”LP•OTœZ^¤di£fj‰LPo15†FKœY^›UY—MR”HM’EJAG~16m %}05?D?DŽ=BCŒ:?‰5:„-3$*y uq n kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk k k k k l m n op p q q r rssttsrp o nm l l l l k k kkkkkkkkjjjjjjjkkkk l n p ty}!'‚*0‡38Œ;@‘BG“GL•JO•JO”HM’EJ‘CH’EJ•IN™QVX]£bf§im dho48A n/3˜TY™QU“GL@EŽ=BŽ>CŒCŽ>CŽ>CŽ>CŽ=BŒ:?‰5;….4€&,{#vrp l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk l k l l n op r suuvvwxyz!z!ywurp o nnn m l l k kkkkkkkjjjjjjjkkkk l or v|%‚)/…17ˆ7C‹9>‡28ƒ*0}!'xsp ol jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk l l m np r tvyz"|$|%} &}!'~"($*€&,€&,$*|%y vtrr p p on m l k kkkkkkkkkkkkjkkkl m o sx~#)ƒ,2{)/m %5:–NSšSW—PU’JN”KO•JO•IN•JO˜NS—QV™VZ¡bfªnr¬rv¢hl—\`›\`œX\–KPŽ>CŠ7<ˆ4:‰5;Œ:??D’DI“FK‘FKŽDI’HL•JO•INCH‹=BŠ9>‡38(.|$vro n l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl m n o q svy } &€%+‚)/ƒ+1„,2„,2„-3….4…/5„/5ƒ-3ƒ,2‚*/~#){#xvvusrp om l k kkkkkkkkkkkkkkkl m o sy %+‚-3l"Om%*”NR™TX‚=Bm(,:>”LP˜NS˜OT–OTƒ?Cn-1ˆIM¤hl§mqŠOSn26†EI˜RV”HM•LQ”KP49m %|+1…17(.{#vq nm l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl np ruy} &'-….4ˆ39‡5:†4:‰8=‹9?‹9>‹9>‰8={*/l!z'-…17„-3€&,~"(|%{#z"yvtq om l k k kkkkkkkkkkkkkl m o sy$*ƒ-3{+0m!&8=˜RV–RWm).I m(,“LPšRW›TY–QUn+0E n04ŸaeŸcgn15D n*.‘HM‘CIŒ;@Š6<Š6<Œ:?Ž?D’EJ•JOGLn&*K n'+“LP’JOm#(Pl!ƒ.4'-z"up n l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjn p sv{#€%+„-3‰5;=B?D}16m!&~27AF‘CHBG‹C™SXW\žY^šW[„BGn-1†FJ `dž^b…CGn).9>DI?D‹9>Š7<‹:?‹DŽ=B‹8=‰5;ˆ49…06‚,2‚+0€'-|$wsp nm l l k k kkkkkkkkkkk l n p ty $*…/5Œ:?’EJ˜NS›TY™TY–RWšVZžY^ŸZ_Ÿ[`Ÿ\`œY^˜VZœY^Ÿ[`W\—PTEJBGŽ>C‹9>Š6<‹8=‹:?}/5m!&€6;“JO—MR’HMŽDIEJ’EK‘BH‹C‹:?{*0l y%+‚+1%+z"vrp on m l l k kkkkkkkkkkl m or v{#'-‡28Ž=B”HM™PU›UZX\ŸZ_ŸZ_žZ^›W\—TXšW[Y]W\šRW—MR“GLAFŒ;@Š6<ˆ39ˆ4:‹9>‰:?m %Nm$)FK•JO“FKAGŽ>CŒ:?Š7<ˆ38„-3'-} &xtp n l l l jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjosw~"(…/5Š9>|16j#(€=Až]a¤ei¡afœ[`œZ_œW\™QV–KP•IN•IN•JO–KP•JO“GL’EJ‘CH‹C—PU˜PT•JO’DIŽ>C‹9>ˆ4:†06†06ˆ39Œ:?>D38m#(€7;’HM“FK@E‹9>ˆ4:…/5ƒ*0€&,~"({#wtq om l l k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk q ty €&,ˆ49ˆ:?cH a $˜Y]§im§imŸ`d™W[™TY˜PU–KP“GL“GL”HM’GLŽDI‘FK“GL“FKBG}05l#|,1‡49…/5€&,|%y wvtrp om l k kkkkkkkkkk l np uy €%+‡17‹:?~27m$):?˜QVœW[”NSm',Jn'+‘HM•IN’EJ?DŒ:?‰5;‡17….4…/5ˆ39Œ;@‘CI’HM‘HM”JO•JO’DICŒ:?‰6;‡28…/5‡17Š6<Ž>C“GL—MR™QV™QV–LQ’EJ@E‘FK’JO˜QV›TY™PU•IN@E‰6;ƒ+1}!'yur o n l l k kkk k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjko suw} &„,2‹9>’EK”KP”OTšW[ ]b¡^bšW[ƒ>Cm'+€7;DI‘BG?DŽ>CŒC@EAFAF?D‡4:ƒ.4‚+1€&,{#vr ol k kkkkkkkkkk l m o sw|%‚)/„/5…38‹:??D‘BG‘CH‘DI‘BH‘CH‘BGAG>D}.3m#{+0ˆ7<‹8=‹9>Ž=BAF€6;m'+ƒ>C™TY›TY“JOŒ?Dˆ7<….3~#)ytp nl l k kkkk k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjm r tvz!€%+†06Œ;@“FK˜OT›TYX\žY^X]›UZ–OS‘HL‘FK’DJ@EC?D?D?D?D@EŠ;@m#Ql"‡6;Œ;@m!&|+1„/5%+y tp n l k kkkkk k kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk oruw} &ƒ*0‰5:@E•JO™QVœUZœW[œUZ›TYšRW—NS–KP“GL‘CH@EC‘CH‘FK9>m(-ƒ?C™UZ•OTm%*Ol"‚-3€&,y tp n l k kkkkk l k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl o svz"€%+†16Š8>@E”JO›TYW\™TX”NR–OS˜NS–LQ•IN“GL’EJBG?DCm(,:>”KO–KP•JO”HM‘EJAFBGAGŽ=BŠ7<‡28„-3„,2….4ˆ39‡39ƒ+0} &wrol k kkkkjjjkkkkkk l m or uy}!'ƒ+0…06z(.l!{*0‰8=‹9>Š7<‹8=‹9>‹:?Œ;@Œ;@Ž=B?D‘BG“FK“HMGL”KO–KP“GL@E‹9>†16‚)/} &xtp n l k kkkkkk l k jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkm rw} &„,2Š7<Ž@E5:m'+ƒ>CšV[šV[ƒ>Bm'+8=“IN–LQ–LQGLm&*K m',“KP—NS“GL?D‹9>Š6<Š7<CŠ6<….4€&,|%xuq om l kkkkkkk kjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk ntz"(.ˆ39?D”HM•LQ”NSšUZY]W\—PU‘IN’HM•JO–KP—MR•MQ‚CŽ>C‘BH‘FK’JO™TXŸ[`Ÿ[`™TX’JO‘EJ=C‡28€&,z!up nl k kkkkkjjjkkkkkkkk l m o rw|$€&,)/*0„.3„-3„-3….4‡17‰6;Š9>‰:??D’DJ“GLBGm"'Om$ˆ7<‰5:ƒ+1~#)z!vsq om l k kkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl p w~"(…/5Œ;@’EJ˜OTœVZžZ^Ÿ[_žY^œV[™QV—MR•JO•IN•JO˜NS™QV˜SW—TX[_œZ^„@Em(-€8Cm%*~27Š9>…/5~"(xso m l k kkkkkjjjjkkkkkkkk l np sw{#~"(%+€&,€&,'-ƒ*0…/5‡39{*/m#}/5AG’EJAF}/4m#z)/†17ƒ+1~"(y vrp nm l k kkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl rz!‚)/‰6<Ž@EFK—QVŸ[`¡^b¡^bžZ^›UY™PU–LQ•IN•IN–KP˜OTšSXžY^ \a¢ae›Z^n,0Gm'+FK”IN“GLŽCHm$)Jm).—TX–SWm(-Lm %†39„,2|%vr nl k kkkkkkjjjjjkkkkkkk l m oq svyz!{#|$} &€%+ƒ,1ƒ/4m Rl#Š…38„/5ƒ+0~"(y ur o n l l k kkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjn s|$„-3‹;@49n',…BFž^b£cgž]a˜UY™TX˜PU–LQ•JO•IN“IN‘HM—PTX] ]a£aež]a…DIn,0‚=A”LP•JO”HM‘FK6;m&*‚=A™UY™SX:?m#'|-2†17'-z!up n l k kkkkkkjjjjjjjjkkkkk l m np r suvwy|%€&,ƒ-2y&+l z).‰7<Š7<ˆ4:†16„,2'-} &yur o n l l k kkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjn u~#)ˆ49‹C‰8=…/4~"(xso m l kkkkkkkjjjjjjjjkkkkkk l m n op p r suy} &€'-‚+0‚,2„.4…/5„,2‚)/€%+}!'z"wur o n l l k kkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjnv~#)‰6;BG:?n+0‡HM¥im eio26D n,0•PT™QV˜OTGLm%)K m&+•OSŸ[_ ]bœZ_™W[›X\œV[˜OT”HM’EJ’EJ”HM–LQ˜OT™PU—MR”HM?Dˆ49‚)/{#vq nl k kkkkkkjjjjjjjjjkkkkkkk l l m n nop r ux|$~#)%+%+~#)} &{#ywusp on l k k kkkkkkkkkjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjov€%+ˆ4:‘CH•MR˜VZ¡bgªos§mq‰NRn15†EJ›W\œVZšRV•LQ€8=m%*:>—PUœW[šUZ„AEn+/ƒ?C˜RV˜OT•IN’EJ’EJ”HM–KP˜NS—MR–KP’DIŒ;@†06$*y tp n l k kkkkkjjjjjjjjjjkkkkkkkk k k l l m n o r tvyy y ywusrp o nm l k kkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjnu} &….4@E˜NSžZ^ ae ei¦ko¥koŸcg¡af¡_cŸZ_œV[šSX–NS’JO•MR˜PUšRW”NRm(-H m)-”NR˜PT–LQ•IN•IN–KP—MR•MQ‘HM“HM’DIŒ:?…/5~#)xso m l k kkkkjjjjjjjjjjjkkkkkkkkkk k k l l n op rsttsr p p on m l l k kkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjn sz"‚)/‹8=•IN˜QV†EIo26ŠPS¦koªos¨jn¤dh¡_cŸ[`X]›UYšRV™PU˜OT˜PT•MR‚;@m(,ƒ>B˜SW›TY™QV˜OT™PUšRW–OT‚<@m',8=‘EJŽ>C‡17$*ysp m l k kkkkjjjjjjjjjjjjkkkkkkkkkkkk k l m nop p p o onm l l l k k kkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl p w~#)…/5?E‘HMn+/D n26¡fj«pt©mq£eiœ\`ž^b¡^cŸ[`œV[šRW˜OT˜NS˜OT–NS”NS™TYžY]X]™TX”NS˜RWX]–RWn*.H m(,‘HL‘DIŠ6<‚)/z"up n l k kkkkjjjjjjjjjjjjjkkkkkkkkkkkkk l l m m n n m l l l l k k kkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjk otz"'-Š7D”JO—SW ae©mq­sv¢imo6:? n59¡gk¤hl_c\ažZ^W\œUZW\ŸZ_ ]b¢`dšX]n-1F m,0™W\¢`dŸ^bšY^œZ^™UY‘HM?Dˆ49€%+yso m k kkkkjjjjjjjjjjjjjjjjjjjkkkkkkkkkk k k k k kkkkkkkkkkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjl nrx$*Š7<”HM›UYž^bŸae¦lp©ptŒTXo8; o7;¢hl¨ko¦gkŸ_d†FJn.2†FJž^b\`˜VZ›X\Ÿ[` ]a¢_c¡_d˜VZn).L m %…38‚)/z"tp m l kkkkjjjjjjjjjjjjjjjjjjjjjkkkkkkkkkkkkkkkkkkkkjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk nr w€%+Š7<@Em&+F n04¡gk¯w{²|€¶‚…±‚‘`co>AŽ[_¬vz¯wz¬qtŸaen04D n.2™W[ ]ažZ^X]W\žY^Ÿ[_Ÿ\`šV[‚<@m#(|.3†17€&,y so m l kkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl o sz"„,2‹:@49m(-†EI£fj­sw±z}µ„·…‰²ƒ†§x{¡qt¥tw­x|°x|§mqˆKOn04†FJœY^žY^œUZšSXšRW—PU•OS™SXšTX”LP@E‰8=„-3~"(wrol k kkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk n p v~"(‡27Œ=BFK™TY¢af£fj£jm¬vz·„‡´„‡Œ^a]/2]-0‹Y\¬w{®vy¦jn_c\ažY^›TY˜OT—MR”JO€85 5 j9=ªvz±z}­rv§hl¢`eX]™PU–KP”INBGm"'Nm!&‹=BD|.3l#|,1ˆ6;†16(.|$wsp n l k kkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkl n q v|$‚)/ˆ49‹‘EJAFˆ5:…27…06„,2€&,|$wsp n l k kkkkkkjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjkk l orw|%(.‡17‰8=‹>C’HMœUZ¢_c§im¥koŠRVo7;ŒSW¦lpž`dn-1J m#(ŠB˜QV™PU‘FKŠ" % (self.level, self.items) def __str__(self): return self.__str__() def __init__(self, level, *args): """ Constructor :param level: The level of this cluster. This is used in hierarchical clustering to retrieve a specific set of clusters. The higher the level, the smaller the count of clusters returned. The level depends on the difference function used. :param *args: every additional argument passed following the level value will get added as item to the cluster. You could also pass a list as second parameter to initialise the cluster with that list as content """ self.level = level if len(args) == 0: self.items = [] else: self.items = args def __iter__(self): for item in self.items: if isinstance(item, Cluster): for recursed_item in item: yield recursed_item else: yield item def display(self, depth=0): """ Pretty-prints this cluster. Useful for debuging. """ print(depth * " " + "[level %s]" % self.level) for item in self.items: if isinstance(item, Cluster): item.display(depth + 1) else: print(depth * " " + "%s" % item) def topology(self): """ Returns the structure (topology) of the cluster as tuples. Output from cl.data:: [])>, ])>])>])>])>])>])>] Corresponding output from cl.topo():: ('CVS', ('34.xls', (('0.txt', ('ChangeLog', 'ChangeLog.txt')), ('20060730.py', ('.cvsignore', ('About.py', ('.idlerc', '.pylint.d'))))))) """ left = self.items[0] right = self.items[1] if isinstance(left, Cluster): first = left.topology() else: first = left if isinstance(right, Cluster): second = right.topology() else: second = right return first, second def getlevel(self, threshold): """ Retrieve all clusters up to a specific level threshold. This level-threshold represents the maximum distance between two clusters. So the lower you set this threshold, the more clusters you will receive and the higher you set it, you will receive less but bigger clusters. :param threshold: The level threshold: .. note:: It is debatable whether the value passed into this method should really be as strongly linked to the real cluster-levels as it is right now. The end-user will not know the range of this value unless s/he first inspects the top-level cluster. So instead you might argue that a value ranging from 0 to 1 might be a more useful approach. """ left = self.items[0] right = self.items[1] # if this object itself is below the threshold value we only need to # return it's contents as a list if self.level <= threshold: return [fullyflatten(self.items)] # if this cluster's level is higher than the threshold we will # investgate it's left and right part. Their level could be below the # threshold if isinstance(left, Cluster) and left.level <= threshold: if isinstance(right, Cluster): return [fullyflatten(left.items)] + right.getlevel(threshold) else: return [fullyflatten(left.items)] + [[right]] elif isinstance(right, Cluster) and right.level <= threshold: if isinstance(left, Cluster): return left.getlevel(threshold) + [fullyflatten(right.items)] else: return [[left]] + [fullyflatten(right.items)] # Alright. We covered the cases where one of the clusters was below # the threshold value. Now we'll deal with the clusters that are above # by recursively applying the previous cases. if isinstance(left, Cluster) and isinstance(right, Cluster): return left.getlevel(threshold) + right.getlevel(threshold) elif isinstance(left, Cluster): return left.getlevel(threshold) + [[right]] elif isinstance(right, Cluster): return [[left]] + right.getlevel(threshold) else: return [[left], [right]] python-cluster-1.3.3/cluster/linkage.py000066400000000000000000000055661270100734100201720ustar00rootroot00000000000000from __future__ import division from functools import wraps def cached(fun): """ memoizing decorator for linkage functions. Parameters have been hardcoded (no ``*args``, ``**kwargs`` magic), because, the way this is coded (interchangingly using sets and frozensets) is true for this specific case. For other cases that is not necessarily guaranteed. """ _cache = {} @wraps(fun) def newfun(a, b, distance_function): frozen_a = frozenset(a) frozen_b = frozenset(b) if (frozen_a, frozen_b) not in _cache: result = fun(a, b, distance_function) _cache[(frozen_a, frozen_b)] = result return _cache[(frozen_a, frozen_b)] return newfun @cached def single(a, b, distance_function): """ Given two collections ``a`` and ``b``, this will return the distance of the points which are closest together. ``distance_function`` is used to determine the distance between two elements. Example:: >>> single([1, 2], [3, 4], lambda x, y: abs(x-y)) 1 # (distance between 2 and 3) """ left_a, right_a = min(a), max(a) left_b, right_b = min(b), max(b) result = min(distance_function(left_a, right_b), distance_function(left_b, right_a)) return result @cached def complete(a, b, distance_function): """ Given two collections ``a`` and ``b``, this will return the distance of the points which are farthest apart. ``distance_function`` is used to determine the distance between two elements. Example:: >>> single([1, 2], [3, 4], lambda x, y: abs(x-y)) 3 # (distance between 1 and 4) """ left_a, right_a = min(a), max(a) left_b, right_b = min(b), max(b) result = max(distance_function(left_a, right_b), distance_function(left_b, right_a)) return result @cached def average(a, b, distance_function): """ Given two collections ``a`` and ``b``, this will return the mean of all distances. ``distance_function`` is used to determine the distance between two elements. Example:: >>> single([1, 2], [3, 100], lambda x, y: abs(x-y)) 26 """ distances = [distance_function(x, y) for x in a for y in b] return sum(distances) / len(distances) @cached def uclus(a, b, distance_function): """ Given two collections ``a`` and ``b``, this will return the *median* of all distances. ``distance_function`` is used to determine the distance between two elements. Example:: >>> single([1, 2], [3, 100], lambda x, y: abs(x-y)) 2.5 """ distances = sorted([distance_function(x, y) for x in a for y in b]) midpoint, rest = len(distances) // 2, len(distances) % 2 if not rest: return sum(distances[midpoint-1:midpoint+1]) / 2 else: return distances[midpoint] python-cluster-1.3.3/cluster/matrix.py000066400000000000000000000163721270100734100200610ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # option) any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import logging from multiprocessing import Process, Queue, current_process logger = logging.getLogger(__name__) class Matrix(object): """ Object representation of the item-item matrix. """ def __init__(self, data, combinfunc, symmetric=False, diagonal=None): """ Takes a list of data and generates a 2D-matrix using the supplied combination function to calculate the values. :param data: the list of items. :param combinfunc: the function that is used to calculate teh value in a cell. It has to cope with two arguments. :param symmetric: Whether it will be a symmetric matrix along the diagonal. For example, if the list contains integers, and the combination function is ``abs(x-y)``, then the matrix will be symmetric. :param diagonal: The value to be put into the diagonal. For some functions, the diagonal will stay constant. An example could be the function ``x-y``. Then each diagonal cell will be ``0``. If this value is set to None, then the diagonal will be calculated. """ self.data = data self.combinfunc = combinfunc self.symmetric = symmetric self.diagonal = diagonal def worker(self): """ Multiprocessing task function run by worker processes """ tasks_completed = 0 for task in iter(self.task_queue.get, 'STOP'): col_index, item, item2 = task if not hasattr(item, '__iter__') or isinstance(item, tuple): item = [item] if not hasattr(item2, '__iter__') or isinstance(item2, tuple): item2 = [item2] result = (col_index, self.combinfunc(item, item2)) self.done_queue.put(result) tasks_completed += 1 logger.info("Worker %s performed %s tasks", current_process().name, tasks_completed) def genmatrix(self, num_processes=1): """ Actually generate the matrix :param num_processes: If you want to use multiprocessing to split up the work and run ``combinfunc()`` in parallel, specify ``num_processes > 1`` and this number of workers will be spun up, the work is split up amongst them evenly. """ use_multiprocessing = num_processes > 1 if use_multiprocessing: self.task_queue = Queue() self.done_queue = Queue() self.matrix = [] logger.info("Generating matrix for %s items - O(n^2)", len(self.data)) if use_multiprocessing: logger.info("Using multiprocessing on %s processes!", num_processes) if use_multiprocessing: logger.info("Spinning up %s workers", num_processes) processes = [Process(target=self.worker) for i in range(num_processes)] [process.start() for process in processes] for row_index, item in enumerate(self.data): logger.debug("Generating row %s/%s (%0.2f%%)", row_index, len(self.data), 100.0 * row_index / len(self.data)) row = {} if use_multiprocessing: num_tasks_queued = num_tasks_completed = 0 for col_index, item2 in enumerate(self.data): if self.diagonal is not None and col_index == row_index: # This is a cell on the diagonal row[col_index] = self.diagonal elif self.symmetric and col_index < row_index: # The matrix is symmetric and we are "in the lower left # triangle" - fill this in after (in case of multiprocessing) pass # Otherwise, this cell is not on the diagonal and we do indeed # need to call combinfunc() elif use_multiprocessing: # Add that thing to the task queue! self.task_queue.put((col_index, item, item2)) num_tasks_queued += 1 # Start grabbing the results as we go, so as not to stuff all of # the worker args into memory at once (as Queue.get() is a # blocking operation) if num_tasks_queued > num_processes: col_index, result = self.done_queue.get() row[col_index] = result num_tasks_completed += 1 else: # Otherwise do it here, in line if not hasattr(item, '__iter__') or isinstance(item, tuple): item = [item] if not hasattr(item2, '__iter__') or isinstance(item2, tuple): item2 = [item2] row[col_index] = self.combinfunc(item, item2) if self.symmetric: # One more iteration to get symmetric lower left triangle for col_index, item2 in enumerate(self.data): if col_index >= row_index: break # post-process symmetric "lower left triangle" row[col_index] = self.matrix[col_index][row_index] if use_multiprocessing: # Grab the remaining worker task results while num_tasks_completed < num_tasks_queued: col_index, result = self.done_queue.get() row[col_index] = result num_tasks_completed += 1 row_indexed = [row[index] for index in range(len(self.data))] self.matrix.append(row_indexed) if use_multiprocessing: logger.info("Stopping/joining %s workers", num_processes) [self.task_queue.put('STOP') for i in range(num_processes)] [process.join() for process in processes] logger.info("Matrix generated") def __str__(self): """ Returns a 2-dimensional list of data as text-string which can be displayed to the user. """ # determine maximum length maxlen = 0 colcount = len(self.data[0]) for col in self.data: for cell in col: maxlen = max(len(str(cell)), maxlen) format = " %%%is |" % maxlen format = "|" + format * colcount rows = [format % tuple(row) for row in self.data] return "\n".join(rows) python-cluster-1.3.3/cluster/method/000077500000000000000000000000001270100734100174525ustar00rootroot00000000000000python-cluster-1.3.3/cluster/method/__init__.py000066400000000000000000000015101270100734100215600ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # option) any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # python-cluster-1.3.3/cluster/method/base.py000066400000000000000000000052271270100734100207440ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # option) any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # class BaseClusterMethod(object): """ The base class of all clustering methods. :param input: a list of objects :distance_function: a function returning the distance - or opposite of similarity ``(distance = -similarity)`` - of two items from the input. In other words, the closer the two items are related, the smaller this value needs to be. With 0 meaning they are exactly the same. .. note:: The distance function should always return the absolute distance between two given items of the list. Say:: distance(input[1], input[4]) = distance(input[4], input[1]) This is very important for the clustering algorithm to work! Naturally, the data returned by the distance function MUST be a comparable datatype, so you can perform arithmetic comparisons on them (``<`` or ``>``)! The simplest examples would be floats or ints. But as long as they are comparable, it's ok. """ def __init__(self, input, distance_function, progress_callback=None): self.distance = distance_function self._input = input # the original input self._data = input[:] # clone the input so we can work with it # without distroying the original data. self.progress_callback = progress_callback def topo(self): """ Returns the structure (topology) of the cluster. See :py:meth:`~cluster.cluster.Cluster.topology` for more information. """ return self.data[0].topology() @property def data(self): """ Returns the data that is currently in process. """ return self._data @property def raw_data(self): """ Returns the raw data (data without being clustered). """ return self._input python-cluster-1.3.3/cluster/method/hierarchical.py000066400000000000000000000207341270100734100224500ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # option) any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # from functools import partial import logging from cluster.cluster import Cluster from cluster.matrix import Matrix from cluster.method.base import BaseClusterMethod from cluster.linkage import single, complete, average, uclus logger = logging.getLogger(__name__) class HierarchicalClustering(BaseClusterMethod): """ Implementation of the hierarchical clustering method as explained in a tutorial_ by *matteucc*. Object prerequisites: * Items must be sortable (See `issue #11`_) * Items must be hashable. .. _issue #11: https://github.com/exhuma/python-cluster/issues/11 .. _tutorial: http://www.elet.polimi.it/upload/matteucc/Clustering/tutorial_html/hierarchical.html Example: >>> from cluster import HierarchicalClustering >>> # or: from cluster import * >>> cl = HierarchicalClustering([123,334,345,242,234,1,3], lambda x,y: float(abs(x-y))) >>> cl.getlevel(90) [[345, 334], [234, 242], [123], [3, 1]] Note that all of the returned clusters are more than 90 (``getlevel(90)``) apart. See :py:class:`~cluster.method.base.BaseClusterMethod` for more details. :param data: The collection of items to be clustered. :param distance_function: A function which takes two elements of ``data`` and returns a distance between both elements. :param linkage: The method used to determine the distance between two clusters. See :py:meth:`~.HierarchicalClustering.set_linkage_method` for possible values. :param num_processes: If you want to use multiprocessing to split up the work and run ``genmatrix()`` in parallel, specify num_processes > 1 and this number of workers will be spun up, the work split up amongst them evenly. :param progress_callback: A function to be called on each iteration to publish the progress. The function is called with two integer arguments which represent the total number of elements in the cluster, and the remaining elements to be clustered. """ def __init__(self, data, distance_function, linkage=None, num_processes=1, progress_callback=None): if not linkage: linkage = single logger.info("Initializing HierarchicalClustering object with linkage " "method %s", linkage) BaseClusterMethod.__init__(self, sorted(data), distance_function) self.set_linkage_method(linkage) self.num_processes = num_processes self.progress_callback = progress_callback self.__cluster_created = False def publish_progress(self, total, current): """ If a progress function was supplied, this will call that function with the total number of elements, and the remaining number of elements. :param total: The total number of elements. :param remaining: The remaining number of elements. """ if self.progress_callback: self.progress_callback(total, current) def set_linkage_method(self, method): """ Sets the method to determine the distance between two clusters. :param method: The method to use. It can be one of ``'single'``, ``'complete'``, ``'average'`` or ``'uclus'``, or a callable. The callable should take two collections as parameters and return a distance value between both collections. """ if method == 'single': self.linkage = single elif method == 'complete': self.linkage = complete elif method == 'average': self.linkage = average elif method == 'uclus': self.linkage = uclus elif hasattr(method, '__call__'): self.linkage = method else: raise ValueError('distance method must be one of single, ' 'complete, average of uclus') def cluster(self, matrix=None, level=None, sequence=None): """ Perform hierarchical clustering. :param matrix: The 2D list that is currently under processing. The matrix contains the distances of each item with each other :param level: The current level of clustering :param sequence: The sequence number of the clustering """ logger.info("Performing cluster()") if matrix is None: # create level 0, first iteration (sequence) level = 0 sequence = 0 matrix = [] # if the matrix only has two rows left, we are done linkage = partial(self.linkage, distance_function=self.distance) initial_element_count = len(self._data) while len(matrix) > 2 or matrix == []: item_item_matrix = Matrix(self._data, linkage, True, 0) item_item_matrix.genmatrix(self.num_processes) matrix = item_item_matrix.matrix smallestpair = None mindistance = None rowindex = 0 # keep track of where we are in the matrix # find the minimum distance for row in matrix: cellindex = 0 # keep track of where we are in the matrix for cell in row: # if we are not on the diagonal (which is always 0) # and if this cell represents a new minimum... cell_lt_mdist = cell < mindistance if mindistance else False if ((rowindex != cellindex) and (cell_lt_mdist or smallestpair is None)): smallestpair = (rowindex, cellindex) mindistance = cell cellindex += 1 rowindex += 1 sequence += 1 level = matrix[smallestpair[1]][smallestpair[0]] cluster = Cluster(level, self._data[smallestpair[0]], self._data[smallestpair[1]]) # maintain the data, by combining the the two most similar items # in the list we use the min and max functions to ensure the # integrity of the data. imagine: if we first remove the item # with the smaller index, all the rest of the items shift down by # one. So the next index will be wrong. We could simply adjust the # value of the second "remove" call, but we don't know the order # in which they come. The max and min approach clarifies that self._data.remove(self._data[max(smallestpair[0], smallestpair[1])]) # remove item 1 self._data.remove(self._data[min(smallestpair[0], smallestpair[1])]) # remove item 2 self._data.append(cluster) # append item 1 and 2 combined self.publish_progress(initial_element_count, len(self._data)) # all the data is in one single cluster. We return that and stop self.__cluster_created = True logger.info("Call to cluster() is complete") return def getlevel(self, threshold): """ Returns all clusters with a maximum distance of *threshold* in between each other :param threshold: the maximum distance between clusters. See :py:meth:`~cluster.cluster.Cluster.getlevel` """ # if it's not worth clustering, just return the data if len(self._input) <= 1: return self._input # initialize the cluster if not yet done if not self.__cluster_created: self.cluster() return self._data[0].getlevel(threshold) python-cluster-1.3.3/cluster/method/kmeans.py000066400000000000000000000147261270100734100213140ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # option) any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # from cluster.util import ClusteringError, centroid, minkowski_distance class KMeansClustering(object): """ Implementation of the kmeans clustering method as explained in a tutorial_ by *matteucc*. .. _tutorial: http://www.elet.polimi.it/upload/matteucc/Clustering/tutorial_html/kmeans.html Example: >>> from cluster import KMeansClustering >>> cl = KMeansClustering([(1,1), (2,1), (5,3), ...]) >>> clusters = cl.getclusters(2) :param data: A list of tuples or integers. :param distance: A function determining the distance between two items. Default (if ``None`` is passed): It assumes the tuples contain numeric values and appiles a generalised form of the euclidian-distance algorithm on them. :param equality: A function to test equality of items. By default the standard python equality operator (``==``) is applied. :raises ValueError: if the list contains heterogeneous items or if the distance between items cannot be determined. """ def __init__(self, data, distance=None, equality=None): self.__clusters = [] self.__data = data self.distance = distance self.__initial_length = len(data) self.equality = equality # test if each item is of same dimensions if len(data) > 1 and isinstance(data[0], tuple): control_length = len(data[0]) for item in data[1:]: if len(item) != control_length: raise ValueError("Each item in the data list must have " "the same amount of dimensions. Item " "%r was out of line!" % (item,)) # now check if we need and have a distance function if (len(data) > 1 and not isinstance(data[0], tuple) and distance is None): raise ValueError("You supplied non-standard items but no " "distance function! We cannot continue!") # we now know that we have tuples, and assume therefore that it's # items are numeric elif distance is None: self.distance = minkowski_distance def getclusters(self, count): """ Generates *count* clusters. :param count: The amount of clusters that should be generated. count must be greater than ``1``. :raises ClusteringError: if *count* is out of bounds. """ # only proceed if we got sensible input if count <= 1: raise ClusteringError("When clustering, you need to ask for at " "least two clusters! " "You asked for %d" % count) # return the data straight away if there is nothing to cluster if (self.__data == [] or len(self.__data) == 1 or count == self.__initial_length): return self.__data # It makes no sense to ask for more clusters than data-items available if count > self.__initial_length: raise ClusteringError( "Unable to generate more clusters than " "items available. You supplied %d items, and asked for " "%d clusters." % (self.__initial_length, count)) self.initialise_clusters(self.__data, count) items_moved = True # tells us if any item moved between the clusters, # as we initialised the clusters, we assume that # is the case while items_moved is True: items_moved = False for cluster in self.__clusters: for item in cluster: res = self.assign_item(item, cluster) if items_moved is False: items_moved = res return self.__clusters def assign_item(self, item, origin): """ Assigns an item from a given cluster to the closest located cluster. :param item: the item to be moved. :param origin: the originating cluster. """ closest_cluster = origin for cluster in self.__clusters: if self.distance(item, centroid(cluster)) < self.distance( item, centroid(closest_cluster)): closest_cluster = cluster if id(closest_cluster) != id(origin): self.move_item(item, origin, closest_cluster) return True else: return False def move_item(self, item, origin, destination): """ Moves an item from one cluster to anoter cluster. :param item: the item to be moved. :param origin: the originating cluster. :param destination: the target cluster. """ if self.equality: item_index = 0 for i, element in enumerate(origin): if self.equality(element, item): item_index = i break else: item_index = origin.index(item) destination.append(origin.pop(item_index)) def initialise_clusters(self, input_, clustercount): """ Initialises the clusters by distributing the items from the data. evenly across n clusters :param input_: the data set (a list of tuples). :param clustercount: the amount of clusters (n). """ # initialise the clusters with empty lists self.__clusters = [] for _ in range(clustercount): self.__clusters.append([]) # distribute the items into the clusters count = 0 for item in input_: self.__clusters[count % clustercount].append(item) count += 1 python-cluster-1.3.3/cluster/test/000077500000000000000000000000001270100734100171515ustar00rootroot00000000000000python-cluster-1.3.3/cluster/test/test_hierarchical.py000066400000000000000000000200611270100734100231770ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # """ Tests for hierarchical clustering. .. note:: Even though the results are lists, the order of items in the resulting clusters is non-deterministic. This should be taken into consideration when writing "expected" values! """ from difflib import SequenceMatcher from math import sqrt from sys import hexversion import unittest from cluster import HierarchicalClustering class Py23TestCase(unittest.TestCase): def __init__(self, *args, **kwargs): super(Py23TestCase, self).__init__(*args, **kwargs) if hexversion < 0x030000f0: self.assertCItemsEqual = self.assertItemsEqual else: self.assertCItemsEqual = self.assertCountEqual class HClusterSmallListTestCase(Py23TestCase): """ Test for Bug #1516204 """ def testClusterLen1(self): """ Testing if hierarchical clustering a set of length 1 returns a set of length 1 """ cl = HierarchicalClustering([876], lambda x, y: abs(x - y)) self.assertCItemsEqual([876], cl.getlevel(40)) def testClusterLen0(self): """ Testing if hierarchical clustering an empty list returns an empty list """ cl = HierarchicalClustering([], lambda x, y: abs(x - y)) self.assertEqual([], cl.getlevel(40)) class HClusterIntegerTestCase(Py23TestCase): def __init__(self, *args, **kwargs): super(HClusterIntegerTestCase, self).__init__(*args, **kwargs) if hexversion < 0x030000f0: self.assertCItemsEqual = self.assertItemsEqual else: self.assertCItemsEqual = self.assertCountEqual def setUp(self): self.__data = [791, 956, 676, 124, 564, 84, 24, 365, 594, 940, 398, 971, 131, 365, 542, 336, 518, 835, 134, 391] def testSingleLinkage(self): "Basic Hierarchical Clustering test with integers" cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y)) result = cl.getlevel(40) # sort the values to make the tests less prone to algorithm changes result = [sorted(_) for _ in result] self.assertCItemsEqual([ [24], [336, 365, 365, 391, 398], [518, 542, 564, 594], [676], [791], [835], [84, 124, 131, 134], [940, 956, 971], ], result) def testCompleteLinkage(self): "Basic Hierarchical Clustering test with integers" cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y), linkage='complete') result = cl.getlevel(40) # sort the values to make the tests less prone to algorithm changes result = sorted([sorted(_) for _ in result]) expected = [ [24], [84], [124, 131, 134], [336, 365, 365], [391, 398], [518], [542, 564], [594], [676], [791], [835], [940, 956, 971], ] self.assertEqual(result, expected) def testUCLUS(self): "Basic Hierarchical Clustering test with integers" cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y), linkage='uclus') expected = [ [24], [84], [124, 131, 134], [336, 365, 365, 391, 398], [518, 542, 564], [594], [676], [791], [835], [940, 956, 971], ] result = sorted([sorted(_) for _ in cl.getlevel(40)]) self.assertEqual(result, expected) def testAverageLinkage(self): cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y), linkage='average') # TODO: The current test-data does not really trigger a difference # between UCLUS and "average" linkage. expected = [ [24], [84], [124, 131, 134], [336, 365, 365, 391, 398], [518, 542, 564], [594], [676], [791], [835], [940, 956, 971], ] result = sorted([sorted(_) for _ in cl.getlevel(40)]) self.assertEqual(result, expected) def testUnmodifiedData(self): cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y)) new_data = [] [new_data.extend(_) for _ in cl.getlevel(40)] self.assertEqual(sorted(new_data), sorted(self.__data)) def testMultiprocessing(self): cl = HierarchicalClustering(self.__data, lambda x, y: abs(x - y), num_processes=4) new_data = [] [new_data.extend(_) for _ in cl.getlevel(40)] self.assertEqual(sorted(new_data), sorted(self.__data)) class HClusterStringTestCase(Py23TestCase): def sim(self, x, y): sm = SequenceMatcher(lambda x: x in ". -", x, y) return 1 - sm.ratio() def setUp(self): self.__data = ("Lorem ipsum dolor sit amet consectetuer adipiscing " "elit Ut elit Phasellus consequat ultricies mi Sed " "congue leo at neque Nullam").split() def testDataTypes(self): "Test for bug #?" cl = HierarchicalClustering(self.__data, self.sim) for item in cl.getlevel(0.5): self.assertEqual( type(item), type([]), "Every item should be a list!") def testCluster(self): "Basic Hierachical clustering test with strings" self.skipTest('These values lead to non-deterministic results. ' 'This makes it untestable!') cl = HierarchicalClustering(self.__data, self.sim) self.assertEqual([ ['ultricies'], ['Sed'], ['Phasellus'], ['mi'], ['Nullam'], ['sit', 'elit', 'elit', 'Ut', 'amet', 'at'], ['leo', 'Lorem', 'dolor'], ['congue', 'neque', 'consectetuer', 'consequat'], ['adipiscing'], ['ipsum'], ], cl.getlevel(0.5)) def testUnmodifiedData(self): cl = HierarchicalClustering(self.__data, self.sim) new_data = [] [new_data.extend(_) for _ in cl.getlevel(0.5)] self.assertEqual(sorted(new_data), sorted(self.__data)) class HClusterTuplesTestCase(Py23TestCase): ''' Test case to cover the case where the data contains tuple-items See Github issue #20 ''' def testSingleLinkage(self): "Basic Hierarchical Clustering test with integers" def euclidian_distance(a, b): return sqrt(sum([pow(z[0] - z[1], 2) for z in zip(a, b)])) self.__data = [(1, 1), (1, 2), (1, 3)] cl = HierarchicalClustering(self.__data, euclidian_distance) result = cl.getlevel(40) self.assertIsNotNone(result) if __name__ == '__main__': suite = unittest.TestSuite(( unittest.makeSuite(HClusterIntegerTestCase), unittest.makeSuite(HClusterSmallListTestCase), unittest.makeSuite(HClusterStringTestCase), )) unittest.TextTestRunner(verbosity=2).run(suite) python-cluster-1.3.3/cluster/test/test_kmeans.py000066400000000000000000000117741270100734100220520ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # from cluster import (KMeansClustering, ClusteringError) import unittest def compare_list(x, y): """ Compare lists by content. Ordering does not matter. Returns True if both lists contain the same items (and are of identical length) """ cmpx = [set(cluster) for cluster in x] cmpy = [set(cluster) for cluster in y] all_ok = True for cset in cmpx: all_ok &= cset in cmpy for cset in cmpy: all_ok &= cset in cmpx return all_ok class KClusterSmallListTestCase(unittest.TestCase): def testClusterLen1(self): "Testing that a search space of length 1 returns only one cluster" cl = KMeansClustering([876]) self.assertEqual([876], cl.getclusters(2)) self.assertEqual([876], cl.getclusters(5)) def testClusterLen0(self): "Testing if clustering an empty set, returns an empty set" cl = KMeansClustering([]) self.assertEqual([], cl.getclusters(2)) self.assertEqual([], cl.getclusters(7)) class KCluster2DTestCase(unittest.TestCase): def testClusterCount(self): "Test that asking for less than 2 clusters raises an error" cl = KMeansClustering([876, 123, 344, 676], distance=lambda x, y: abs(x - y)) self.assertRaises(ClusteringError, cl.getclusters, 0) self.assertRaises(ClusteringError, cl.getclusters, 1) def testNonsenseCluster(self): """ Test that asking for more clusters than data-items available raises an error """ cl = KMeansClustering([876, 123], distance=lambda x, y: abs(x - y)) self.assertRaises(ClusteringError, cl.getclusters, 5) def testUniformLength(self): """ Test if there is an item in the cluster that has a different cardinality """ data = [(1, 5), (2, 5), (2, 6), (3, 4), (3, 5), (3, 6, 7), (7, 3), (8, 1), (8, 2), (8), (9, 2), (9, 3)] self.assertRaises(ValueError, KMeansClustering, data) def testPointDoubling(self): "test for bug #1604868" data = [(18, 13), (15, 12), (17, 12), (18, 12), (19, 12), (16, 11), (18, 11), (19, 10), (0, 0), (1, 4), (1, 2), (2, 3), (4, 1), (4, 3), (5, 2), (6, 1)] cl = KMeansClustering(data) clusters = cl.getclusters(2) expected = [[(18, 13), (15, 12), (17, 12), (18, 12), (19, 12), (16, 11), (18, 11), (19, 10)], [(0, 0), (1, 4), (1, 2), (2, 3), (4, 1), (5, 2), (6, 1), (4, 3)]] self.assertTrue(compare_list( clusters, expected), "Elements differ!\n%s\n%s" % (clusters, expected)) def testClustering(self): "Basic clustering test" data = [(8, 2), (7, 3), (2, 6), (3, 5), (3, 6), (1, 5), (8, 1), (3, 4), (8, 3), (9, 2), (2, 5), (9, 3)] cl = KMeansClustering(data) self.assertEqual( cl.getclusters(2), [[(8, 2), (8, 1), (8, 3), (7, 3), (9, 2), (9, 3)], [(3, 5), (1, 5), (3, 4), (2, 6), (2, 5), (3, 6)]]) def testUnmodifiedData(self): "Basic clustering test" data = [(8, 2), (7, 3), (2, 6), (3, 5), (3, 6), (1, 5), (8, 1), (3, 4), (8, 3), (9, 2), (2, 5), (9, 3)] cl = KMeansClustering(data) new_data = [] [new_data.extend(_) for _ in cl.getclusters(2)] self.assertEqual(sorted(new_data), sorted(data)) class KClusterSFBugs(unittest.TestCase): def testLostFunctionReference(self): "test for bug #1727558" cl = KMeansClustering([(1, 1), (20, 40), (20, 41)], lambda x, y: x + y) clusters = cl.getclusters(3) expected = [(1, 1), (20, 40), (20, 41)] self.assertTrue(compare_list( clusters, expected), "Elements differ!\n%s\n%s" % (clusters, expected)) def testMultidimArray(self): from random import random data = [] for _ in range(200): data.append([random(), random()]) cl = KMeansClustering(data, lambda p0, p1: ( p0[0] - p1[0]) ** 2 + (p0[1] - p1[1]) ** 2) cl.getclusters(10) python-cluster-1.3.3/cluster/test/test_linkage.py000066400000000000000000000016411270100734100221760ustar00rootroot00000000000000import unittest from cluster.linkage import single, complete, uclus, average class LinkageMethods(unittest.TestCase): def setUp(self): self.set_a = [1, 2, 3, 4] self.set_b = [10, 11, 12, 13, 14, 15, 100] self.dist = lambda x, y: abs(x-y) # NOQA def test_single_distance(self): result = single(self.set_a, self.set_b, self.dist) expected = 6 self.assertEqual(result, expected) def test_complete_distance(self): result = complete(self.set_a, self.set_b, self.dist) expected = 99 self.assertEqual(result, expected) def test_uclus_distance(self): result = uclus(self.set_a, self.set_b, self.dist) expected = 10.5 self.assertEqual(result, expected) def test_average_distance(self): result = average(self.set_a, self.set_b, self.dist) expected = 22.5 self.assertEqual(result, expected) python-cluster-1.3.3/cluster/test/test_numpy.py000066400000000000000000000025251270100734100217360ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # import unittest from cluster import KMeansClustering try: import numpy NUMPY_AVAILABLE = True except: NUMPY_AVAILABLE = False @unittest.skipUnless(NUMPY_AVAILABLE, 'numpy not available. Associated test will not be loaded!') class NumpyTests(unittest.TestCase): def testNumpyRandom(self): data = numpy.random.rand(500, 2) cl = KMeansClustering(data, lambda p0, p1: ( p0[0] - p1[0]) ** 2 + (p0[1] - p1[1]) ** 2, numpy.array_equal) cl.getclusters(10) python-cluster-1.3.3/cluster/util.py000066400000000000000000000070431270100734100175250ustar00rootroot00000000000000# # This is part of "python-cluster". A library to group similar items together. # Copyright (C) 2006 Michel Albert # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # option) any later version. # This library is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # You should have received a copy of the GNU Lesser General Public License # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # from __future__ import print_function import logging logger = logging.getLogger(__name__) class ClusteringError(Exception): pass def flatten(L): """ Flattens a list. Example: >>> flatten([a,b,[c,d,[e,f]]]) [a,b,c,d,e,f] """ if not isinstance(L, list): return [L] if L == []: return L return flatten(L[0]) + flatten(L[1:]) def fullyflatten(container): """ Completely flattens out a cluster and returns a one-dimensional set containing the cluster's items. This is useful in cases where some items of the cluster are clusters in their own right and you only want the items. :param container: the container to flatten. """ flattened_items = [] for item in container: if hasattr(item, 'items'): flattened_items = flattened_items + fullyflatten(item.items) else: flattened_items.append(item) return flattened_items def median(numbers): """ Return the median of the list of numbers. see: http://mail.python.org/pipermail/python-list/2004-December/294990.html """ # Sort the list and take the middle element. n = len(numbers) copy = sorted(numbers) if n & 1: # There is an odd number of elements return copy[n // 2] else: return (copy[n // 2 - 1] + copy[n // 2]) / 2.0 def mean(numbers): """ Returns the arithmetic mean of a numeric list. see: http://mail.python.org/pipermail/python-list/2004-December/294990.html """ return float(sum(numbers)) / float(len(numbers)) def minkowski_distance(x, y, p=2): """ Calculates the minkowski distance between two points. :param x: the first point :param y: the second point :param p: the order of the minkowski algorithm. If *p=1* it is equal to the manhatten distance, if *p=2* it is equal to the euclidian distance. The higher the order, the closer it converges to the Chebyshev distance, which has *p=infinity*. """ from math import pow assert len(y) == len(x) assert len(x) >= 1 sum = 0 for i in range(len(x)): sum += abs(x[i] - y[i]) ** p return pow(sum, 1.0 / float(p)) def magnitude(a): "calculates the magnitude of a vecor" from math import sqrt sum = 0 for coord in a: sum += coord ** 2 return sqrt(sum) def dotproduct(a, b): "Calculates the dotproduct between two vecors" assert(len(a) == len(b)) out = 0 for i in range(len(a)): out += a[i] * b[i] return out def centroid(data, method=median): "returns the central vector of a list of vectors" out = [] for i in range(len(data[0])): out.append(method([x[i] for x in data])) return tuple(out) python-cluster-1.3.3/cluster/version.txt000066400000000000000000000000061270100734100204140ustar00rootroot000000000000001.3.3 python-cluster-1.3.3/docs/000077500000000000000000000000001270100734100154415ustar00rootroot00000000000000python-cluster-1.3.3/docs/Makefile000066400000000000000000000152121270100734100171020ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-cluster.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-cluster.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/python-cluster" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/python-cluster" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." python-cluster-1.3.3/docs/apidoc/000077500000000000000000000000001270100734100167005ustar00rootroot00000000000000python-cluster-1.3.3/docs/apidoc/cluster.matrix.rst000066400000000000000000000001671270100734100224220ustar00rootroot00000000000000cluster.matrix ============== .. automodule:: cluster.matrix :members: :undoc-members: :show-inheritance: python-cluster-1.3.3/docs/apidoc/cluster.method.base.rst000066400000000000000000000002061270100734100233010ustar00rootroot00000000000000cluster.method.base =================== .. automodule:: cluster.method.base :members: :undoc-members: :show-inheritance: python-cluster-1.3.3/docs/apidoc/cluster.method.hierarchical.rst000066400000000000000000000002361270100734100250100ustar00rootroot00000000000000cluster.method.hierarchical =========================== .. automodule:: cluster.method.hierarchical :members: :undoc-members: :show-inheritance: python-cluster-1.3.3/docs/apidoc/cluster.method.kmeans.rst000066400000000000000000000002141270100734100236440ustar00rootroot00000000000000cluster.method.kmeans ===================== .. automodule:: cluster.method.kmeans :members: :undoc-members: :show-inheritance: python-cluster-1.3.3/docs/apidoc/cluster.rst000066400000000000000000000001521270100734100211110ustar00rootroot00000000000000cluster ======= .. automodule:: cluster.cluster :members: :undoc-members: :show-inheritance: python-cluster-1.3.3/docs/apidoc/cluster.util.rst000066400000000000000000000001611270100734100220650ustar00rootroot00000000000000cluster.util ============ .. automodule:: cluster.util :members: :undoc-members: :show-inheritance: python-cluster-1.3.3/docs/changelog.rst000066400000000000000000000007201270100734100201210ustar00rootroot00000000000000Changelog ========= Release 1.3.0 ------------- * Performance improvments for hierarchical clustering (at the cost of memory) * Cluster instances are now iterable.It will iterate over each element, resulting in a flat list of items. * New option to specify a progress method. This method will be called on each iteration for hierarchical clusters. It gives users a way to present to progress on screen. * The library now also has a ``__version__`` member. python-cluster-1.3.3/docs/conf.py000066400000000000000000000200621270100734100167400ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # python-cluster documentation build configuration file, created by # sphinx-quickstart on Wed Aug 27 07:50:52 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'python-cluster' copyright = u'2014, Michel Albert' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '1.3' # The full version, including alpha/beta/rc tags. release = '1.3.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'python-clusterdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'python-cluster.tex', u'python-cluster Documentation', u'Michel Albert', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'python-cluster', u'python-cluster Documentation', [u'Michel Albert'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'python-cluster', u'python-cluster Documentation', u'Michel Albert', 'python-cluster', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False python-cluster-1.3.3/docs/index.rst000066400000000000000000000043301270100734100173020ustar00rootroot00000000000000Welcome to python-cluster's documentation! ========================================== Index ----- .. toctree:: :maxdepth: 1 changelog Introduction ------------ Implementation of cluster algorithms in pure Python. As this is exacuted in the Python runtime, the code runs slower than similar implementations in compiled languages. You gain however to run this on pretty much any Python object. The different clustering methods have different prerequisites however which are mentioned in the different implementations. Example for K-Means Clustering ------------------------------ :: from cluster import KMeansClustering data = [ (8, 2), (7, 3), (2, 6), (3, 5), (3, 6), (1, 5), (8, 1), (3, 4), (8, 3), (9, 2), (2, 5), (9, 3) ] cl = KMeansClustering(data) cl.getclusters(2) The above code would give the following result:: [ [(8, 2), (8, 1), (8, 3), (7, 3), (9, 2), (9, 3)], [(3, 5), (1, 5), (3, 4), (2, 6), (2, 5), (3, 6)] ] Example for Hierarchical Clustering ----------------------------------- :: from cluster import HierarchicalClustering data = [791, 956, 676, 124, 564, 84, 24, 365, 594, 940, 398, 971, 131, 365, 542, 336, 518, 835, 134, 391] cl = HierarchicalClustering(data) cl.getlevel(40) The above code would give the following result:: [ [24], [84, 124, 131, 134], [336, 365, 365, 391, 398], [676], [594, 518, 542, 564], [940, 956, 971], [791], [835], ] Using :py:meth:`~cluster.method.hierarchical.HierarchicalClustering.getlevel()` returns clusters where the distance between each cluster is no less than *level*. .. note:: Due to a bug_ in earlier releases, the elements of the input data *must be* sortable! .. _bug: https://github.com/exhuma/python-cluster/issues/11 API --- .. toctree:: :maxdepth: 1 apidoc/cluster apidoc/cluster.matrix apidoc/cluster.method.base apidoc/cluster.method.hierarchical apidoc/cluster.method.kmeans apidoc/cluster.util Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` python-cluster-1.3.3/fabfile.py000066400000000000000000000003371270100734100164560ustar00rootroot00000000000000import fabric.api as fab @fab.task def doc(): with fab.lcd('docs'): fab.local('../env/bin/sphinx-build ' '-b html ' '-d _build/doctrees . ' '_build/html') python-cluster-1.3.3/makedist.sh000077500000000000000000000001631270100734100166510ustar00rootroot00000000000000#!/bin/bash python setup.py sdist python setup.py bdist python setup.py bdist_rpm python setup.py bdist_wininst python-cluster-1.3.3/pytest.ini000066400000000000000000000000641270100734100165420ustar00rootroot00000000000000[pytest] norecursedirs = env env3 env3_nonumpy .git python-cluster-1.3.3/setup.cfg000066400000000000000000000000321270100734100163250ustar00rootroot00000000000000[bdist_wheel] universal=1 python-cluster-1.3.3/setup.py000066400000000000000000000023231270100734100162230ustar00rootroot00000000000000from setuptools import setup readme_contents = open("README.rst").read() # index where the first paragraph starts parastart = readme_contents.find('=\n') + 3 # first sentence of first paragraph sentence_end = readme_contents.find('.', parastart) setup( name='cluster', version=open('cluster/version.txt').read().strip(), author='Michel Albert', author_email='michel@albert.lu', url='https://github.com/exhuma/python-cluster', packages=['cluster', 'cluster.method'], license='LGPL', description=readme_contents[parastart:sentence_end], long_description=readme_contents, include_package_data=True, classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Education', 'Intended Audience :: Other Audience', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering :: Information Analysis', ] )