Description Usage Arguments Value Examples
View source: R/feature_matrix.R
Makes the feature matrix to train on based on which features are chosen. Uses functions: player_data_frame, head_to_head, feature_surface.
1 | feature_matrix_train(my_data,match_date = "2019-01-01",features = c('surface_form', 'age', 'match_form', 'head_to_head'), carpet = 'FALSE')
|
my_data |
input data. |
match_date |
set to the starting date of test data - by default this is 2019-01-01. |
features |
a list of features wanted to be included. By default all features are used. |
carpet |
as matches are no longer played on carpet, carpet performance is by default not included. However, carpet can be included by including, carpet == 'TRUE' |
Creates a matrix where each row is a feature and each column is a match. Additionally, a row of ones is added for the intercept and a row which signifies the winner of that match - set to +1 if player 1 one and -1 if player 2 won.
1 2 | feature_matrix_train(data)
feature_matrix_train(my_data,match_date = "2018-05-11",features = c('surface_form', 'match_form', 'head_to_head'), carpet = 'TRUE')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.