mentalalchemy


Project with useful tools and utilities for various research (and not only) fields.

Important

For now this library severely lacks documentation. Some examples can be obtained from the projects (see compounds folder) and comments. If you need more detailed information, feel free to ask me via e-mail (yurytsoy R2D2 gmail.com) or personally. I hope that such a 'documentation on demand' will allow covering most inquiries with minimal time.

Overview

This is a project, which represents a way to unite different algorithms and functions without regard to any problem, which can be solved with their use.

The general idea is that various methods and algorithms can be united using different levels of 'complexity', which define complexity of data types and operations over them. A good set of names for such levels can be taken from chemistry and their use in this project with example contents is shown below (just to catch up the idea).

| Subatomics
(most of them are implemented
by a programming language)
Baseline arithmetical operations +, -, , =, %, ++, -- Baseline logical operations >, <, >=, <=, ==, !=, !, &&, Baseline bit-wise operations &, |, ~ Baseline types int, char, float, double, long, pointers and references

| Atomics | |:------------| | Types | vectors (arrays, strings), matrices (2d arrays, tables),
basic structures, enumerations
Vector & Matrix operations
(of all kinds) +, -, , =, <, >, ==, != Special functions sin, cos, exp, log, power, sqrt, cat, baseline
statistics (min, max, average etc.) Utility functions Search, insert, remove, swap

Molecules Algorithms, using atomics
and subatomics Linear algebra (linear systems, eigen-values and vectors problem etc.),
numerical interpolation and differentiation, texts parsing. Conversion methods Methods, which convert arbitrary data types into explicit atomic
or subatomic data types. Files IO. Network IO. Types images, complex structures (structures of structures, structures
with atomic-type fields), classes, web-pages, GUI controls. Compounds Modules uniting subatomics,
atomics and molecules Software libraries and modules, plug-ins, user controls Basic and medium-complexity software
(with just a few special functions) Programs for solving of basic problems (Calculator, Paint) Complex compounds
(I'm seriously thinking
about necessity for this
level of complexity) Complex software Programs implementing various functions and rather rich functionality
(Word, Excel) Complex plug-ins and modules Modules with complex functions and methods (Matlab Simulink)

Project labels just depict my current research interests and probably the fields where the library is of the most use.

Features

For now the library includes the following features:

  • Atomic utility types and classes (LogWriter, 1d and 2d distance measure delegates, class to contain statistics, context RNG, graphs etc.)
  • Multiple utility methods for vectors and matrices (reading, writing, conversion, row/column representation, generation, arithmetics, statistics collection etc.)
  • Image processing and analysis methods (Gaussian and median filtering, Gabor filters, Sobel edge detector, Harris detector, image descriptions, random sampling, image quality evaluation, conversion to HSV color space, ).
  • Set of 'standard' machine learning algorithms (real-coded genetic algorithm, Kohonen's self-organization map, 1- and k- nearest neighbors, bagging with bootstrapping, simple probabilistic classifier with Bayesian update rule)
  • Two neuroevolutionary algorithms (evolution of neural network weights using RCGA, NEVA algorithm).
  • Methods for graphs (loading in Matlab format, calculation of shortest paths, calculation of degrees, random graphs generation).
  • A dozen of user controls for setting algrotihms parameters, selection of folders list etc. (see MentalAlchemy.Compounds namespace).
  • Parallel processing using OpenMP standard for several computationally costly algorithms (2D convolution, Kohonen map training, fitness evaluation, pairwise distances and others).

Why I started this project?

The reason to start this project is quite simple. I program a lot and it's often, when I write several projects in different domains simulteneously (for example, evolutionary computation, neural networks, image processing, numeric methods, etc.). From time to time I need to use some component which I already did, but with some minor changes, which often require sopy-paste of pretty large part of code, making changes and then preying that everything was ok.

There was a time when I thought about creating an extremely universal software architecture, which'll suit for each and every situation which can be met during programming. But this is a mere utopia. And then I read a good book 'Professional Software Development' by Steve McConnell, and eventually thought of an idea that there should not be an ultimate architecture, but rather set of very flexible components, which can be composed in many ways and thus giving a desired functionality. This is a good old idea of reusable components, but it took a long time for it to come into my mind, maybe due to some complexification bias in my thoughts.

The only question remaining was how not to get confused in a variety of methods, concerning very different application fields. That's why I introduced a kind of levels of complexity (see above), which should separate functions by what they do according to the abstraction level. And then again, that may be not the most original idea in the world, but that's just a story how I came to this :).


http://www2.clustrmaps.com/counter/maps.php?url=http://code.google.com/p/mentalalchemy/'>http://www2.clustrmaps.com/counter/index2.php?url=http://code.google.com/p/mentalalchemy/' alt='Locations of visitors to this page' title='Locations of visitors to this page' />

Project Information

Labels:
maths imageprocessing machinelearning