For any two documents x and z, define k(x; z) to equal the number of unique words that occur in both x and z (i.e., the size of the intersection of the sets of words in the two documents). Is this function a kernel? Justify your answer. Remember k(x; z) is a kernel if there exists (x) such that k(x; z) = (x)T (z)

Respuesta :

Answer:

Yes, the function is a kernel

Step-by-step explanation:

Given

Document x an z

Function definition! k(x:z)

We want to show that the above is a kernel.

To do this, we'll explicitly construct feature vectors φ(x) and φ(z)

This gives;

K(x,z) =φ(x)·φ(z).

Given than any document; say x and z

A vocabulary V can be constructed.

Vocabulary V must have a finite size of words in the document set..

The feature mapping is constructed as φ(x) for x by the following:

For the kth word wk in V, if wk appears in document x, assign φ(x) k(the kth element ofφ(x)) to be 1; else φ(x)k to 0.

Then the number of unique words common in x and z is φ(x)·φ(z), giving us the kernel

.

ACCESS MORE
EDU ACCESS