Thursday, December 13, 2007

Elastic Boogy

All this pattern matching is producing lots of numbers and I don't want to examine long lists of matching scores anymore. I came up with the idea to build a viewer that would show me the similarity of a large number of sources in an attractive way.

Let me show you the result first and afterwards tell you how it was done. I took the same set of graphical icons as before and matched them with each other. I'm afraid the resolution of the uploaded video is worse than I expected, but hopefully your eyes can manage.




The icons are firstly placed in a random way and then start to mingle and cluster with similar icons. Notice for example how the red hearts start clustering almost immediately. Then the two red alarm clocks on the left edge decide they want to meet desperately. Finally a blue ID pass starts moving up from the bottom to get intimate with its best friend. See how they move in groups when they have found their 'best friends'.

I can tell you, for me it is so much more pleasing to see those icons crawl around instead of analysing all the matching scores in Excel!

Nerd-mode on:

The underlying technique is based on a force-directed graph of interconnected nodes. Each node is connected to every other node by a spring with a natural length based on the matching score of the two nodes. Similar nodes therefore have a tendency to stay close.

Apart from this spring attraction force we need a repulsion force to prevent the nodes from overlapping too much. Each node is considered an electrical charged particle with equal charge and therefore every pair of nodes undergoes Coulomb repulsion. There are some parameters to tweak to influence the behaviour such as the stiffness of the spring and the strength of repulsion. The code was actually far more simpler than I expected. The visualisation was done with DirectX 9.

Talk to you later!

Saturday, December 8, 2007

Dancing Emptiness

Yesterday I was looking for an image that really expressed the essence of this research. No, actually this goes further than 'research' because this sounds too much like a laboratory set-up where the observer is not part of the experiment. Wrong, the observer is right in the middle of it, participating and influencing the outcome. So let's call this an inquiry instead.

The theme of this inquiry is the similarity of patterns arising in our world. There is no real need to understand why and how these patterns arise. Their manifestation is miraculous to us and can be admired without knowing the reason of their existence. Instead this inquiry focuses on similarity between these patterns. Actually the similarity of patterns is a (meta-)pattern itself. Observation is an action. An observer pattern interacts with an object pattern, like interfering waves, creating a new pattern. The pattern is not built from subatomic particles, it is more like condensed nothingness. It is not a dead, inactive nothingness, but an emptiness full of potential. A lot of people call it Consciousness. Consciousness is the stage for things to happen.

This next picture expresses this relation between formless Consciousness and its patterns very well for me. It is a scene from Hindu mythology where Shiva, representing Consciousness, and Shakti personified as the goddess Parvati, representing the patterns (energy) manifesting in our universe, dance.


This is the dance of Consciousness observing itself through the manifestations of patterns. This is the dance that takes place every second, everywhere in every universe.

Thursday, December 6, 2007

Making Money

Last week I told you I wanted to link some other data sources to my Crazy Diamonds system besides 2D images. I found a nice dutch stock market site (www.belegger.nl) that provided me with price history for all AEX (Amsterdam Exchange index) stocks. I hooked this source of financial data up to my system and was ready to look for similarity patterns.

I decided it would be nice to take the AEX index itself into account, to really see interesting movements of a stock price relative to the main direction of the financial market, represented by this AEX index. For you nerds out there: I added the capability for amplitude modulation and demodulation using the AEX index as the carrier and the actual stock price as the output value. From the stock value and AEX carrier value at a given time, I derive the signal which is the movement of the stock compared to the current AEX index. This signal is used for the pattern matching.

My first goal is to find similarities between AEX stocks in the last year (2007). Not all AEX stocks were included because I selected the stocks with at least a 5 year history. The Crazy system started matching all stocks and came up with some amazing similarities. Take a look at the next picture for yourself:


You can click it to enlarge. You see pairs of stocks with the right one being the best match for the left stock. It really struck me that some are really similar, check out source "Fortis" with best match "Randstad" for example. I'm not a financial analyst and have no idea if there is a reason for this match. I'd better check data from the previous years to find out if this is a reoccuring event. We also see a clear similarity between "Fortis" and "ING" which seems very possible, them being both banks.

If you would like to see more stock similarity pictures, give me a note and I'll send you some.

I will start thinking about ways to visualise similarity in large sets of data sources. For example it would be nice to have 2D or even 3D overviews showing similar data sources in clusters, enabling us to categorise sources automatically. Oh well, that's enough for now!

Wednesday, November 28, 2007

Icon Shuffle

I have a large collection of icons and thought it would be interesting to see if the software would be able to detect similarity between them. The next picture shows you a subset of my icons and you can see some of them are quite similar. Click it to enlarge.



I've written some code to compare all icons to each other and the next picture shows you how the icons are paired. The right icon of each pair is the best found match for the left icon.



Overall the matching is quite okay. In most cases it finds a variant of an icon as its best match. Sometimes the best match is weird, because there is a variant but it is not selected. For some reason the red heart is chosen as best match in a number of cases.

Sometimes the best match is really another object but we can understand the similarity. For example this one where the flow of the object probably caused the match:


Or this one where the colours and form match quite well:


And the roundness of these two objects:


Okay, I'll be moving on to other data sources from now on. I found a site where I can easily retrieve stock market data and feed it into the Crazy Diamonds engine. Again I'm going to search for similarity but now for stock value history. Maybe we'll come up with some interesting reoccuring patterns there. I'll let you know soon!

Sunday, November 25, 2007

First Contact

I've been tweaking my Crazy algorithms for the last week with ups and downs but finally a configuration came out that I'm quite happy with for the moment. I've been using 2D images to test my software and in this post I want to show you some results. It is not spectacular at all (yet) but it shows that base system is able to recognise patterns in different images. So let's take a look at some examples:

First I drawed a very schematic toucan (3 ellipsoids) and compared that with one of my Vista backgrounds (toucan in a forest). The software scans the background image and searches 3 spots that match my schematic drawing as good as possible. Here we have the input images and the results:


We see the 3 spots the system found. The result images are grey because we only visualise the luminance feature. The top image is the best match, the bottom image the worst of the 3. Although our query image was very schematic it is able to find two acceptable results. The third result is just plain rubbish but I didn't analyse why this spot came up in the matching. Two out of three ain't bad said Meatloaf.

In my next test I put a bit more effort in drawing the toucan by hand to see if the matching result would improve considerably. And guess what!

Yep now it was able to really pinpoint the toucan in the picture. The best result is on the left, the worst on the right. The best two results really match the drawn toucan very well. I felt like a happy bunny...

Not all tests were successfull. For example, I tried to find a flower bud in a field of flowers and it couldn't find it unless I tweaked the parameters to make it find it. But overall I was quite pleased with the results. Finally I decided it was time for an Eye Test:

I asked the Crazy system to find me some letters and I'll show you the results for searching 'A' here:

This result really thrilled me because Crazy didn't only find the A instance I was looking for (top result) but also its little brother (bottom result)! Here we can see that wavelet decomposition extracts pattern data on multiple resolutions and therefore find the smaller 'A'. Cool!

I can show you more pictures, but you probably get the idea from the examples above. I'll come back to you soon with new Crazy results, bye bye for now.

Let's get technical

Okay, let's have a look at our technical design.


The picture above shows the main modules of our pattern extraction / matching system:

The Source Linking module links binary data sources such as images, music/sounds, texts and stock trading data to the system.

The Pattern Analysis module extracts characteristic patterns from the data source using wavelet decomposition techniques.

The Pattern Storage module stores all pattern information in a datastore. Each data source consists of a set of features, such as luminance and colour intensity for images.

The most interesting part is the Pattern Matching module that is able to calculate the similarity of patterns. The matching function is based on the Earth Mover's Distance algorithm and is able to compare n-dimensional patterns and therefore capable to match patterns for a range of different types of data sources (e.g. stock exchange data, images, sound, 3D flight patterns etc.)

Next time I''l show some first results of the system in action.

Introduction

In this blog I will be presenting new results of my ongoing "Crazy Diamonds" project. This 'research' project assumes that everything in our universe can be expressed as a pattern interfering with other patterns. Interfering patterns generate new patterns. Every pattern needs a medium (carrier) to express itself and we introduce 'Consciousness 'as this underlying medium. Consciousness is the living essence of all that is, not observable because it is the observing itself. I told you this was going to be easy.

I have a more detailed project introduction on my website, but for now it is only available in dutch:

http://www.indranet.nl/crazydiamonds1.htm

If you would like to have a summary in English, please let me know. Other suggestions, reactions are always welcome!

The project does not have a clear goal in mind, but it will focus on how we can present things as patterns and how these patterns relate to each other. Maybe, just maybe, I will find out how weather changes in the Middle-East are affecting the stock market in New York, in which case I will be swimming in money very soon :-) Naturally you can start buying "Crazy Diamonds" stocks right now, just send me a note.