patrickmclaren comments on A basis for pattern-matching in logical uncertainty - Less Wrong

3 Post author: Manfred 29 August 2013 08:53AM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (18)

You are viewing a single comment's thread. Show more comments above.

Comment author: Manfred 29 August 2013 04:15:12PM 1 point [-]

Could you explain?

Comment author: patrickmclaren 29 August 2013 08:45:36PM *  0 points [-]

Sure, will you take some python code as an example? I had to replace spaces with periods, the verbatim formatting doesn't seem to take into account python indented by 4 spaces.

Without taking into negative training data into account:

possible_properties.=.[]
for.p.in.Object.properties():
....for.x.in.training_set:
........if.not.x.has_property(p):
............break
....possible_properties.append(p)

Taking negative training data into account, here we have a 'positive set', and a 'negative set':

irrelevant_properties.=.[]
for.x.in.negative_set:
....for.property.in.x.properties():
........irrelevant_properties.append(property)
relevant_properties.=.[]
for.p.in.Object.properties():
....for.x.in.positive_set:
.......if.not.x.has_property(p).or.p.in.irrelevant_properties:
............break
....relevant_properties.append(p)

See the difference? In the second case, 'potential properties' is smaller. Note that this is not an optimal solution, since it looks up all possible properties in order to find the common properties of a training set, I wrote it because it's a little more succinct than intersections.