Finding matching

Hi Knime Enthusiastic!!

Hope you are doing well.

I need your help in finding solution for below problem:

Input 1:

Designation Option ID
CMMA AAE
CMMA AB
CMMA ABE
CMMA AE
CMMA AGI
CMMA ARL
CMMA AS
CMMA ASE
CMMA ASH
CMMA BIU
CMMA CAA

Input:2

Role ID Option ID
R1.1 AAE
R1.1 AAH
R1.1 AB
R1.1 ABE
R1.1 AE
R1.1 AGI
R1.1 AIE
R1.1 ALP
R1.1 AS
R1.1 ASE
R1.1 ASH
R1.1 C
R1.1 CSI
R1.1 DE
R1.1 DEE
R1.1 EAH
R1.1 ECI
R1.1 ELS
R1.1 ITA
R1.2 CBE
R1.2 CBI
R1.2 CBQ
R1.2 CC1
R1.2 CSI
R1.2 CSR
R1.2 CTL
R1.2 EAH
R1.2 ECI
R1.2 ENE
R1.2 ETI
R1.2 ITA
R1.2 ITM
R1.2 JRE
R1.2 MCD
R1.2 MHC
R1.2 MKO
R1.2 MMC
R1.2 PMC
R1.2 RJL
R1.2 SBL
R1.2 SCE
R1.2 SDE
R1.2 SE1
R1.2 TH
R1.2 TQE
R1.2 TWL
R1.2 YM3
R1.2 Y15
R1.3 AAE
R1.3 AB
R1.3 ABE
R1.3 AE
R1.3 AGI
R1.3 ARL
R1.3 AS
R1.3 ASE
R1.3 ASH
R1.3 BIU
R1.3 CAA

Requirement:

I want to assign best exact match for Designation after checking Option ID for Input 1 from Input 2.

Output:

Like in this case:
CMMA R1.3 is exact match 100%

Thanks in advance.

@ravi13 you could try and check out this example by @ScottF

2 Likes

hi @ravi13 ,
I’ve tried to solve the problem this way
KNIME_project6.knwf (42.9 KB)
The input data is a bit different from your example. To rank the results I’ve calculated two percentages

  • pct_matches = number of matches (corresponding options) / number of options in the first group (group from the “Designation” table)
  • pct_no_matches = 1 - number of matches / number of options in the second group (from the “Role” table)

When two groups have the same pct_matches, the one with less pct_no_matches is chosen

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.