she is out of my league

A quick one today. Let's encode "she is out of my league" in BKO.
-- load up some data about some fictional women:
features |my perfect woman> => |beautiful> + |smart> + |skinny> + |educated> + |loving> + |sexy>
features |Mary> => |loving> + |skinny>
features |Liz> => |smart> + |educated> + |loving>
features |Jane> => |skinny> + |sexy>
features |Mia> => |smart> + |skinny> + |educated> + |loving>
features |Emma> => |athletic> + |skinny> + |sexy> + |beautiful> + |religious>
features |Donna> => |beautiful> + |smart> + |skinny> + |educated> + |sexy>
features |the goddess> => |beautiful> + |smart> + |skinny> + |educated> + |loving> + |sexy>

-- define an operator to tidy our results:
rename-simm |simm> => | >

-- define some operators to work on this:
she-is-out-of-my-league |*> #=> coeff-in-range[80,100] 100 rename-simm ket-simm(features |_self>,features |my perfect woman>)
she-is-in-my-league |*> #=> coeff-in-range[50,80] 100 rename-simm ket-simm(features |_self>,features |my perfect woman>)
not-all-that-interested-in-her |*> #=> coeff-in-range[0,49] 100 rename-simm ket-simm(features |_self>,features |my perfect woman>)
Now, let's see what we have:
sa: table[woman,not-all-that-interested-in-her,she-is-in-my-league,she-is-out-of-my-league] rel-kets[features]
+------------------+--------------------------------+---------------------+-------------------------+
| woman            | not-all-that-interested-in-her | she-is-in-my-league | she-is-out-of-my-league |
+------------------+--------------------------------+---------------------+-------------------------+
| my perfect woman |                                |                     | 100.00                  |
| Mary             | 33.33                          |                     |                         |
| Liz              |                                | 50                  |                         |
| Jane             | 33.33                          |                     |                         |
| Mia              |                                | 66.67               |                         |
| Emma             |                                | 50                  |                         |
| Donna            |                                |                     | 83.33                   |
| the goddess      |                                |                     | 100.00                  |
+------------------+--------------------------------+---------------------+-------------------------+
And as is typical of BKO, this is all rather general. You can define the features with arbitrary superpositions. And it doesn't have to be restricted to the "she is out of my league" domain either. A similar construct can be used for other things.

Update: we can of course tweak the table to show only yes or no.
Simply enough (just prepend "is-" to the coeff-in-range[] operator):
-- define our new operators:
is-not-all-that-interesting |*> #=> is-coeff-in-range[0,49] 100 rename-simm ket-simm(features |_self>,features |my perfect woman>) 
is-in-my-league |*> #=> is-coeff-in-range[50,80] 100 rename-simm ket-simm(features |_self>,features |my perfect woman>)
is-out-of-my-league |*> #=> is-coeff-in-range[80,100] 100 rename-simm ket-simm(features |_self>,features |my perfect woman>) 

-- show the table:
sa: table[woman,is-not-all-that-interesting,is-in-my-league,is-out-of-my-league] rel-kets[features]
+------------------+-----------------------------+-----------------+---------------------+
| woman            | is-not-all-that-interesting | is-in-my-league | is-out-of-my-league |
+------------------+-----------------------------+-----------------+---------------------+
| my perfect woman | no                          | no              | yes                 |
| Mary             | yes                         | no              | no                  |
| Liz              | no                          | yes             | no                  |
| Jane             | yes                         | no              | no                  |
| Mia              | no                          | yes             | no                  |
| Emma             | no                          | yes             | no                  |
| Donna            | no                          | no              | yes                 |
| the goddess      | no                          | no              | yes                 |
+------------------+-----------------------------+-----------------+---------------------+
OK. Kind of cool. And note that using text for operator labels, really is a big step in the direction of NLP (natural language processing).

Update: we can also represent the features superpositions using matrix notation:
sa: load in-my-league.sw
sa: matrix[features]
[ athletic  ] = [  0  1  0  0  0  0  0  0  ] [ Donna            ]
[ beautiful ]   [  1  1  0  0  0  0  1  1  ] [ Emma             ]
[ educated  ]   [  1  0  0  1  0  1  1  1  ] [ Jane             ]
[ loving    ]   [  0  0  0  1  1  1  1  1  ] [ Liz              ]
[ religious ]   [  0  1  0  0  0  0  0  0  ] [ Mary             ]
[ sexy      ]   [  1  1  1  0  0  0  1  1  ] [ Mia              ]
[ skinny    ]   [  1  1  1  0  1  1  1  1  ] [ my perfect woman ]
[ smart     ]   [  1  0  0  1  0  1  1  1  ] [ the goddess      ]



Home
previous: some more similar inverse links to results
next: introducing function matrices

updated: 19/12/2016
by Garry Morrison
email: garry -at- semantic-db.org