{"id":730,"date":"2017-03-12T12:11:00","date_gmt":"2017-03-12T12:11:00","guid":{"rendered":"http:\/\/www.kelp-ml.org\/?page_id=730"},"modified":"2017-03-13T17:39:25","modified_gmt":"2017-03-13T17:39:25","slug":"kernels-on-pairs","status":"publish","type":"page","link":"http:\/\/www.kelp-ml.org\/?page_id=730","title":{"rendered":"Kernels on Pairs"},"content":{"rendered":"<p>They are implementations of the class <a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/KernelOnPairs.html\">KernelOnPairs<\/a>\u00a0and operate on instances of the class <a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/data\/example\/ExamplePair.html\">ExamplePair<\/a>.<\/p>\n<hr \/>\n<h3>Preference Kernel<\/h3>\n<p><strong>Java class<\/strong>: PreferenceKernel<\/p>\n<p>Source code: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\/blob\/master\/src\/main\/java\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/PreferenceKernel.java\" target=\"_blank\">PreferenceKernel.java<\/a><\/p>\n<p><strong>Maven Project<\/strong>: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\">kelp-core<\/a><\/p>\n<p><strong>JSON type<\/strong>:\u00a0preference<\/p>\n<p><strong>Description<\/strong>: in the learning to rank scenario, the preference kernel (Shen and Joshi, 2003) compares two pairs of ordered objects <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-529bbcec1a3a3b03df6fd9a63f5cb91e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#97;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"96\" style=\"vertical-align: -5px;\"\/> and <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-e6bd51843c4087eaafdbbe0022aa4376_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#98;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"91\" style=\"vertical-align: -5px;\"\/>:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-d708dbc909608368fd2450e2754eb4bf_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#32;&#40;&#32;&#112;&#95;&#97;&#44;&#32;&#112;&#95;&#98;&#32;&#41;&#32;&#61;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#49;&#41;&#32;&#43;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;&#32;&#45;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;&#32;&#45;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#49;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"497\" style=\"vertical-align: -4px;\"\/><\/p>\n<p>where <em>BK<\/em> is a generic kernel operating on the elements of the pairs. The underlying idea is to evaluate whether the first pair<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-8fc28837bec807e2fd0e358038df0e5c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"53\" style=\"vertical-align: -5px;\"\/> aligns better to the second pair in its regular order<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-022d6ac7058ad27f9b6579ad5af717b8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"49\" style=\"vertical-align: -5px;\"\/> rather than to its inverted order<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-642909b4805517437596fd08fce78184_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#50;&#44;&#32;&#98;&#95;&#49;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"49\" style=\"vertical-align: -5px;\"\/>.<\/p>\n<p><strong>Parameters<\/strong>:<\/p>\n<ul>\n<li><em>baseKernel<\/em>: the base kernel <em>BK<\/em> applied over the elements of the pairs.<\/li>\n<\/ul>\n<hr \/>\n<h3>Uncrossed Pairwise Sum Kernel<\/h3>\n<p><strong>Java class<\/strong>:\u00a0<a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/UncrossedPairwiseSumKernel.html\">UncrossedPairwiseSumKernel<\/a><\/p>\n<p><strong>Source code<\/strong>:\u00a0<a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\/blob\/master\/src\/main\/java\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/UncrossedPairwiseSumKernel.java\" target=\"_blank\">UncrossedPairwiseSumKernel.java<\/a><\/p>\n<p><strong>Maven Project<\/strong>: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\">kelp-core<\/a><\/p>\n<p><strong>JSON type<\/strong>:\u00a0uncrossedPairwiseSum<\/p>\n<p><strong>Description<\/strong>: it\u00a0compares two pairs of ordered objects <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-529bbcec1a3a3b03df6fd9a63f5cb91e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#97;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"96\" style=\"vertical-align: -5px;\"\/> and <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-e6bd51843c4087eaafdbbe0022aa4376_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#98;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"91\" style=\"vertical-align: -5px;\"\/>, summing the contributions of the single element similarities:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-85e63376de0372b828df5611c74d08d7_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#32;&#40;&#32;&#112;&#95;&#97;&#44;&#32;&#112;&#95;&#98;&#32;&#41;&#32;&#61;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#49;&#41;&#32;&#43;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"284\" style=\"vertical-align: -4px;\"\/><\/p>\n<p>where <em>BK<\/em> is a generic kernel operating on the elements of the pairs. It has been used in learning scenarios where the elements within a pair have different roles, such as <em>text<\/em> and <em>hypothesis<\/em> in Recognizing Textual Entailment (Filice\u00a0et al., 2015), or <em>question<\/em> and <em>answer<\/em> in Question Answering\u00a0(Filice et al., 2016).<\/p>\n<p><strong>Parameters<\/strong>:<\/p>\n<ul>\n<li><em>baseKernel<\/em>: the base kernel <em>BK<\/em> applied over the elements of the pairs.<\/li>\n<li><em>intrapairSimProduct<\/em>: whether adding or not to the kernel combination an extra term equivalent to the multiplication of the intra-pair similarities, i.e., <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-de31b9b5c73c43bdfd798544ef09a4e0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#97;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"181\" style=\"vertical-align: -4px;\"\/>.<\/li>\n<\/ul>\n<hr \/>\n<h3>Uncrossed Pairwise Product\u00a0Kernel<\/h3>\n<p><strong>Java class<\/strong>: <a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/UncrossedPairwiseProductKernel.html\">UncrossedPairwiseProductKernel<\/a><\/p>\n<p><b>Source code<\/b>:\u00a0<a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\/blob\/master\/src\/main\/java\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/UncrossedPairwiseProductKernel.java\" target=\"_blank\">UncrossedPairwiseProductKernel.java<\/a><\/p>\n<p><strong>Maven Project<\/strong>: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\">kelp-core<\/a><\/p>\n<p><strong>JSON type<\/strong>:\u00a0uncrossedPairwiseProduct<\/p>\n<p><strong>Description<\/strong>: it\u00a0compares two pairs of ordered objects <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-529bbcec1a3a3b03df6fd9a63f5cb91e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#97;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"96\" style=\"vertical-align: -5px;\"\/> and <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-e6bd51843c4087eaafdbbe0022aa4376_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#98;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"91\" style=\"vertical-align: -5px;\"\/>, multiplying\u00a0the contributions of the single element similarities:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-a5ee8b4d7b39d22e113dba177c8c58f5_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#32;&#40;&#32;&#112;&#95;&#97;&#44;&#32;&#112;&#95;&#98;&#32;&#41;&#32;&#61;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#49;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"276\" style=\"vertical-align: -4px;\"\/><\/p>\n<p>where <em>BK<\/em> is a generic kernel operating on the elements of the pairs. As for the\u00a0<a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/UncrossedPairwiseSumKernel.html\">UncrossedPairwiseSumKernel<\/a>, it has been used in learning scenarios where the elements within a pair have different roles, such as <em>text<\/em> and <em>hypothesis<\/em> in Recognizing Textual Entailment (Filice\u00a0et al., 2015), or <em>question<\/em> and <em>answer<\/em> in Question Answering\u00a0(Filice et al., 2016). The product operation inherently applies a sort of logic and between the\u00a0<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-4ff25c2cefaf4e188031a8b3fc7457be_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#49;&#41;&#32;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"84\" style=\"vertical-align: -4px;\"\/> and\u00a0<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-bcf3b0974365dc8c92010ec40b5d4b82_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"84\" style=\"vertical-align: -4px;\"\/>.<\/p>\n<p><strong>Parameters<\/strong>:<\/p>\n<ul>\n<li><em>baseKernel<\/em>: the base kernel <em>BK<\/em> applied over the elements of the pairs.<\/li>\n<li><em>intrapairSimProduct<\/em>: whether adding or not to the kernel combination an extra term equivalent to the multiplication of the intra-pair similarities, i.e., <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-de31b9b5c73c43bdfd798544ef09a4e0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#97;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"181\" style=\"vertical-align: -4px;\"\/>.<\/li>\n<\/ul>\n<hr \/>\n<h3>Pairwise Sum Kernel<\/h3>\n<p><strong>Java class<\/strong>: <a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/PairwiseSumKernel.html\">PairwiseSumKernel<\/a><\/p>\n<p><strong>Source code<\/strong>:\u00a0<a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\/blob\/master\/src\/main\/java\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/PairwiseSumKernel.java\" target=\"_blank\">PairwiseSumKernel.java<\/a><\/p>\n<p><strong>Maven Project<\/strong>: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\">kelp-core<\/a><\/p>\n<p><strong>JSON type<\/strong>: pairwiseSum<\/p>\n<p><strong>Description<\/strong>: it\u00a0compares two pairs of objects <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-529bbcec1a3a3b03df6fd9a63f5cb91e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#97;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"96\" style=\"vertical-align: -5px;\"\/> and <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-e6bd51843c4087eaafdbbe0022aa4376_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#98;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"91\" style=\"vertical-align: -5px;\"\/>, summing the contributions of all pairwise similarities between the single elements:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-0714e713fb6b4e4dda471a1d1ba87159_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#32;&#40;&#32;&#112;&#95;&#97;&#44;&#32;&#112;&#95;&#98;&#32;&#41;&#32;&#61;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#49;&#41;&#32;&#43;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;&#32;&#43;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;&#32;&#43;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#49;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"497\" style=\"vertical-align: -4px;\"\/><\/p>\n<p>where <em>BK<\/em> is a generic kernel operating on the elements of the pairs. It has been used in symmetric tasks, such as Paraphrase Identification, where the elements within a pair are interchangeable (Filice\u00a0et al., 2015).<\/p>\n<p><strong>Parameters<\/strong>:<\/p>\n<ul>\n<li><em>baseKernel<\/em>: the base kernel <em>BK<\/em> applied over the elements of the pairs.<\/li>\n<li><em>intrapairSimProduct<\/em>: whether adding or not to the kernel combination an extra term equivalent to the multiplication of the intra-pair similarities, i.e., <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-de31b9b5c73c43bdfd798544ef09a4e0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#97;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"181\" style=\"vertical-align: -4px;\"\/>.<\/li>\n<\/ul>\n<hr \/>\n<h3>Pairwise Product Kernel<\/h3>\n<p><strong>Java class<\/strong>:\u00a0<a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/PairwiseProductKernel.html\">PairwiseProduct<\/a><\/p>\n<p><strong>Source code<\/strong>:\u00a0<a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\/blob\/master\/src\/main\/java\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/PairwiseProductKernel.java\" target=\"_blank\">PairwiseProduct.java<\/a><\/p>\n<p><strong>Maven Project<\/strong>: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\">kelp-core<\/a><\/p>\n<p><strong>JSON type<\/strong>: pairwiseProduct<\/p>\n<p><strong>Description<\/strong>: it\u00a0compares two pairs of objects <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-529bbcec1a3a3b03df6fd9a63f5cb91e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#97;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"96\" style=\"vertical-align: -5px;\"\/> and <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-e6bd51843c4087eaafdbbe0022aa4376_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#98;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"91\" style=\"vertical-align: -5px;\"\/>, summing the contributions of the two possible\u00a0pairwise alignments:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-f8cc00e109b1e1fb3df32bcb723d583f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#32;&#40;&#32;&#112;&#95;&#97;&#44;&#32;&#112;&#95;&#98;&#32;&#41;&#32;&#61;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#49;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;&#32;&#43;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#49;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"479\" style=\"vertical-align: -4px;\"\/><\/p>\n<p>where <em>BK<\/em> is a generic kernel operating on the elements of the pairs. It has been used in symmetric tasks, such as Paraphrase Identification, where the elements within a pair are interchangeable (Filice\u00a0et al., 2015).<\/p>\n<p><strong>Parameters<\/strong>:<\/p>\n<ul>\n<li><em>baseKernel<\/em>: the base kernel <em>BK<\/em> applied over the elements of the pairs.<\/li>\n<li><em>intrapairSimProduct<\/em>: whether adding or not to the kernel combination an extra term equivalent to the multiplication of the intra-pair similarities, i.e., <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-de31b9b5c73c43bdfd798544ef09a4e0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#97;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"181\" style=\"vertical-align: -4px;\"\/>.<\/li>\n<\/ul>\n<hr \/>\n<h3>Best Pairwise Alignment\u00a0Kernel<\/h3>\n<p><strong>Java class<\/strong>: <a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/BestPairwiseAlignmentKernel.html\">BestPairwiseAlignmentKernel<\/a><\/p>\n<p><strong>Source code<\/strong>:\u00a0<a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\/blob\/master\/src\/main\/java\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/BestPairwiseAlignmentKernel.java\" target=\"_blank\">BestPairwiseAlignmentKernel.java<\/a><\/p>\n<p><strong>Maven Project<\/strong>: <a href=\"https:\/\/github.com\/SAG-KeLP\/kelp-core\">kelp-core<\/a><\/p>\n<p><strong>JSON type<\/strong>:\u00a0bestPairwiseAlignment<\/p>\n<p><strong>Description<\/strong>: it compares two pairs of objects<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-529bbcec1a3a3b03df6fd9a63f5cb91e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#97;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#97;&#95;&#49;&#44;&#32;&#97;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"96\" style=\"vertical-align: -5px;\"\/> and <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-e6bd51843c4087eaafdbbe0022aa4376_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#112;&#95;&#98;&#32;&#61;&#32;&#92;&#108;&#97;&#110;&#103;&#108;&#101;&#32;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#32;&#92;&#114;&#97;&#110;&#103;&#108;&#101;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"91\" style=\"vertical-align: -5px;\"\/>, evaluating the best pairwise alignment:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-5115e15c5ccfaadd12c39f6171260b25_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#75;&#40;&#32;&#112;&#95;&#97;&#44;&#32;&#112;&#95;&#98;&#32;&#41;&#32;&#61;&#32;&#115;&#111;&#102;&#116;&#109;&#97;&#120;&#32;&#92;&#66;&#105;&#103;&#32;&#40;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#98;&#95;&#49;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#32;&#98;&#95;&#50;&#41;&#44;&#32;&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#98;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#97;&#95;&#50;&#44;&#98;&#95;&#49;&#41;&#32;&#92;&#66;&#105;&#103;&#32;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"33\" width=\"554\" style=\"vertical-align: -12px;\"\/><\/p>\n<p>where <em>BK<\/em> is a generic kernel operating on the elements of the pairs, and <em>softmax<\/em> is a function put in place of the max operation, which would cause <em>K<\/em>\u00a0not to be a valid kernel function (i.e.,\u00a0the resulting Gram matrix can violate the Mercer&#8217;s conditions). In particular,<img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-dfda441e94cdbafac5d3f51b3609eed3_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#115;&#111;&#102;&#116;&#109;&#97;&#120;&#36;&#40;&#120;&#95;&#49;&#44;&#120;&#95;&#50;&#41;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#99;&#125;&#32;&#92;&#108;&#111;&#103;&#40;&#92;&#101;&#120;&#112;&#40;&#99;&#32;&#120;&#95;&#49;&#41;&#32;&#43;&#32;&#92;&#101;&#120;&#112;&#40;&#99;&#32;&#120;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"346\" style=\"vertical-align: -6px;\"\/> (c=100 is accurate enough). The\u00a0<a href=\"http:\/\/www.kelp-ml.org\/kelp-javadoc\/current-version\/it\/uniroma2\/sag\/kelp\/kernel\/pairs\/BestPairwiseAlignmentKernel.html\">BestPairwiseAlignmentKernel<\/a>\u00a0has been used in symmetric tasks, such as Paraphrase Identification (Filice et al., 2015), where the elements within a pair are interchangeable.<\/p>\n<p><strong>Parameters<\/strong>:<\/p>\n<ul>\n<li><em>baseKernel<\/em>: the base kernel <em>BK<\/em> applied over the elements of the pairs.<\/li>\n<li><em>intrapairSimProduct<\/em>: whether adding or not to the kernel combination an extra term equivalent to the multiplication of the intra-pair similarities, i.e., <img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.kelp-ml.org\/wp-content\/ql-cache\/quicklatex.com-de31b9b5c73c43bdfd798544ef09a4e0_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#66;&#75;&#40;&#97;&#95;&#49;&#44;&#97;&#95;&#50;&#41;&#32;&#92;&#99;&#100;&#111;&#116;&#32;&#66;&#75;&#40;&#98;&#95;&#49;&#44;&#32;&#98;&#95;&#50;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"18\" width=\"181\" style=\"vertical-align: -4px;\"\/>.<\/li>\n<\/ul>\n<hr \/>\n<h3>References<\/h3>\n<p>Simone Filice, Giovanni Da San Martino and Alessandro Moschitti<em>. Relational Information for Learning from Structured Text Pairs. <\/em>In Proceedings of the 53<sup>rd<\/sup> Annual Meeting of the Association for Computational Linguistics, ACL 2015.<\/p>\n<p>Simone Filice, Danilo Croce, Alessandro Moschitti and Roberto Basili<em>. KeLP at SemEval-2016 Task 3: Learning Semantic Relations between Questions and Answers. <\/em>In Proceedings of the 10th International Workshop on Semantic Evaluation (SemEval 2016), Association for Computational Linguistics. (Best system @ SemEval-2016 task 3)<\/p>\n<p>Libin Shen and Aravind K. Joshi.\u00a0<em>An svm based voting algorithm with application to parse reranking<\/em>. In In Proc. of CoNLL 2003, pages 9\u201316, 2003<\/p>\n","protected":false},"excerpt":{"rendered":"<p>They are implementations of the class KernelOnPairs\u00a0and operate on instances of the class ExamplePair. Preference Kernel Java class: PreferenceKernel Source code: PreferenceKernel.java Maven Project: kelp-core JSON type:\u00a0preference Description: in the learning to rank scenario, the preference kernel (Shen and Joshi, 2003) compares two pairs of ordered objects and : where BK is a generic kernel <a href=\"http:\/\/www.kelp-ml.org\/?page_id=730\" rel=\"nofollow\"><span class=\"sr-only\">Read more about Kernels on Pairs<\/span>[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/730"}],"collection":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=730"}],"version-history":[{"count":7,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/730\/revisions"}],"predecessor-version":[{"id":793,"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=\/wp\/v2\/pages\/730\/revisions\/793"}],"wp:attachment":[{"href":"http:\/\/www.kelp-ml.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}