I am trying to run a ML Node Classification based on the GDS plugin, but I am giving an error that I don't know where it comes from. Explanation:
- I have created the memory graph as follows:
CALL gds.graph.create(
"graph",
"*",
"*",
{
nodeProperties: ["bornDate", "gender"],
}
)
(there are 3 node labels in my database only: Persons, Cities and Test types - COVID tests- )
- After the estimate on the ml algorithm, I run it as follows:
CALL gds.alpha.ml.nodeClassification.train(
"graph", {
nodeLabels: ["Person"],
modelName: "ncModel",
featureProperties: ["gender"],
targetProperty: "mlNodeClassification",
randomSeed: 2,
holdoutFraction: 0.4,
validationFolds: 5,
metrics: ["F1_WEIGHTED"],
params: [
{penalty: 0.0625},
{penalty: 0.5}
]
})
(I only use gender
as demonstration purpose). But I am giving this error:
Failed to invoke procedure `gds.alpha.ml.nodeClassification.train`: Caused by: java.lang.IllegalArgumentException: The feature properties ['gender'] are not present for all requested labels. Requested labels: ['Person']. Properties available on all requested labels: []
- That is great If not all nodes had this properties, so I check that for just in case:
MATCH (n:Person)
WHERE n.gender IS NULL
RETURN count(*)
And retrieves 0
. So I am not able to understand the error shown in the second item