Affinity lists

if I need to list concepts and I want to find the similarities between these lists, how can I find how many two similar lists? as an example, if I have two lists that describe the list of attributes book1 (author, brand, isbn, category, quantity) list2 (author, price, brand)

+3
source share
3 answers

The easiest way is probably to calculate the editing distance between each of the list items.

+1
source

You can use the Jaccard index to compare the similarity of the two sets.

0
source

Perl

. #

:: ;

use  Data::Dumper ; 
use lib  "specify the path ";
use List::Compare;

@Llist= ( 1,2,3,4,6)  ;
@Rlist=(101,3,4,5,20,30) ;

$lc = List::Compare->new( \@Llist, \@Rlist);

print  Dumper \$lc->get_intersection();
0

Source: https://habr.com/ru/post/1735709/


All Articles