Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-31-2022 11:03 PM
Hi everyone,
I am working on a large graph consisting of different type of labels, and these labels have their own properties.
CALL gds.graph.create(
'derin',
{
Transaction: {
label: 'Transaction',
properties: {legacy_customer: {defaultValue: 0}
, trx_amount: {defaultValue: 1000}
, atm_trx: {defaultValue: 0}
, fast_credit_flag: {defaultValue: 0}
, silver_bullet_flag: {defaultValue: 0}
}
}
, Withdraw: {
label: 'Withdraw',
properties: {legacy_customer: {defaultValue: 0}
, trx_amount: {defaultValue: 1000}
, atm_trx: {defaultValue: 0}
, fast_credit_flag: {defaultValue: 0}
, silver_bullet_flag: {defaultValue: 0}
}
}
, Loan: {
label: 'Loan',
properties: {legacy_customer: {defaultValue: 0}
, trx_amount: {defaultValue: 1000}
, atm_trx: {defaultValue: 0}
, fast_credit_flag: {defaultValue: 0}
, silver_bullet_flag: {defaultValue: 0}
}
}
, Customer: {
label: 'Customer',
properties: {legacy_customer: {defaultValue: 0}
, trx_amount: {defaultValue: 1000}
, atm_trx: {defaultValue: 0}
, fast_credit_flag: {defaultValue: 0}
, silver_bullet_flag: {defaultValue: 0}
}
}}, {
SENDS: {type: 'SENDS', orientation: 'UNDIRECTED'},
RECEIVES: {type: 'RECEIVES', orientation: 'UNDIRECTED'},
INSPECTS: {type: 'INSPECTS', orientation: 'UNDIRECTED'},
WITHDRAWS: {type: 'WITHDRAWS', orientation: 'UNDIRECTED'},
APPLIES: {type: 'APPLIES', orientation: 'UNDIRECTED'}
})
I created a graph with different values because of missing properties. After creation, I am running the query;
CALL gds.fastRP.write('derin'
,{
embeddingDimension: 32,
writeProperty: 'fast_embedding',
propertyRatio: 0.2,
featureProperties: ['legacy_customer', 'trx_amount', 'atm_trx', 'fast_credit_flag', 'silver_bullet_flag']
}
)
I got the error "Failed to invoke procedure gds.fastRP.write
: Caused by: java.lang.IllegalArgumentException: UnionProperties must all have the same type, but found [LONG, DOUBLE, DOUBLE, DOUBLE]". Any help or suggestion would be great. Thanks.
02-06-2022 02:41 AM
From the documentation for
featureProperties
“ The names of the node properties that should be used as input features. All property names must exist in the in-memory graph and be of type Float or List of Float.”
Your properties are of type Integer. You may change them to Float and try.
“MATCH (n) SET n. legacy_customer = toFloat(n.legacy_customer) …..”
All the sessions of the conference are now available online