Thursday, April 30, 2009
Wednesday, April 29, 2009
Tuesday, April 28, 2009
Monday, April 27, 2009
a truncate random walk starting from it the probability of hitting a relevant node before an irrelevant one is large. Here below an example.
Sunday, April 26, 2009
Saturday, April 25, 2009
- a binning and histogram based approximation, for the sequential version of the algorithm.
- a FGPA-based implementation, for the parallel version of the algorithm.
Friday, April 24, 2009
Thursday, April 23, 2009
Wednesday, April 22, 2009
Tuesday, April 21, 2009
DuckDuckGo is a simple combination of Yahoo's Boss and Wikipedia. Anyway, I like the clean interface and the concepts extracted from Wikipedia.
Friday, April 17, 2009
For example, a search for Bruce Springsteen is presently showing a rich mix of images, scheduled events, web pages, and news results for the performer, and if you hover your mouse over the image next to the news results for Bruce Springsteen at Ask.com, the news video starts playing.
They sound interesting to me, too. I do like their focus on providing timely information.
I looked at search results for “Bruce Springsteen” in Google, Yahoo, and Ask, to see how current the information was from each. All three had fairly up-to-date news information. Ask actually had a richer results than the other two in terms of the images that they displayed, and their listing of future “events” or concerts for Springsteen.
Wednesday, April 15, 2009
Here you have a Naive implementation of Naive Bayesan Classifier.
Friday, April 10, 2009
Wednesday, April 8, 2009
E.g. 2 ways of getting 3 (2+1, 1+2). 1 way of getting 12 (6+6), etc
PS: this puzzle is quite interesting. You need a way to encode dice. It turns out this can leverage the representation of polynomial
Tuesday, April 7, 2009
Let's see: we can formulate the problem with 2 balls as a recursion problem. Let f(k) the maximum number of floors we can test with k drops and using 2 balls. If a ball breaks at a floor k, we need to start from the very ground up to the k floor and test all the k floors. If the ball is not breaking we need to test f(k-1). Therefore, the recursion is f(k) = f(k-1) + k. In other words f(k) = sum_i=1,..k i = k (k+1) / 2. We need to find the minimum k such that k(k+1)/2 > 100. This can be solved by direct test and we find that 14 (15/2) = 105. The number of test we obtain is 14. If we want to know what are the floor to test we can "unroll" the recursion and find the actual floors.
Now suppose you have 3 balls, can you see the problem as a recursion one? And what about m balls?
Monday, April 6, 2009
Sunday, April 5, 2009
Saturday, April 4, 2009
SOR has been frequently used for computing PageRank (see Adaptive Methods for the Computation of PageRank , A Survey on PageRank Computing , Comparison of Krylov subspace methods on the PageRank problem ).
Here you have the code for SOR solver in C++
PS: if you are interested in Linear Solvers with C++, I suggest using Dolfin, which provides high-performance linear algebra through uBLAS, PETSc, Trilinos and MTL4 (experimental) with simple C++ and Python wrappers.
Friday, April 3, 2009
Please note that a complete Decision Tree implementation should also incorporate some pruning strategy, but I will leave this to the interested reader ;-)
Thursday, April 2, 2009
I found no generic implementation, but the original C implementation of Daniel Sleator and Robert Tarjan. Therefore, I decided to transform this implementation into generic C++ with templates.
Here you have the C++ code for Splay Trees (adapted by the original C version)
Well, what I found is a larger golden mine. The Computational Geometry Algorithms Library (CGAL) is a software library that aims to provide easy access to efficient and reliable algorithms in computational geometry. While primarily written in C++, Python bindings are also available.
The table of content shows an impressive amount of already cooked algorithms and data structures, ranging from basic 2D and 3D Geometry Kernel, to Convex Hulls and Delaunay Triangulations, to Voronoi Diagrams.
I found the Search Structures part quite interesting with implementations of 2D Range and Neighbor Search , Interval Skip List, Spatial Searching ( Neighbor Searching , Range Searching , - tree ), Range and Segment Trees, Intersecting Sequences of dD Boxes.
The library has additional tools for Linear and Quadratic Programming Solver and Spatial Sorting and support for third party software such as the GUI libraries Qt, Geomview, and the Boost Graph Library. (Gosh all these are together?)
A huge amount of software all using Template C++ with an approach similar to Boost.
I take what I need for my coding task, but this is bookmarked and I will discuss about it more intensively in the future.
Wednesday, April 1, 2009
Here you have the C++ for Fuzzy Clustering (it uses Boost::uBlas for matrix operations)