SVD Singular Value Decomposition in Python - machine-learning

I tried to solve SVD questions using python. This is the question:
Question. I already got the answer for this
The correct answer. I tried to use python to solve this case by looking at thee tutorial Here
But when I tried by myself. I found the value of U and VT are different from the correct answer. Here they are:My trial code
Can anyone point out what I did wrong here?

Related

How fisherface classifier works

Can anybody explain me how OPENCV fisherfaceclassifier works?
How it recognize the difference faces ?
It's important to understand that all OpenCV algorithms (usually) are based on a research papers or topics that can be researched and understood.
For FisherFace you can read about the background of it here to understand exactly how it works, this article discussed the background and implementation.
As for implementation of the Fisherface using (as your question is a little unclear) OpenCV provide a tutorial on how to get up and running, they also explain some background and importantly link out too all the underlying papers and research
I didn't really think this question is appropriate for SO as you really could have just googled your question and come to the same answer. I just thought it might be useful to understand how OpenCV is built up.

Mean Percentile Ranking (MPR) explanation

I am trying to use MPR as a metric to evaluate my recommendation system based on implicit feedback. Can somebody please explain MPR? I have gone through this paper
However, I can't seem to get an intuitive understanding.
Any help would be appreciated.
EDIT : I went through Microsoft's research on metrics for recommendation engine metrics
It is recommended that MPR is recommended when we're looking for one 'positive' result. Can somebody also explain why that is the case?
EDIT 2 :

how to apply genetic algorithm on 2d or multidimesional images for optimisation

I am trying to Code a genetic algorithm in Matlab but really dont know how it works in images and how to proceed? Is there any basic tutorial that can help me understand how to apply GA on images (starting from 2d to multidimentional images ).
That will be a great help for me.
Thanking everyone in anticipations.
Kind Regards.
For GA you need two things: a fitness function that can evaluate any solution and tell how good it is, and a representation of your solution so that you can do crossover and mutation. Once you have these, you are good to go. I'm not an expert on image processing so I can't help you with that exactly.
Look at the book Essentials of metaheuristics which is a very good resource for start with evolutionary computation (and not only that) in general. It's free.
There is a paper on this subject which you can find at the IEEE library. I believe it solves the problem you vaguely describe.

QR decomposition in OpenCV

OpenCV provides SVD decomposition, but I cannot find general QR decomposition in its library. Is there any alternative to achieve this?
This is an old question, but for the sake of completeness (and because google took me here), here's the answer using OpenCV --
OpenCV has the solve() function, which can be invoked with a flag specifying the matrix inversion method to be used. Use the flag DECOMP_QR to perform a QR decomposition.
As someone mentioned 3 years ago, this is an old question (lolz)
But QR decomposition is very much possible in OpenCV. In 3.2 it can be done using cv::decomposeProjectionMatrix, as documented here: http://docs.opencv.org/trunk/d9/d0c/group__calib3d.html#gaaae5a7899faa1ffdf268cd9088940248
Note: I recognize I'm really answering for a specific case of QR decomposition (that on a projection matrix), but that doc page says that this function is based on RQDecomp3x3, which could be used for the generic RQ decomposition.
I'm answering this now as all of the answers that pop up when googling this are wrong in saying that it's not possible.
You can use a matrix library like Newmat11 http://www.robertnz.net/nm11.htm#qr

LshMatcher with opencv?

I am trying to use ORB descriptors with LshMatcher for a faster matching.
I have found somewhere LSH implementations (example: https://code.ros.org/trac/wg-ros-pkg/browser/branches/trunk_diamondback/stacks/object_recognition_experimental/rbrief/src/lsh.cpp)
But it seems it is not implemented yet in opencv 2.4.2.
Do you have any hint how to include LshMatcher within opencv?
I have asked the same question on the OpenCV dev forum, without a good answer.
http://answers.opencv.org/question/503/how-to-use-the-lshindexparams/
Yet, I hope for some more docs. You can just check it again in a few days to see whether there is a new answer.
BTW, if you try to use it with SIFT/SURF/ORB, which are float descriptors, as I know, it will not work LSH are for binary descriptors only.
Edit
It seems to be a bug in OpenCV (2.4.2), as stated in the accepted answer here
http://answers.opencv.org/question/503/how-to-use-the-lshindexparams/

Resources