Dating Algorithm

No algorithm description given

0. TL;DR This is a dating algorithm that gives you an optimal matching between two groups of people. 1. Introduction There are many online dating services that offer matching between two groups of people. They generally use different mixtures of various variables in their algorithms. Some of these variables can be listed as the following: Psychological Compatibility (such as values and beliefs). Interpersonal Chemistry (such as hobbies and interests). Individual Characteristics (such as attractiveness and intelligence). Surrounding Circumstances (such as proximity between users). Quality of interaction . This dating algorithm tries to generalize these various inputs into several categories. Due to the generalizable nature of the algorithm, we didn't include factors such as: attractiveness & intelligence of users and quality between users. The algorithm does a one-to-one comparison between the interests and values of each user, and calculates a similarity score between them. If needed, you can provide your own scoring weights, but if not provided the following weights are used by default: Interests: 1.0 Values: 5.0 Age: 0.5 Coordinates: 0.005 These weights are used to calculate the impact of each category to the scoring function. This scoring function can be seen below: After the similarity score has been measured between each pair of users, they create a preference list based on their similarity scores with each possible candidate. These preference lists are passed to an algorithm called the Stable Marriage Algorithm  to give an optimal and stable matching between the two groups, which returns the initially desired matching as a result. Input (Required)  Group 1: A list of person objects. (Required)  Group 2: A list of person objects. (Optional) Scoring weights: A dictionary weights. Output A dictionary of optimal matches between two groups of people. 2. A person object A person object:  It's a dictionary that could have up to 5 possible attributes: (Required) Name: Name of that person. (Required) Interests: A list of interests. (could be any string) (Optional) Values: A list of values and beliefs for that person. (Optional) Age: The age of that person (in years). (Optional) Coordinates: The latitude and longitude of that person. Example of a person object: {
 "name": "Paul the Conquerer",
 "interests": [
 "reading",
 "running",
 "chilling",
 "coding",
 "seattle",
 "coffee",
 "tea",
 "bilingual",
 "food",
 "arrested development",
 "the office",
 "parc and rec",
 "rick and morty"
 ],
 "values": [
 "individuality",
 "freedom of speech",
 "love"
 ],
 "age": "22",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
} 3. Scoring Weights Scoring weights: A dictionary of float values that contains corresponding weights for the scoring function. It can have up to 4 values: (Optional) Interests: A float value for the interest weight. (Optional) Values: A float value for the value weight. (Optional) Age: A float value for the age weight. (Optional) Coordinates: A float value for the coordinates weight. Example of scoring weights: {
 "interests": 1.5,
 "values": 7.5,
 "age": 0.65,
 "coordinates": 0.015
} 4. Output A dictionary of optimal matches between two groups of people: Gives a matching between two people that is optimal and stable. Example of an output: {
 "matches": {
 "Besir the Conquerer": "Maria the Engineer",
 "Steve the Programmer": "Julia the Jukebox",
 "Paul the Extrovert": "Chelsea the Bookworm",
 "Vincent the Romantic": "Jules the Hipster",
 "Bob the Average Guy": "Hale the Chef",
 "James the Sports Guy": "Natalie the Lawyer",
 "Mike the Gamer": "Hannah the Model",
 "Alan the Writer": "Ana the Artist",
 "Tom the Family Guy": "Kate the Teacher",
 "Kyle the Foodie": "Laea the Space Pirate"
 }
} 5. Examples Example 1: Parameter 1: A list of person objects. Parameter 2: A list of person objects. {
 "group1": [
 {
 "name": "Vincent the Conquerer",
 "interests": [
 "reading",
 "running",
 "chilling",
 "coding",
 "seattle",
 "coffee",
 "tea",
 "bilingual",
 "food",
 "arrested development",
 "the office",
 "parc and rec",
 "rick and morty"
 ],
 "values": [
 "humanism"
 ],
 "age": "22",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
 },
 {
 "name": "Paul the Extrovert",
 "interests": [
 "hiking",
 "skiing",
 "coffee",
 "traveling"
 ],
 "values": [
 "adventure"
 ],
 "age": "26",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
 },
 {
 "name": "Tom the Family Guy",
 "interests": [
 "reading",
 "writing",
 "coffee",
 "binge watching",
 "netflix"
 ],
 "values": [
 "family"
 ],
 "age": "32",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
 }
 ],
 "group2": [
 {
 "name": "Julia the Jukebox",
 "interests": [
 "music",
 "rock",
 "coffee",
 "guitar hero"
 ],
 "values": [
 "individuality"
 ],
 "age": "22",
 "coordinates": {
 "lat": 47.62446091996251,
 "long": -122.32016064226627
 }
 },
 {
 "name": "Chelsea the Bookworm",
 "interests": [
 "reading",
 "writing",
 "classics",
 "coffee",
 "walking"
 ],
 "values": [
 "family",
 "love"
 ],
 "age": "26",
 "coordinates": {
 "lat": 47.62446091996251,
 "long": -122.32016064226627
 }
 },
 {
 "name": "Ana the Artist",
 "interests": [
 "drawing",
 "art",
 "music",
 "classical music",
 "tea",
 "running"
 ],
 "values": [
 "post-modernism",
 "beauty"
 ],
 "age": "32",
 "coordinates": {
 "lat": 47.62446091996251,
 "long": -122.32016064226627
 }
 }
 ]
} Output: {
 "matches": {
 "Tom the Family Guy": "Chelsea the Bookworm",
 "Paul the Extrovert": "Ana the Artist",
 "Vincent the Conquerer": "Julia the Jukebox"
 }
} Example 2: Parameter 1: Custom scoring weights. Parameter 2: A list of person objects. Parameter 3: A list of person objects. {
 "scoring_weights": {
 "interests": 1.5,
 "values": 7.5,
 "age": 0.65,
 "coordinates": 0.015
 },
 "group1": [
 {
 "name": "Vincent the Conquerer",
 "interests": [
 "reading",
 "running",
 "chilling",
 "coding",
 "seattle",
 "coffee",
 "tea",
 "bilingual",
 "food",
 "arrested development",
 "the office",
 "parc and rec",
 "rick and morty"
 ],
 "values": [
 "humanism"
 ],
 "age": "22",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
 },
 {
 "name": "Paul the Extrovert",
 "interests": [
 "hiking",
 "skiing",
 "coffee",
 "traveling"
 ],
 "values": [
 "adventure"
 ],
 "age": "26",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
 },
 {
 "name": "Tom the Family Guy",
 "interests": [
 "reading",
 "writing",
 "coffee",
 "binge watching",
 "netflix"
 ],
 "values": [
 "family"
 ],
 "age": "32",
 "coordinates": {
 "lat": 47.599088077746394,
 "long": -122.3339125374332
 }
 }
 ],
 "group2": [
 {
 "name": "Julia the Jukebox",
 "interests": [
 "music",
 "rock",
 "coffee",
 "guitar hero"
 ],
 "values": [
 "individuality"
 ],
 "age": "22",
 "coordinates": {
 "lat": 47.62446091996251,
 "long": -122.32016064226627
 }
 },
 {
 "name": "Chelsea the Bookworm",
 "interests": [
 "reading",
 "writing",
 "classics",
 "coffee",
 "walking"
 ],
 "values": [
 "family",
 "love"
 ],
 "age": "26",
 "coordinates": {
 "lat": 47.62446091996251,
 "long": -122.32016064226627
 }
 },
 {
 "name": "Ana the Artist",
 "interests": [
 "drawing",
 "art",
 "music",
 "classical music",
 "tea",
 "running"
 ],
 "values": [
 "post-modernism",
 "beauty"
 ],
 "age": "32",
 "coordinates": {
 "lat": 47.62446091996251,
 "long": -122.32016064226627
 }
 }
 ]
} Output: {
 "matches": {
 "Tom the Family Guy": "Chelsea the Bookworm",
 "Paul the Extrovert": "Ana the Artist",
 "Vincent the Conquerer": "Julia the Jukebox"
 }
}

Tags
(no tags)

Cost Breakdown

0 cr
royalty per call
1 cr
usage per second
avg duration
This algorithm has permission to call other algorithms which may incur separate royalty and usage costs.

Cost Calculator

API call duration (sec)
×
API calls
=
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

Calls other algorithms

This algorithm has permission to call other algorithms. This allows an algorithm to compose sophisticated functionality using other algorithms as building blocks, however it also carries the potential of incurring additional royalty and usage costs from any algorithm that it calls.


To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/matching/DatingAlgorithm/0.1.2
View cURL Docs
algo auth
# Enter API Key: YOUR_API_KEY
algo run algo://matching/DatingAlgorithm/0.1.2 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://matching/DatingAlgorithm/0.1.2");
AlgoResponse result = algo.pipeJson(input);
System.out.println(result.asJsonString());
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://matching/DatingAlgorithm/0.1.2")
val result = algo.pipeJson(input)
System.out.println(result.asJsonString)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://matching/DatingAlgorithm/0.1.2")
           .pipe(input)
           .then(function(output) {
             console.log(output);
           });
View Javascript Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://matching/DatingAlgorithm/0.1.2")
           .pipe(input)
           .then(function(response) {
             console.log(response.get());
           });
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('matching/DatingAlgorithm/0.1.2')
print algo.pipe(input)
View Python Docs
library(algorithmia)

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("matching/DatingAlgorithm/0.1.2")
result <- algo$pipe(input)$result
print(result)
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('matching/DatingAlgorithm/0.1.2')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::*;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo('matching/DatingAlgorithm/0.1.2');
let response = algo.pipe(input);
View Rust Docs
Discussion
  • {{comment.username}}