Acme::Affinity - Compute the affinity between two people
version 0.0104
use Acme::Affinity; my %arguments = ( questions => [], importance => {}, me => [], you => [] ); my $affinity = Acme::Affinity->new(%arguments); my $score = $affinity->score();
An Acme::Affinity object computes the relationship affinity between two people based on a common list of questions and answers and their weighted importance.
Acme::Affinity
A list of hash references with question keys and answer array references.
Example:
[ { 'how messy are you' => [ 'very messy', 'average', 'very organized' ] }, { 'do you like to be the center of attention' => [ 'yes', 'no' ] }, ]
A hash reference with importance level keys and weight values.
Default:
{ 'irrelevant' => 0, 'a little important' => 1, 'somewhat important' => 10, 'very important' => 50, 'mandatory' => 250, }
An array reference triple of question responses, desired responses and importance levels for person A.
[ # Me You Importance [ 'very organized', 'very organized', 'very important' ], [ 'no', 'no', 'a little important' ], ]
An array reference triple of question responses, desired responses and importance levels for person B.
[ [ 'very organized', 'average', 'a little important' ], [ 'yes', 'no', 'somewhat important' ], ]
my $affinity = Acme::Affinity->new(%arguments);
Create a new Acme::Affinity object.
my $score = $affinity->score();
Compute the affinity score for the two given people.
Moo
Math::BigRat
https://www.youtube.com/watch?v=m9PiPlRuy6E
Gene Boggs <gene@cpan.org>
This software is copyright (c) 2019 by Gene Boggs.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Acme::Affinity, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::Affinity
CPAN shell
perl -MCPAN -e shell install Acme::Affinity
For more information on module installation, please visit the detailed CPAN module installation guide.