Use Person Similarity algorithm

Error by using Pearson Similarity algorithm.
Indicates 3 arguments, but there are 2 ('params' and 'rel.weight')

MATCH(knop:Compound{prep:'Control'})-[rel:HAS]->(params)

WITH knop, gds.alpha.similarity.asVector(params, rel.weight) AS cVector

MATCH(p1h:Compound)-[rel:HAS]-> (params) WHERE p1h <> knop

WITH knop, p1h, cVector, gds.alpha.similarity.asVector(params, rel.weight) AS p1hVector

RETURN knop.prep AS from, p1h.prep AS to, gds.alpha.similarity.asVector(cVector, p1hVector, {vectorType:'maps'}) AS similarity

ORDER BY similarity DESC

You use of asVector in your return statement has three parameters. One is even a map. Is that a valid parameter.

I modified the query and got Null

You must not have a weight property defined on your ‘compound’ nodes.

In your first example, I think the issue is on line 5, were you should be calling pearson method, not asVector method.