User 2001 | 10/13/2015, 10:59:45 AM
I'm trying to create a k-nn model using a composite distance function which includes my own custom distance function:
euc_dist = [('features',), 'euclidean', 1] my_dist = [('my_label',), my_function, 1] comp_dist = [euc_dist, my_dist] nn_model = graphlab.nearest_neighbors.create(images, distance=comp_dist)
However I receive the following error:
TypeError: Only native functions, or simple lambdas of native functions (with constant capture values) can be passed to an extension function.
Is there any work-around to do what I'm trying to do? Either way, are the use of non-native functions in k-nn something you would consider for a future release? I'm sure many people would find this useful.