如何确定哪些配置文件与一组测试用例的最佳匹配?

时间:2013-12-03 07:09:28

标签: r agrep

我有一个案例,我有一个需求(配置文件)的描述和一些我希望与配置文件匹配的案例(测试用例)。我已经确定了函数agrep,它似乎做了一些工作。至少它会弄清楚彼此之间的关系。但是,我想将每个案例与一个档案相匹配。我想知道隐藏的某个分数是否可用于将每个案例与一个配置文件相匹配。这将表明比赛有多好。

在下面的示例中,您会注意到英格兰可以与两个配置文件匹配。我想知道是否可以采取一些措施来进行权衡。

profiles <- c("neural-Network","England","General Motors","United Kingdom")

testcases <- c("A feed-forward neural network is fitted with lagged values of x as inputs and a single hidden layer with size nodes. The inputs are for lags 1 to p, and lags m to mP where m=frequency(x). A total of repeats networks are fitted, each with random starting","Hiermee wil Engeland de toestroom van onder meer Bulgaren en Roemenen beperken. Op 1-1-2014 gaan voor deze landen de grenzen naar de EU open. Heerma wijst","General Motors Company LLC, commonly known as GM, is an American multinational holding corporation headquartered in Detroit, Michigan that, through its subsidiaries, designs, manufactures, markets and distributes vehicles and vehicle parts and sells financial services. General Motors produces vehicles in 37 countries under fifteen brands, including Alpheon, Chevrolet, Buick, GMC, Cadillac, Baojun, Holden, HSV, Jie Fang, Opel, Opel Performance Center (OPC), Vauxhall, VXR, UzDaewoo, and Wuling.[4][5] As well as owning shares in PSA Peugeot Citroen. General Motors employs 212,000 people and does business in 157 countries.[1] General Motors is divided into five business","England, Wales, Scotland are part of the United Kindom")

(sapply(profiles,agrep,testcases))

0 个答案:

没有答案