Archive for the ‘definitions’ Category

kNN – k nearest neighbours algorithm

Posted on the February 9th, 2010 under data mining,definitions,web mining by

K Nearest Neighbours is a basic classification algorithm. The idea comes probably from the extension of Rote classifier, which is as simple as point system in ‘Whose line is it anyway’. System memorizes whole training set and classifies only items that have exactly same values as in training set. Obvious disadvantage is there will be a lot of  unclassified objects. The “next generation” of the concept says the classification occurs using the value of the nearest point in dataset. Comparing to previous way it is a huge difference, but still – system is vulnerable to noise and outliers.

KNN is (comparing to previous strategies) a bit more sophisticated. Algorithm finds a group of k-objects in training set under the condition of “distance” and according to the findings classifies the new object to the previously given class (cluster), respecting weights set to neighbours. Important issues are:

  • number of neighbours (it is important because it is in the name of the algo anyway)
  • the meaning of distance
  • training set is the basic

Parameters are very imporant to the results and I am going to write another post to discuss a little bit more about.

The procedure goes:

  1. Get the training set remembered (and prepared to update dynamically if data comes continously)
  2. Measure the distance between new object and object to training set, to find the nearests
  3. Use collected information to classify new object

In spite of the fact, building the model using kNN is not very difficult task, costs of classification are relatively high. Comparing new object with whole training set (lazy learning) is responsible for that and it is especially visible in large datasets. There are some techniques that reduce the amout of computation – from simply editing training set (sometimes results are even better than classification with larger database) to proximity graphs.

Sources: [Top 10 algorithms in data mining, Springer 2008]

K-means

Posted on the February 5th, 2010 under data mining,definitions,web content mining,web mining by

K-means algorithm (centroid algorithm; LGB) is a simple algorithm to partition given data into clusters. The main purpose is to keep the similarity of the data and simultanously to keep the minimal error. K-means is greedy algo type. The main idea is: choose randomly c clusters and then set all the objects that are close to the randomly chosen cluster to it’s class. Then update the center of the set of objects – relocate the central point, and again check if all objects are clustered to the nearest centroid. If not – update. Repeat acordingly.

The k-means complexity is O(cni). The main disadvantages is outliers and noise  can influence the result badly. The solution to the first problem is not to use means but medoids, which are not very sensitive to outliers (we just take the center of the set of data, not mean). There is also a danger to stuck in the local optimum – using k-means algo we always have to start several times using different starting sets of starting points.

However, k-means algorithm is the most popular partition algorithm. It is simple, easy to implement and scalable. Moreover, it is possible to use it with dynamic data. Improvement of k-means algorithm is generally connected with making it suitable for very large datasets – the best tries are kd-trees or triangular inequality.

Types inside web mining

Posted on the January 23rd, 2010 under definitions,general,web mining by

Looking at both data mining and web mining, there’s one main difference. When data mining operates generally on the content, web mining uses also structure of the data:

  • WEB CONTENT MINING operates on the content, most of the time it’s text (maybe that’s why WM is called also text mining)
  • WEB LINKAGE MINING is getting information from the structure of sites.
  • WEB USAGE MINING is getting information from logs – i.e. tracking user’s movement from one page to another

It gives a certain amout of possibilities that doesn’t count in usual data mining.