Posts

kMean Blues

I have written a basic kMeans algorithm in java which takes in a two dimensional cluster field expressed as a series of points described in a CSV file. The algorithm should place a given number of potential centers in the space and associates each point with its nearest potential center. The centers are then moved to the average location of their associated points, and the points are rechecked and re-associated with their newest nearest neighbors. The catch being that it must be known the number of clusters the algorithm should look for. There are other clustering algorithms; but, to my admittedly limited understanding, kMeans is by far the easiest to implement. I am currently bouncing between two different implementation methods in Java: one a more functional approach, and the other more object oriented. The functional approach involves parsing the CSV file into a two dimensional array, the first index of which represents the coordinate, and the second representing the point index...

Schwoop, Roadblocks

One of the major subjects to learn when approaching any programming language is the importing, parsing and utilization of external files (ie images, csv files ect). This subject is not always intuitive, and how the program compiles changes how you point to the file you wish to import. So far, I have imported and parsed text and image files as a part of my java application. However, I must have done something to upset my IDE, for it refuses to recognize a true type font file (.ttf). I have written all the appropriate code for importing, parsing and utilizing the font. But I keep running into a compile time error that prevents the font from being loaded. I suppose this is a good time to cut out the middle man and learn how to manage packages by writing my code in a text editor and compiling through command line interface.