Description Details Public fields Methods
Translating raw data to SPADL representation
Translating raw data to SPADL representation
We use SPADL common language (see details in the paper) to represent raw data regardless of the data provider used. Every data provider has his own implement class inheriting from the mother class.
datadata.table :: the SPADL values stored as data.table
metadatatibble :: metadata such as team name,
game-date, ... should have the same number of rows
as 'data' and same game-ids.
new()Creates the 2 tibble(s) from mongo connections.
Given that the fixture collection is similar for all
data providers, the 'metadata' field can be initialised here.
Must be implemented in each subclass (for each data provider).
Spadl$new(game_ids, fixture_con)
game_idsinteger
fixture_conmongo-connection :: fixture collection connection
sanity_check()Runs some sanity checks on the created instance Regardless of the data provider (and the subclass used to initialise the object), we expect the fields values to be the same and hence sanity checks can be implemented here.
Spadl$sanity_check()
logical :: 'TRUE' if all tests are passed otherwise 'FALSE' with an informative error message
insert()Insert the instance in the mongo database if sanity-checks are successful
Spadl$insert(mongo_con)
mongo_con'mongo-connection' :: where the object should be inserted
logical :: insertion status
get_model_data()Create model training data from Spadl or atomic Spadl
Spadl$get_model_data( nb_prev_actions = 3L, nr_actions = 10L, labels = TRUE, add_predictions = TRUE )
populates the training_data slot.
Handles the insertion in mongo
clone()The objects of this class are cloneable with this method.
Spadl$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.