You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am trying to use dreamcoder to classify images. Given 2 floating-point numbers extracted from the image (distance_between_two_objects and object_density_in_fixed_radius), I am trying to classify the image as True or False. To do this, I want the system to discover an algebraic expression for an interaction feature between the two given variables, such that it is able to classify True or False depending on if that interaction feature is above a (discovered) threshold or not.
So far, to achieve this, I am using f0, f1, fpi, real_power, real_subtraction, real_addition, real, real_division, real_multiplication features from scientific_Laws.py. For the final step, I want to introduce a feature real_greater_than which is the same as primitive_greater_than in program.ml. However, when I do that (by simply changing int in primitive_greater_than to float), doing make clean and makeand adding the lines: real_greater_than = Primitive(">.", arrow(treal, treal, tbool), _greater_than)
and def _greater_than(x): return lambda y: x > y to the code, I get the following error at runtime:
Would greatly appreciate any help, thanks!
The text was updated successfully, but these errors were encountered:
Hi I am trying to use dreamcoder to classify images. Given 2 floating-point numbers extracted from the image (
distance_between_two_objects
andobject_density_in_fixed_radius
), I am trying to classify the image asTrue
orFalse
. To do this, I want the system to discover an algebraic expression for an interaction feature between the two given variables, such that it is able to classifyTrue
orFalse
depending on if that interaction feature is above a (discovered) threshold or not.So far, to achieve this, I am using
f0, f1, fpi, real_power, real_subtraction, real_addition, real, real_division, real_multiplication
features fromscientific_Laws.py
. For the final step, I want to introduce a featurereal_greater_than
which is the same asprimitive_greater_than
inprogram.ml
. However, when I do that (by simply changingint
inprimitive_greater_than
tofloat
), doingmake clean
andmake
and adding the lines:real_greater_than = Primitive(">.", arrow(treal, treal, tbool), _greater_than)
and
def _greater_than(x): return lambda y: x > y
to the code, I get the following error at runtime:Would greatly appreciate any help, thanks!
The text was updated successfully, but these errors were encountered: