4. Generating Test Network Data
From 2.4.0, Quantexa recommends the use of the Network Test Data Creation API documented here: Network Test Data Creation tool to generate network data for Scoring.
Below is an example usage of the Network Test Data Creation tool for a project implementation of the EntityIndirectLinkToWatchlist
network Score:
object EntityIndirectLinkToWatchlistSpec {
import com.quantexa.scoring.spec._
// Define your models
case class CorporateRegistry(id: String) extends Doc(DocumentId('corporateregistry', id))
case class Watchlist(id: String) extends Doc(DocumentId('watchlist', id))
case class Business(id: String) extends Ent(EntityId('business', id, None))
case class Individual(id: String) extends Ent(EntityId('individual', id, None))
//Documents
val subjectBusiness = Business('1').asSubject.setLabel('Business ABC Limited')
val indirectIndividual = Individual('1').setLabel('Joe Bloggs')
// Entities
val corporateRegistryDocument = CorporateRegistry('1').setLabel('Business ABC Holdings')
val watchlistDocument = Watchlist('1').setLabel('W1 Ltd')
// Attributes
val isPrimaryEntityAttribute: Attributes = Attributes('watchlistCategory' -> 'Financial Crime')
val directorAttribute: Attributes = Attributes('role' -> 'director')
val testNetwork = subjectBusiness -- corporateRegistryDocument - directorAttribute - indirectIndividual - isPrimaryEntityAttribute - watchlistDocument
val testNetworkAsScoringGraph: ScoringGraph[EntityId] = testNetwork.scoringGraph[EntityId]
}