Data mining algorithms

Source: Internet
Author: User

Recommended algorithm: Find a similar user

    1. Manhattan Distance

Advantages: Fast calculation, best results in the case of data integrity

    1. Euclidean distance: Using the Pythagorean theorem

Solve the problem of different user scoring standards (fractional expansion)

  1. Minkowski distance (the combination of the r=1 , which is Manhattan,r=2 for Euclid,the GreaterR value, The difference of a single dimension university will have a greater impact on the overall distance)
  2. Pearson correlation coefficient: Measure the correlation between two variables [0--1],1 says it fits perfectly .]
  3. Cosine similarity: Handles the sparsity of data and skips over these non-0 values
  4. corrected cosine similarity: it is a coordinated filtering algorithm based on the model, which solves the phenomenon that the user evaluates the inconsistent "fractional expansion" of the items they like. Pros: Good scalability, fast operation for big data, low memory consumption
  5. S Lope One : The more popular item-based collaborative filtering algorithm (difference between two objects, weighted slope one algorithm) Benefits: simple, easy to implement.
  6. User-based collaborative filtering (between rows and rows): Compare one user to all other users and find similar people. Pros: Scalability: Bottlenecks in only thousands of users, but up to 1 million users

Sparsity: In most recommender systems, the number of items is much larger than the number of users, so the user evaluation of a small number of items is difficult to find two similar users for a large amount of data, which results in sparse data

9. Item-based collaborative filtering (between columns and columns): By calculating the distance between users to find similar users, and to recommend their comments to the target users, and then combined with the user's evaluation to give the recommendation results. By building an item similarity model to make recommendations,

10.KNN: Passive Learning algorithm: There is no need to prepare data in a specific form, but it requires a lot of memory to save training set data. One of the optimization methods: examining the nearest K-records around this record and not just one, it is better to increase the amount of data in the classification effect than to use a better algorithm, but in order to solve a problem rather than publish a paper, It's a bit more economical to increase the amount of data, but some of it adds a lot of data, but it's no more affordable than improving some algorithms.

    1. Accuracy of predictions
    2. Speed
    3. Robustness
    4. Scalability
    5. Explanatory

Data types in cluster analysis:

    1. Data matrix: with P variable to represent several objects (two-mode matrix)
    2. Dissimilarity Matrix: Stores the approximation between two objects (also called a single-mode matrix: Rows and columns represent the same entity)
    3. (i). The variable units selected by the interval scale variable (numeric variable) will directly affect the results of the clustering analysis (the standardization of variables - convert to a value with no units Z-score ) (ii) . meta Variables (iii) . nominal variable (converted to two yuan and then calculated)

One . text Clustering: 1. Corpus-based 2. based on the collection of all document words

text features : Count vector, TF (Word frequency)-idf (inverse text frequency index), Word embedding, subject model

Text Similarity calculation:

Cosine distance (cosine similarity)

TF-IDF: is a statistical method used to evaluate the importance of a word in a file set or one of a corpus, which increases in proportion to the number of occurrences in a file, but decreases inversely with the frequency with which he appears in the corpus.

TF: The frequency at which a given word appears in the file.

IDF: IDF for a particular term, which can be divided by the number of documents in the total document by the amount of the document in which the word is to be obtained.

TF-IDF and cosine similarity: used in the vector space model to judge the similarity between two sub-files.

Application Example: Interactive question and answer system --special form short text

long text-to-end text clustering is easy: 1. Word Volume 2. Many features, so in the short-term clustering to take into account the weight of the keyword, but only long text matching the number of the same word (also increase the weight of the word (TF-IDF) and then the problem of the feature extraction and then run K-means algorithm), often error

cluster: pattern recognition, spatial data analysis, economics (market research), World Wide Web ( documents on the WEB) are clustered to discover the same user pattern.

Hierarchical Clustering Method: iteratively iterating from the underlying aggregation and leaving only one classification.

Single-chain clustering: Two elements that are closest to each other are determined.

Full-chain clustering: The two elements that are farthest apart from each other are determined by the two categories.

Average chain clustering: Determine the distance between categories by calculating the average distance between the two elements in the classification.

K-mean:

    1. Partitioning method
    2. Hierarchy of methods (condensed, split)
    3. Density-based approach (distance based, ball or circle only)
    4. A method based on grid
    5. Model-based approach

Case: Purchase recommendation System application, page clustering, user clustering, dynamic promotion system function (convenient for users to search and browse, enhance the role of advertising, promote online sales, improve user loyalty)

steps: 1. randomly select k points as the starting point of the cluster 2. It is then allocated according to the distance from the other point to the center point. 3. The Compute Center Point serves as the starting point for the next calculation.

disadvantage: Because the starting point is random, can not guarantee that the result is optimal, can only be guaranteed to be local optimal, but k-means++ resolves this issue.

k-means++

1. randomly select 1 points 2. calculate the distance from each point to the center point, and select the minimum value as D ( DP ) 3. randomly take a point as the center point based on the probability of D (DP) (each selection will be as far away from the existing center point as possible)

determine the good or bad of the clustering result: squared error sum ( SSE) (Dispersion degree: Calculates the sum of squares of the distance from each point to the center point)

Evaluation algorithm: The complexity of the algorithm (that is, when the algorithm is written as an executable program, the runtime requires resources, resources including time resources and memory resources. )

Naive Bayesian Advantages: Given the confidence level of the classification results, and he is an active learning algorithm, need less training set, high computational efficiency, according to the training set to build a model, and use this model to classify new records, so the speed will be very fast.

Naive Bayesian Disadvantage: Unable to learn the interplay between features.

TAN is a Bayesian classification algorithm to reduce the independence of each attribute

13.Apriori: is a frequent itemsets algorithm for mining Association rules. Its core is based on the two-stage frequency set of the idea of the ground-push algorithm.

Association rules:

(i). frequent itemsets: If the itemsets are more frequent than (minimum support X D The total number of transactions in) is a frequent itemsets. Strong association rules produced by frequent itemsets, which meet the rules of minimum support and minimum confidence level.

Boolean Association rules, Quantitative Association rules, multilevel Association rules and Multidimensional Association rules

Measurement of interest: confidence, support, noise and novelty.

steps: 1. get frequent itemsets 2.FP tree Frequent patterns to avoid many candidates,

Advantages: for large database processing ability, it is not necessary to read the number library into memory to complete the frequent itemsets mining.  
Disadvantages: need to scan the database multiple times, inefficient.

Association Rules cluster System ( ARCS) Correlations or dependencies between events using correlation variables.

Correlation Analysis: Confidence level

fpgrowth: The basic idea is to compress the raw data onto a fptree , and to excavate the frequent itemsets on the tree.

Advantages:
  1) only need to scan both sides of the database, high efficiency.  
  2) can be parallelized implementation.  
Disadvantages:
  1) Limited by memory size.

Note:

(1) http://blog.csdn.net/huagong_adu/article/details/17739247  (2) Http://www.cnblogs.com/zhangchaoyang /articles/2198946.html

15.AdaBoost algorithm : An iterative algorithm that sets up different weak classifiers to form a stronger final classifier (strong classifier).

Advantages: High Precision

Cons: Easy to fit

16.DBSCAN: the density-based clustering method with noise is a typical density clustering algorithm, and K-means,BIRCH These are generally only applicable to convex sample sets, compared to clustering, the DBSCAN can be applied to both convex and non-convex sample sets. The K-mean uses the prototype-based concept of clusters, whereas Dbscan uses a density-based concept. K mean is difficult to deal with non-spherical clusters and different sizes of clusters, Dbscan can handle different sizes and different shapes of clusters. K-mean values can be found in clusters that are not clearly separated, even if the clusters overlap, but the dbscan merge with overlapping clusters

themax EM expectation algorithm is the algorithm for finding the maximum likelihood estimation of parameters in probabilistic models, in which the probabilistic model relies on invisible hidden variables. Under the condition of information integrity,The ML method is easy to estimate parameters. Algorithm of One way of thinking is to let one step first, throw a random initial value, and then iteratively calculate the value of the other side. Until the calculation results converge. EM algorithm has a very important use in the Gaussian mixture model GMM (Gaussian Mixture models). In simple terms, GMM is a combination of some Gaussian distributions. If we know the category of the observed data, we can estimate the parameters of GMM according to ML. Conversely, for a bunch of data without a category of information, if we know the parameters of GMM, it is easy to classify them into different classes with the Bayesian formula, but the awkward problem is that we do not have the GMM parameters and we don't know the categories of the observed data. commonly used in the field of machine learning and computer vision data aggregation.

18.SVM: Full name is Support vector machines, or SVM, are mainly used to solve the problem of data classification in the field of pattern recognition, which belongs to a supervised learning algorithm. The problem that SVM solves can be described by a classic two classification problem. 1, the red and blue two-dimensional data points can be separated by a straight line, in the field of pattern recognition is called linear separable problem. However, there is clearly more than one line separating two types of data points. Figure 1 (b) and (c) respectively give a, b two different classification schemes, in which the black solid line is the boundary, the term is called " decision-making surface ". Each decision is confronted with a linear classifier .

The decision-making surface of "maximal interval" is the optimal solution to be searched by SVM. The sample point that the true optimal solution crosses on both sides of the dashed line is the Support sample point in SVM, called the support vector. In the linear SVM algorithm, the objective function is obviously the "classification interval", while the optimization object is the decision surface.

19.PageRank: The value of the website is measured by the number and quality of the external links and internal links of the website, i.e. "link popularity"

. birch algorithm : balanced iterative protocols and clustering using hierarchical methods Using a tree structure to help us quickly cluster, the number structure is similar to the balance b+ (clustering Feature Tree cf tree) Span style= "font-family: Song Body" >. Each node of this tree is composed of several cluster features CF) CF CF

Prior algorithm The core idea is based on the fact that an item set is a frequent itemsets, and all its subsets must be frequent itemsets; an item set is not a frequent item, and its superset must not be a frequent itemsets. In the process of finding the largest frequent item in a transaction, we only need to expand the subset of the frequent items, which greatly reduces the search space.

nearest neighbor algorithm and naive Bayesian algorithm: It uses numeric data, and naive Bayesian algorithms use data of a sub-type. You can divide the data into several ranges as a taxonomy and use naive Bayes.

Decision Tree Type: C4.5 and NB are known as the two most widely used classifier models.

Bayesian algorithm: The disadvantage that the nearest neighbor algorithm cannot quantify the confidence of the classification results. The calculated probability is an estimate of the true probability, and the true probability is the statistic of the whole data, and the sentiment analysis is done by naive Bayesian. Advantages: The model requires few parameters, the missing value data is not too sensitive, the algorithm is relatively simple, with the smallest error rate (theoretically), but the actual disadvantage: The model assumes that the attributes are independent of each other, but in practical applications are often not established, the number of properties is more or the correlation between the property is large,NBC the classification efficiency of the model is inferior to the decision tree model. the performance of theNBC model is best when the attribute correlation is small .

The three models commonly used by naive Bayes are:

Gaussian model: The case that the processing feature is a continuous type variable

Polynomial models: The most common, requiring features to be discrete data

Bernoulli model: Requires a feature to be discrete and Boolean, that is , true and false, or 1 and 0

Practical Application Scenarios

Text classification

Junk Mail filtering

Patient classification

Spell check

25.CART: fully automated mechanism to handle missing value problems efficiently ( 1. evaluation of Split attributes 2. training data across nodes 3. The test data crosses the node and gets the final category assignment. The idea of dividing the self-variable space recursively, and pruning with the validation data.

The CART algorithm consists of the following two steps:

Decision Tree Generation: Build decision tree based on training data set, make decision tree as large as possible;

Decision tree Pruning: Using the validation data set to prune the generated tree and select the optimal subtree, the loss function is minimized as a pruning criterion.

To prevent undue adaptation in classification:

    1. First pruning: Setting the appropriate threshold (how to choose (difficult))
    2. post-pruning: a tree with "full growth" cut off branches, looking at the correct rate and error rate

Pre-pruning basis:

Minimum number of samples to be included as leaf nodes or as root nodes

Number of layers in the decision tree

The experience entropy of the node is less than a certain threshold to stop.

The difference between the algorithms:

ID3: Feature partitioning based on information gain

C4.5: The feature Division is based on the information gain ratio, the classification rules are easy to understand and the accuracy rate is high. Disadvantage: In the process of constructing the tree, the data sets need to be scanned and sorted several times, resulting in inefficient algorithm.

CART: (Classification and regression tree) feature division based on Gini index

algorithm requirements: should be able to have the following 9 indicators

      1. Scalable (can handle large amounts of data)
      2. Ability to handle different data types
      3. Ability to discover any shape
      4. Minimization of domain knowledge used to determine input parameters
      5. Ability to process noise data
      6. Insensitive to the order in which data is entered
      7. High latitudes
      8. Constraint-based clustering
      9. Explanatory and usability

Data mining algorithms

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.