feature_matrix_test: Test feature matrix

Description Usage Arguments Value Examples

View source: R/feature_matrix.R

Description

Makes the feature matrix to test model based on which features are chosen. Uses functions: player_data_frame, head_to_head, feature_surface. As this is the testing matrix, the columns are the matches we wish to predict but the player characteristics are still calculated from the training data.

Usage

1
feature_matrix_test(my_data,match_date = "2019-01-01",features = c('surface_form', 'age', 'match_form', 'head_to_head'), carpet = 'FALSE')

Arguments

my_data

input data.

match_date

set to the starting date of test data - be default 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'.

Value

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.

Examples

1
2
feature_matrix_test(my_data)
feature_matrix_test(my_data,match_date = "2016-01-01",features = c('surface_form', 'age'), carpet = 'TRUE')

ss15859/tennis.wta documentation built on Jan. 24, 2021, 12:46 a.m.