Folksonomizer

Folksonomizer

This project is a successor of ARTFolksonomy where I have used an ART-1 neural network in order to perform the folksonomy based classification. Folksonomizer has been implemented in .NET 4.0 to perform CPU based classification and in CUDA C/C++ to perform GPU based parallel computations. This project has been a bit of challenge for me since I'm not an experienced C++ programmer. I had to remind how to use pointers or learn how to use ODBC drivers to perform SQL queries on the database.

To give you an overview of how CUDA C/C++ code looks like take a look at this sample GPU kernel code:

__global__ void Classify(int* clusters, int clustersCount, int* photos, int currentPhotoIndex)
{
	int clusterIndex = threadIdx.x + blockDim.x * blockIdx.x;
	int* photo = (photos + currentPhotoIndex * PHOTO_ROW_SIZE);
	if(clusterIndex < clustersCount)
	{
		int* cluster = (clusters + clusterIndex * CLUSTER_ROW_SIZE);
		if(Match(cluster, photo))
		{
			*(cluster) = 1;
		}
		else
		{
			*(cluster) = 0;
		}
	}
}

Since GPU can run many threads in parallel, some of the computations that can be parallelized, are being done much faster than on the single CPU. For instance classification on the Core 2 Duo 2,53 GHz of 10k records have been done in ~5 seconds, while on the Geforce GT240M the same computations have been performed in ~2,5 second.

You can see the Folksonomizer based classification results here:

You can download the source code

If you want to learn more about this project