stringkerneldemo.m

来自「Proteins _ String Kernel」· M 代码 · 共 22 行

M
22
字号
%This file compares two string kernel similarity measures. The first is a simple string kernel,%and the second is the mismatch kernel.%Arthur Gretton%Input two stringsdisp('NOTE: strings must contain only characters "a" through "z", since this code was designed for protein strings')string1 = input('Type the first string:','s');string2 = input('Type the second string:','s');seqLength=input('Length of the subsequences being compared:')bothStrings={string1,string2};K_simple = simpleStringKernel(seqLength,bothStrings);K_mismatch = mismatchStringKernel(seqLength,bothStrings);disp('The spectrum kernel similarity score is:');K_simpledisp('The mismatch kernel similarity score is:');K_mismatch

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?