This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Very messy and not 100% correct ISODATA clustering algorithm implementation that works with vectors. | |
| # Source: https://github.com/PyRadar/pyradar/blob/master/pyradar/classifiers/isodata.py | |
| # it works only for one-dimensional vectors :-( | |
| # P.S. | |
| # I've made it for university lab that's why you can find test values at the end of the file. (and that's why code so flipping bad XD) | |
| # And I was shocked that there is no complete implementation of this algorithm on the internet o_O. | |
| # Hope this helped:3 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| import cmath | |
| import os.path | |
| class ISOData: | |
| ''' | |
| @descriptions: ISOData Algorithm implementation. |