Cvnorm cvnormalize () use

Source: Internet
Author: User
Tags min svm

Generally simple process habits of their own implementation, OPENCV interface and there is no special specification of the document, but some functions of their own implementation and call OPENCV function efficiency or there is a big gap, the data access mode optimization should be a good understanding;

Cvnorm () Cvnormalize () basic implementation of all the normalization operation, not only support the traditional European distance (L2_norm), the parameters can be selected L1_norm already range stretching, the norm is the same, after careful look at the function interface parameter options, Although the OpenCV Library organization is not very good, but after so many years of perfect most operations will be supported;


For different norm_type, according to my Experiment (mask=null), the effect of A, B (A>b) is as follows:
Norm_type=cv_c, SRC is re-"scaled" (Rescale) to DST, so that the DST value is linearly mapped to the [0,1] interval. (A, B actually has no effect)
NORM_TYPE=CV_L1, or CV_L2, gets l1,l2 normalized DST. (A, B actually has no effect)
Norm_type=cv_minmax, SRC is scaled (rescale) and moved (translation) to DST, so that the DST values are linearly mapped to the [B,a] interval.

L1_norm: Each element is multiplied by 1/sqrt (1+4+5+6+7+10)
L2_norm: Each element is multiplied by 1/sqrt (1+16+25+36+49+100)
Cv_minmax: The algorithm that restricts each element to [a=5,b=0] is as follows: DST (i) = (src (i)-min (SRC)) * (5-0)/(max (src)-min (SRC))


A good explanation of the various norm:

Statistics people always like to engage in what "variable choice", the variable choice is actually the
limit condition is L0 Norm, but this thing is not good, so instead of seeking L1 Norm (using mean square error, is Lasso

, Of course, before the lasso out of the signal to deal with a similar job, bishop in the book to RVM a good way to
brag, in fact, RVM just implied to approximate a L0 Norm, so get more sparse than SVM solution (Tipping
Wrote RVM soon pointed out, but Bishop is not a mention, as if the Bayesian reasoning has more bull, in fact, a lot of questions
are covered up, hoping for a theory to explain all the phenomenon is always very dangerous). Recently bin Yu gave the
almost necessary and sufficient conditions for the consistency of La SSO.
  SVM also made a lot of L1 norm aspect of things (that is hinge loss in addition L1 norm do regularization items).
  about the regularization of the L1 norm can produce sparse solutions to hear a very vivid explanation, that figure (L1 norm is a ling
-shaped, L2 norm is a circle) everyone has seen it, likelihood (the error item in the objective function) is a circle, the time
to solve is to take this round to that diamond (L1 Norm) round (L2 Norm) throw, L1 words will likely hit the corner, the
sparse (above is 2-dimensional situation, the promotion of multidimensional will be more prone to hit the corner). But what if these variables are highly
closed. That likelihood is not a ball, it may be an ellipsoid, there may be a very very flat guy, this time
throw may and regularization of a large piece have come into contact with, it is very dangerous, the fruit fitting, if the data is small
, then it is to do cross-validation, One can never avoid fitting.
  It has been proposed that regularization items meet "sparsity, unbiasedness, continuity" so that LP does not have a

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.