This S3 function receives the bpc model and a data frame containing the same columns as the one used to fit the model. It returns another data frame with with the same columns of the new data and n additional columns representing a posterior preditive distribution. See the vignettes for a larger examples with the usage of this function

# S3 method for bpc
predict(
  object,
  newdata,
  predictors = NULL,
  n = 100,
  return_matrix = T,
  model_type = NULL,
  ...
)

Arguments

object

a bpc object

newdata

a data frame that contains columns with the same names as used to fit the data in the model.

predictors

A data frame that contains the players predictors values when using a generalized model. Should be set only if using the generalized models. Only numeric values are accepted. Booleans are accepted but will be cast into integers. The first column should be for the player name, the others will be the predictors. The column names will be used as name for the predictors

n

number of time we will iterate and get the posterior. default is 100 so we dont get too many

return_matrix

should we return only a matrix with the predictive values. Default F. Use this to combine with predictive posterior plots in bayesplot

model_type

when dealing with some models (such as random effects) one might want to make predictions using the estimated parameters with the random effects but without specifying the specific values of random effects to predict. Therefore one can set a subset of the model to make predictions. For example: a model sampled with bt-U can be used to make predictions of the model bt only.

...

additional parameters for the generic predict function. Not used.

Value

a dataframe or a matrix depending on the return_matrix parameter

Examples

# \donttest{
m<-bpc(data = tennis_agresti,
player0 = 'player0',
player1 = 'player1',
result_column = 'y',
model_type = 'bt',
solve_ties = 'none')
#> Running MCMC with 4 parallel chains...
#> 
#> Chain 2 finished in 3.0 seconds.
#> Chain 1 finished in 3.3 seconds.
#> Chain 4 finished in 3.3 seconds.
#> Chain 3 finished in 3.3 seconds.
#> 
#> All 4 chains finished successfully.
#> Mean chain execution time: 3.2 seconds.
#> Total execution time: 3.6 seconds.
predict(m,newdata=tennis_agresti)
#>        y_pred[1] y_pred[2] y_pred[3] y_pred[4] y_pred[5] y_pred[6] y_pred[7]
#>   [1,]         1         1         0         0         1         1         0
#>   [2,]         1         1         1         0         1         1         0
#>   [3,]         1         1         1         1         0         1         0
#>   [4,]         0         1         1         0         0         0         0
#>   [5,]         1         1         0         1         1         1         0
#>   [6,]         0         0         0         1         0         0         0
#>   [7,]         0         0         0         1         0         0         1
#>   [8,]         0         1         0         1         1         1         0
#>   [9,]         1         1         1         1         1         0         0
#>  [10,]         1         1         1         1         1         0         0
#>  [11,]         0         1         0         0         0         0         1
#>  [12,]         0         0         0         0         0         0         0
#>  [13,]         1         0         1         1         1         0         0
#>  [14,]         0         1         0         0         1         0         0
#>  [15,]         1         1         1         0         0         0         0
#>  [16,]         1         1         1         1         1         0         0
#>  [17,]         0         0         1         1         1         0         0
#>  [18,]         1         1         1         1         1         0         0
#>  [19,]         0         1         1         1         1         0         0
#>  [20,]         1         0         1         0         0         1         0
#>  [21,]         1         1         0         1         1         0         0
#>  [22,]         1         1         0         0         0         0         0
#>  [23,]         1         0         0         1         1         1         1
#>  [24,]         1         1         1         1         1         1         0
#>  [25,]         0         0         0         0         1         0         0
#>  [26,]         1         0         1         0         1         0         1
#>  [27,]         0         1         1         0         0         0         0
#>  [28,]         0         0         1         1         1         1         0
#>  [29,]         0         1         0         1         1         0         0
#>  [30,]         1         1         1         0         0         0         1
#>  [31,]         1         1         1         0         1         0         1
#>  [32,]         1         1         1         1         1         0         0
#>  [33,]         1         0         1         1         0         0         1
#>  [34,]         1         0         1         1         1         1         1
#>  [35,]         1         1         0         1         1         1         0
#>  [36,]         1         1         0         1         0         0         0
#>  [37,]         0         1         1         0         1         0         0
#>  [38,]         1         0         1         1         1         0         0
#>  [39,]         1         1         0         0         1         0         1
#>  [40,]         1         1         1         0         1         0         1
#>  [41,]         0         1         1         1         0         1         1
#>  [42,]         1         1         0         1         0         0         0
#>  [43,]         1         1         0         0         0         0         0
#>  [44,]         0         0         0         1         1         1         0
#>  [45,]         0         0         0         1         0         1         1
#>  [46,]         0         1         0         0         0         0         1
#>  [47,]         0         0         0         0         1         0         1
#>  [48,]         1         1         1         0         1         0         0
#>  [49,]         1         0         0         0         1         0         0
#>  [50,]         0         0         0         1         1         0         0
#>  [51,]         1         1         1         1         1         0         1
#>  [52,]         0         0         0         1         1         0         0
#>  [53,]         1         1         1         1         1         1         0
#>  [54,]         0         1         1         1         0         1         1
#>  [55,]         1         0         0         1         0         1         1
#>  [56,]         1         1         1         0         1         0         0
#>  [57,]         1         1         1         1         1         0         1
#>  [58,]         1         1         0         1         1         0         1
#>  [59,]         0         0         0         1         0         1         0
#>  [60,]         0         0         1         1         0         0         0
#>  [61,]         1         1         1         1         1         1         1
#>  [62,]         1         0         1         0         0         1         1
#>  [63,]         0         0         0         1         0         0         0
#>  [64,]         0         0         1         1         1         1         1
#>  [65,]         1         1         0         1         1         0         0
#>  [66,]         0         0         0         0         0         1         0
#>  [67,]         1         1         1         1         1         0         1
#>  [68,]         1         0         0         1         1         1         0
#>  [69,]         1         0         1         1         0         1         1
#>  [70,]         1         0         1         1         0         0         1
#>  [71,]         1         0         0         0         1         0         0
#>  [72,]         0         0         1         1         1         0         0
#>  [73,]         0         0         0         1         0         0         0
#>  [74,]         1         0         0         1         1         0         1
#>  [75,]         1         0         1         0         1         1         0
#>  [76,]         0         0         0         1         1         0         0
#>  [77,]         1         1         0         1         1         1         1
#>  [78,]         1         1         0         0         0         0         1
#>  [79,]         1         0         0         1         0         0         1
#>  [80,]         1         1         0         1         1         0         0
#>  [81,]         1         0         0         1         0         0         1
#>  [82,]         1         1         1         1         1         0         1
#>  [83,]         1         1         0         1         1         1         0
#>  [84,]         1         0         0         0         1         1         1
#>  [85,]         0         1         1         0         0         0         0
#>  [86,]         1         1         1         1         1         1         1
#>  [87,]         0         0         1         0         1         0         1
#>  [88,]         1         1         1         1         1         0         0
#>  [89,]         0         0         0         1         0         0         1
#>  [90,]         1         0         1         1         0         0         0
#>  [91,]         0         1         0         0         1         0         0
#>  [92,]         0         0         0         1         0         0         0
#>  [93,]         0         1         1         0         0         0         0
#>  [94,]         1         0         0         1         0         0         1
#>  [95,]         1         1         1         1         1         1         0
#>  [96,]         0         1         1         0         0         1         0
#>  [97,]         0         1         0         0         0         1         1
#>  [98,]         1         1         1         1         0         1         1
#>  [99,]         1         1         1         0         0         1         0
#> [100,]         1         0         0         0         1         1         0
#>        y_pred[8] y_pred[9] y_pred[10] y_pred[11] y_pred[12] y_pred[13]
#>   [1,]         0         0          0          0          0          0
#>   [2,]         0         0          0          0          1          0
#>   [3,]         0         1          0          0          1          1
#>   [4,]         1         0          1          0          1          0
#>   [5,]         1         1          0          1          0          0
#>   [6,]         1         0          0          0          0          0
#>   [7,]         0         0          0          0          0          0
#>   [8,]         0         1          0          1          0          0
#>   [9,]         0         1          0          0          0          0
#>  [10,]         1         1          0          0          0          0
#>  [11,]         1         1          0          1          1          0
#>  [12,]         1         0          1          1          0          0
#>  [13,]         0         1          0          1          1          1
#>  [14,]         0         1          1          0          1          0
#>  [15,]         0         1          1          0          0          0
#>  [16,]         0         1          0          0          0          0
#>  [17,]         0         0          0          0          0          0
#>  [18,]         1         0          0          0          1          0
#>  [19,]         0         1          0          1          1          1
#>  [20,]         0         0          0          1          0          0
#>  [21,]         0         0          0          0          0          0
#>  [22,]         1         0          0          1          1          1
#>  [23,]         0         0          0          0          0          0
#>  [24,]         0         0          1          0          1          0
#>  [25,]         0         0          1          1          0          0
#>  [26,]         0         0          0          1          0          0
#>  [27,]         0         0          1          1          0          0
#>  [28,]         0         1          0          1          1          0
#>  [29,]         1         0          0          0          0          0
#>  [30,]         1         0          1          1          0          0
#>  [31,]         0         0          1          0          0          0
#>  [32,]         0         1          1          0          0          0
#>  [33,]         0         1          1          0          1          0
#>  [34,]         0         1          0          0          0          0
#>  [35,]         0         0          0          0          1          0
#>  [36,]         0         1          0          1          0          0
#>  [37,]         1         0          0          0          0          0
#>  [38,]         0         0          0          0          0          1
#>  [39,]         1         0          1          0          1          0
#>  [40,]         0         1          0          1          1          0
#>  [41,]         0         1          0          0          0          0
#>  [42,]         0         1          0          0          0          0
#>  [43,]         0         0          1          0          0          0
#>  [44,]         0         0          1          0          0          0
#>  [45,]         0         0          0          1          0          1
#>  [46,]         0         0          0          0          1          0
#>  [47,]         1         0          0          0          0          0
#>  [48,]         0         0          0          1          1          0
#>  [49,]         0         0          0          0          1          0
#>  [50,]         1         0          1          0          0          0
#>  [51,]         0         0          0          0          1          0
#>  [52,]         0         0          1          0          0          0
#>  [53,]         0         0          1          0          0          0
#>  [54,]         0         0          0          0          0          0
#>  [55,]         1         0          1          0          1          0
#>  [56,]         0         0          0          0          0          1
#>  [57,]         1         0          1          0          0          1
#>  [58,]         1         1          1          1          0          0
#>  [59,]         0         0          1          1          0          1
#>  [60,]         0         1          1          0          1          0
#>  [61,]         1         0          0          1          1          1
#>  [62,]         1         1          1          1          0          0
#>  [63,]         1         0          0          0          1          0
#>  [64,]         0         0          0          1          0          0
#>  [65,]         0         0          0          0          0          0
#>  [66,]         0         1          0          0          0          0
#>  [67,]         1         1          0          1          0          0
#>  [68,]         1         0          0          0          0          1
#>  [69,]         0         1          0          1          1          0
#>  [70,]         1         0          0          1          0          0
#>  [71,]         0         0          0          0          0          0
#>  [72,]         0         1          0          0          1          0
#>  [73,]         1         0          0          0          0          0
#>  [74,]         0         1          0          1          1          0
#>  [75,]         0         0          0          1          0          0
#>  [76,]         1         0          0          0          1          1
#>  [77,]         0         0          1          0          0          1
#>  [78,]         1         0          0          0          0          0
#>  [79,]         0         0          1          0          0          0
#>  [80,]         1         0          1          0          1          0
#>  [81,]         0         0          1          0          0          0
#>  [82,]         1         1          1          1          0          0
#>  [83,]         0         0          1          1          0          1
#>  [84,]         1         0          0          1          1          1
#>  [85,]         0         0          0          0          0          0
#>  [86,]         1         0          1          1          1          0
#>  [87,]         0         1          1          0          1          0
#>  [88,]         1         0          1          1          1          1
#>  [89,]         0         1          0          0          0          0
#>  [90,]         1         0          1          0          1          0
#>  [91,]         0         1          0          0          0          0
#>  [92,]         0         0          0          0          1          0
#>  [93,]         1         1          1          0          1          0
#>  [94,]         0         0          1          1          0          0
#>  [95,]         0         1          0          0          0          0
#>  [96,]         1         1          0          0          0          1
#>  [97,]         0         0          0          1          0          0
#>  [98,]         1         0          1          0          0          1
#>  [99,]         0         0          0          1          0          0
#> [100,]         1         0          0          1          0          0
#>        y_pred[14] y_pred[15] y_pred[16] y_pred[17] y_pred[18] y_pred[19]
#>   [1,]          0          0          1          0          1          1
#>   [2,]          0          0          1          0          0          0
#>   [3,]          0          1          0          1          0          0
#>   [4,]          0          0          0          1          0          0
#>   [5,]          0          0          0          0          0          1
#>   [6,]          0          0          0          0          0          0
#>   [7,]          0          1          1          0          0          0
#>   [8,]          1          0          1          0          0          0
#>   [9,]          0          0          0          0          0          0
#>  [10,]          0          0          0          0          1          0
#>  [11,]          0          0          0          0          0          1
#>  [12,]          0          0          0          0          1          0
#>  [13,]          1          1          0          1          1          0
#>  [14,]          0          0          0          0          0          0
#>  [15,]          0          0          0          0          0          0
#>  [16,]          0          0          0          0          0          0
#>  [17,]          1          0          0          1          0          1
#>  [18,]          1          0          0          0          0          0
#>  [19,]          1          0          1          0          1          0
#>  [20,]          0          0          0          0          0          0
#>  [21,]          0          1          0          0          1          1
#>  [22,]          0          1          0          0          0          0
#>  [23,]          1          1          0          0          0          0
#>  [24,]          0          0          0          0          0          0
#>  [25,]          0          1          0          1          0          0
#>  [26,]          0          1          0          0          0          0
#>  [27,]          0          0          0          0          0          1
#>  [28,]          1          1          1          1          0          1
#>  [29,]          0          0          0          0          0          0
#>  [30,]          1          0          1          0          0          0
#>  [31,]          1          0          0          0          0          0
#>  [32,]          1          1          0          0          0          0
#>  [33,]          1          0          0          0          1          0
#>  [34,]          1          0          0          0          1          0
#>  [35,]          0          0          0          0          0          1
#>  [36,]          0          0          1          0          0          0
#>  [37,]          0          0          0          1          0          0
#>  [38,]          0          0          0          0          1          0
#>  [39,]          0          0          0          0          0          0
#>  [40,]          1          0          0          1          1          0
#>  [41,]          0          0          0          0          0          0
#>  [42,]          0          0          1          0          0          0
#>  [43,]          0          0          1          0          0          0
#>  [44,]          1          1          0          0          0          0
#>  [45,]          1          0          0          0          0          0
#>  [46,]          0          0          0          0          0          0
#>  [47,]          0          0          0          1          1          0
#>  [48,]          0          0          0          0          0          0
#>  [49,]          0          0          0          0          0          0
#>  [50,]          0          1          1          0          0          1
#>  [51,]          0          0          0          0          0          0
#>  [52,]          0          0          0          1          0          0
#>  [53,]          0          0          0          0          0          0
#>  [54,]          0          0          0          1          1          0
#>  [55,]          0          0          1          0          1          1
#>  [56,]          0          1          0          0          1          0
#>  [57,]          0          0          0          0          0          0
#>  [58,]          1          0          1          0          1          1
#>  [59,]          0          0          1          0          0          0
#>  [60,]          1          0          0          0          0          0
#>  [61,]          0          0          0          0          0          1
#>  [62,]          0          1          0          1          0          0
#>  [63,]          1          0          0          0          0          1
#>  [64,]          0          0          0          1          0          0
#>  [65,]          1          1          0          1          0          0
#>  [66,]          0          0          1          0          1          1
#>  [67,]          1          1          0          0          1          0
#>  [68,]          0          0          1          0          0          1
#>  [69,]          0          0          0          0          0          1
#>  [70,]          0          0          0          0          0          0
#>  [71,]          1          0          1          1          0          1
#>  [72,]          0          1          1          1          0          0
#>  [73,]          0          0          0          0          0          1
#>  [74,]          0          0          1          1          0          0
#>  [75,]          0          0          0          1          0          0
#>  [76,]          0          0          1          0          0          1
#>  [77,]          0          0          1          0          0          1
#>  [78,]          0          1          0          0          0          0
#>  [79,]          0          0          0          1          0          0
#>  [80,]          0          0          0          0          0          0
#>  [81,]          0          0          1          0          1          0
#>  [82,]          1          0          0          0          0          0
#>  [83,]          1          0          1          0          0          0
#>  [84,]          0          1          0          0          1          0
#>  [85,]          0          0          0          0          0          1
#>  [86,]          1          0          0          1          0          0
#>  [87,]          0          0          0          0          0          0
#>  [88,]          0          0          0          0          0          0
#>  [89,]          0          0          1          0          0          1
#>  [90,]          0          0          0          0          0          0
#>  [91,]          0          1          0          0          0          0
#>  [92,]          0          1          1          0          0          1
#>  [93,]          0          0          0          0          1          0
#>  [94,]          0          0          0          1          0          0
#>  [95,]          0          1          0          0          0          1
#>  [96,]          0          0          0          0          0          0
#>  [97,]          0          0          0          0          0          0
#>  [98,]          0          1          1          0          1          0
#>  [99,]          0          0          0          1          0          0
#> [100,]          1          0          1          0          1          0
#>        y_pred[20] y_pred[21] y_pred[22] y_pred[23] y_pred[24] y_pred[25]
#>   [1,]          0          0          1          0          1          0
#>   [2,]          0          1          1          0          0          1
#>   [3,]          0          1          0          0          0          0
#>   [4,]          1          0          0          0          0          0
#>   [5,]          0          0          0          0          1          1
#>   [6,]          0          0          0          0          0          0
#>   [7,]          1          0          0          0          0          1
#>   [8,]          1          0          0          1          0          0
#>   [9,]          0          0          1          1          0          0
#>  [10,]          1          0          0          0          0          1
#>  [11,]          1          0          0          0          1          1
#>  [12,]          0          0          0          0          0          0
#>  [13,]          0          0          0          1          0          0
#>  [14,]          1          1          1          1          1          0
#>  [15,]          0          0          0          0          1          0
#>  [16,]          0          0          0          0          0          0
#>  [17,]          1          1          0          0          0          0
#>  [18,]          0          0          0          0          1          1
#>  [19,]          0          0          0          1          0          1
#>  [20,]          0          0          0          0          0          0
#>  [21,]          1          0          1          1          0          0
#>  [22,]          0          0          0          0          0          0
#>  [23,]          1          0          1          0          0          0
#>  [24,]          0          0          0          0          0          1
#>  [25,]          0          1          1          0          1          0
#>  [26,]          0          1          0          0          0          1
#>  [27,]          0          0          1          0          0          0
#>  [28,]          0          0          0          1          0          0
#>  [29,]          0          0          0          0          0          0
#>  [30,]          0          0          0          0          0          0
#>  [31,]          0          0          1          0          0          1
#>  [32,]          0          0          0          0          0          0
#>  [33,]          0          0          1          0          0          0
#>  [34,]          1          0          0          0          0          1
#>  [35,]          0          0          1          0          0          0
#>  [36,]          1          0          1          0          0          0
#>  [37,]          0          0          0          0          1          0
#>  [38,]          0          0          0          0          0          0
#>  [39,]          0          0          0          0          0          1
#>  [40,]          0          0          1          1          0          0
#>  [41,]          0          1          1          1          0          0
#>  [42,]          0          0          0          1          1          1
#>  [43,]          1          1          0          0          1          0
#>  [44,]          1          1          1          0          0          0
#>  [45,]          1          0          0          0          0          1
#>  [46,]          0          0          0          0          1          0
#>  [47,]          1          0          1          0          1          1
#>  [48,]          0          0          0          0          0          0
#>  [49,]          1          1          0          0          0          0
#>  [50,]          1          0          1          0          1          0
#>  [51,]          0          0          0          0          0          0
#>  [52,]          1          0          0          0          1          0
#>  [53,]          1          1          1          1          0          0
#>  [54,]          1          0          0          0          0          0
#>  [55,]          0          1          1          0          1          1
#>  [56,]          0          0          1          1          0          0
#>  [57,]          1          0          1          0          0          0
#>  [58,]          1          0          0          0          0          0
#>  [59,]          0          0          0          0          0          0
#>  [60,]          1          1          1          0          1          1
#>  [61,]          1          0          0          0          0          0
#>  [62,]          0          0          1          1          1          0
#>  [63,]          0          1          0          0          0          1
#>  [64,]          0          0          0          0          0          0
#>  [65,]          1          1          1          0          0          0
#>  [66,]          0          1          0          1          1          0
#>  [67,]          1          1          0          1          0          0
#>  [68,]          1          1          1          0          0          0
#>  [69,]          0          0          1          0          0          0
#>  [70,]          0          0          1          0          1          0
#>  [71,]          0          0          0          0          0          0
#>  [72,]          0          0          0          0          1          0
#>  [73,]          0          0          0          1          0          0
#>  [74,]          1          0          0          0          0          0
#>  [75,]          0          0          0          1          0          0
#>  [76,]          0          1          0          0          0          0
#>  [77,]          0          0          0          0          0          0
#>  [78,]          0          0          0          0          0          0
#>  [79,]          1          0          0          0          0          0
#>  [80,]          0          0          0          0          0          1
#>  [81,]          1          0          0          0          0          0
#>  [82,]          0          1          1          0          1          0
#>  [83,]          0          0          0          0          0          0
#>  [84,]          0          1          0          0          0          1
#>  [85,]          0          1          0          0          0          0
#>  [86,]          1          0          0          0          0          0
#>  [87,]          0          0          0          0          0          0
#>  [88,]          0          0          0          1          1          1
#>  [89,]          0          1          0          0          1          0
#>  [90,]          0          1          1          0          0          0
#>  [91,]          0          1          0          0          0          1
#>  [92,]          1          0          0          0          1          0
#>  [93,]          0          0          0          0          1          0
#>  [94,]          0          0          1          0          0          1
#>  [95,]          1          0          0          0          0          0
#>  [96,]          0          0          0          1          1          0
#>  [97,]          0          0          0          0          0          0
#>  [98,]          0          1          0          1          1          0
#>  [99,]          0          0          0          0          1          0
#> [100,]          0          0          0          0          0          0
#>        y_pred[26] y_pred[27] y_pred[28] y_pred[29] y_pred[30] y_pred[31]
#>   [1,]          0          0          0          1          0          0
#>   [2,]          1          0          0          0          0          0
#>   [3,]          1          0          0          0          0          0
#>   [4,]          0          0          0          0          0          0
#>   [5,]          0          0          0          0          0          0
#>   [6,]          0          0          0          0          0          0
#>   [7,]          0          0          0          0          0          0
#>   [8,]          0          0          1          1          1          0
#>   [9,]          0          0          0          0          0          1
#>  [10,]          0          0          0          0          0          0
#>  [11,]          1          0          0          0          0          0
#>  [12,]          0          0          0          0          1          0
#>  [13,]          1          0          0          1          0          0
#>  [14,]          0          0          0          1          1          0
#>  [15,]          0          0          0          0          0          0
#>  [16,]          0          0          0          0          0          0
#>  [17,]          0          0          1          0          1          0
#>  [18,]          0          1          1          0          0          1
#>  [19,]          1          1          1          0          0          0
#>  [20,]          0          0          0          0          0          0
#>  [21,]          0          0          0          0          0          0
#>  [22,]          0          0          0          0          0          0
#>  [23,]          0          0          0          0          0          0
#>  [24,]          1          0          0          0          0          0
#>  [25,]          1          0          1          0          0          0
#>  [26,]          0          0          0          0          0          0
#>  [27,]          0          0          0          0          0          0
#>  [28,]          1          0          1          1          0          0
#>  [29,]          0          0          0          0          0          0
#>  [30,]          0          1          1          0          1          0
#>  [31,]          0          0          0          0          0          0
#>  [32,]          0          1          0          0          1          1
#>  [33,]          0          1          0          0          0          0
#>  [34,]          0          0          0          0          0          0
#>  [35,]          0          0          1          0          0          0
#>  [36,]          0          0          0          0          0          0
#>  [37,]          0          0          0          0          0          0
#>  [38,]          0          0          0          0          0          0
#>  [39,]          0          0          0          1          0          0
#>  [40,]          1          0          0          1          0          0
#>  [41,]          0          0          0          0          1          1
#>  [42,]          0          0          0          0          0          0
#>  [43,]          0          0          0          0          0          0
#>  [44,]          0          0          0          0          0          0
#>  [45,]          1          0          0          1          0          1
#>  [46,]          0          0          0          0          0          0
#>  [47,]          1          0          0          0          0          0
#>  [48,]          0          0          1          0          0          0
#>  [49,]          1          0          0          0          0          0
#>  [50,]          0          0          0          0          0          0
#>  [51,]          0          0          0          0          0          0
#>  [52,]          0          0          1          0          0          0
#>  [53,]          0          0          0          0          0          0
#>  [54,]          0          0          0          0          1          1
#>  [55,]          0          0          0          0          0          0
#>  [56,]          0          0          0          0          1          1
#>  [57,]          0          0          0          0          1          1
#>  [58,]          1          1          0          0          0          1
#>  [59,]          0          0          1          0          0          0
#>  [60,]          1          0          0          0          0          0
#>  [61,]          0          0          0          0          0          0
#>  [62,]          0          0          0          0          0          0
#>  [63,]          0          1          0          0          0          0
#>  [64,]          0          0          1          0          0          0
#>  [65,]          1          0          0          1          0          0
#>  [66,]          0          0          0          1          0          0
#>  [67,]          0          0          0          0          0          0
#>  [68,]          1          0          1          0          0          0
#>  [69,]          1          1          1          0          1          0
#>  [70,]          1          0          0          1          0          0
#>  [71,]          1          0          0          0          0          0
#>  [72,]          0          1          1          1          0          1
#>  [73,]          1          0          0          0          0          0
#>  [74,]          0          0          0          0          0          0
#>  [75,]          1          0          0          0          0          0
#>  [76,]          0          0          0          0          0          0
#>  [77,]          0          1          0          0          0          0
#>  [78,]          1          0          0          0          0          0
#>  [79,]          0          0          0          0          0          0
#>  [80,]          0          0          0          0          0          0
#>  [81,]          0          0          0          0          1          1
#>  [82,]          0          0          0          0          0          0
#>  [83,]          0          0          0          0          0          1
#>  [84,]          0          0          0          1          0          0
#>  [85,]          0          0          0          0          0          0
#>  [86,]          0          1          0          0          0          0
#>  [87,]          1          0          0          0          0          1
#>  [88,]          0          0          1          0          0          0
#>  [89,]          0          0          0          0          1          1
#>  [90,]          0          0          1          0          1          0
#>  [91,]          0          0          0          0          0          0
#>  [92,]          0          1          0          0          0          0
#>  [93,]          0          0          0          0          0          0
#>  [94,]          0          0          1          0          0          0
#>  [95,]          1          0          0          1          0          0
#>  [96,]          0          0          0          0          0          0
#>  [97,]          0          0          0          0          0          0
#>  [98,]          0          0          0          0          0          0
#>  [99,]          1          0          0          0          1          1
#> [100,]          0          0          0          0          0          0
#>        y_pred[32] y_pred[33] y_pred[34] y_pred[35] y_pred[36] y_pred[37]
#>   [1,]          0          0          0          1          0          0
#>   [2,]          0          0          0          0          0          0
#>   [3,]          0          1          0          1          1          1
#>   [4,]          0          0          0          1          1          1
#>   [5,]          0          0          0          0          1          1
#>   [6,]          0          0          0          1          1          1
#>   [7,]          0          0          0          0          0          1
#>   [8,]          1          0          0          0          0          0
#>   [9,]          1          0          0          1          0          1
#>  [10,]          0          1          0          0          1          0
#>  [11,]          0          1          0          1          0          1
#>  [12,]          0          0          0          1          1          1
#>  [13,]          0          0          0          0          1          0
#>  [14,]          0          0          0          0          0          1
#>  [15,]          0          0          0          1          1          0
#>  [16,]          0          0          0          0          1          1
#>  [17,]          0          1          1          0          1          0
#>  [18,]          1          0          0          1          0          1
#>  [19,]          0          0          0          1          0          1
#>  [20,]          0          0          0          0          1          1
#>  [21,]          0          0          0          1          1          0
#>  [22,]          0          1          0          1          1          0
#>  [23,]          0          0          0          1          0          1
#>  [24,]          0          0          0          1          0          1
#>  [25,]          0          0          1          1          1          0
#>  [26,]          0          0          0          0          1          1
#>  [27,]          0          0          0          0          1          0
#>  [28,]          0          0          0          1          0          1
#>  [29,]          0          0          0          1          0          0
#>  [30,]          0          1          1          1          1          1
#>  [31,]          0          0          1          1          1          0
#>  [32,]          1          0          0          1          0          0
#>  [33,]          0          0          0          0          0          1
#>  [34,]          0          0          1          0          0          0
#>  [35,]          0          0          0          1          0          0
#>  [36,]          0          1          0          1          1          1
#>  [37,]          0          0          0          0          0          1
#>  [38,]          1          1          0          0          0          1
#>  [39,]          0          0          1          1          1          1
#>  [40,]          1          0          0          1          0          1
#>  [41,]          1          0          0          1          0          0
#>  [42,]          0          0          0          1          1          1
#>  [43,]          1          0          0          1          1          1
#>  [44,]          0          0          0          1          0          1
#>  [45,]          0          0          0          1          1          0
#>  [46,]          0          1          0          0          1          1
#>  [47,]          0          0          0          1          1          1
#>  [48,]          0          0          0          0          1          0
#>  [49,]          0          0          0          1          1          0
#>  [50,]          0          0          0          1          0          0
#>  [51,]          0          0          0          1          1          1
#>  [52,]          0          1          0          1          0          1
#>  [53,]          0          0          0          1          1          0
#>  [54,]          0          0          1          0          1          1
#>  [55,]          0          0          0          0          0          1
#>  [56,]          0          1          0          1          0          0
#>  [57,]          0          0          0          1          1          1
#>  [58,]          0          0          0          1          1          1
#>  [59,]          0          0          0          1          0          0
#>  [60,]          1          1          0          1          1          1
#>  [61,]          0          0          0          1          0          1
#>  [62,]          0          0          0          0          1          0
#>  [63,]          0          0          0          0          1          1
#>  [64,]          1          0          0          0          1          0
#>  [65,]          0          0          0          1          0          0
#>  [66,]          0          1          0          0          1          1
#>  [67,]          0          0          0          0          0          0
#>  [68,]          1          0          0          1          1          0
#>  [69,]          0          0          0          0          1          1
#>  [70,]          1          0          0          1          1          1
#>  [71,]          0          0          0          1          1          0
#>  [72,]          1          0          1          1          0          1
#>  [73,]          0          0          0          0          1          1
#>  [74,]          1          1          0          0          0          0
#>  [75,]          0          0          1          0          0          0
#>  [76,]          0          0          0          1          1          1
#>  [77,]          0          0          0          0          0          1
#>  [78,]          0          1          1          0          1          0
#>  [79,]          0          0          0          1          1          1
#>  [80,]          0          0          0          1          0          1
#>  [81,]          1          1          0          1          0          1
#>  [82,]          0          0          0          1          0          0
#>  [83,]          0          0          0          1          0          0
#>  [84,]          0          1          0          1          1          0
#>  [85,]          0          0          0          0          1          0
#>  [86,]          0          1          0          0          0          1
#>  [87,]          0          0          0          0          1          1
#>  [88,]          0          0          0          1          1          1
#>  [89,]          0          0          0          0          1          0
#>  [90,]          0          0          0          1          0          1
#>  [91,]          0          0          0          0          0          1
#>  [92,]          0          0          1          0          1          0
#>  [93,]          0          1          0          1          1          1
#>  [94,]          0          0          0          1          0          0
#>  [95,]          0          0          0          0          0          0
#>  [96,]          0          0          0          1          0          0
#>  [97,]          0          0          0          1          1          1
#>  [98,]          0          1          0          0          0          0
#>  [99,]          0          1          0          1          1          0
#> [100,]          1          0          0          1          1          1
#>        y_pred[38] y_pred[39] y_pred[40] y_pred[41] y_pred[42] y_pred[43]
#>   [1,]          0          0          0          0          0          0
#>   [2,]          0          0          0          1          0          1
#>   [3,]          1          0          0          0          1          1
#>   [4,]          0          0          0          1          0          0
#>   [5,]          0          0          0          0          0          1
#>   [6,]          0          0          1          0          0          0
#>   [7,]          0          0          0          1          1          1
#>   [8,]          0          0          0          0          0          1
#>   [9,]          0          1          0          1          0          0
#>  [10,]          1          1          1          0          0          0
#>  [11,]          0          1          0          0          0          0
#>  [12,]          0          0          0          0          0          0
#>  [13,]          0          0          0          1          0          0
#>  [14,]          1          0          1          0          0          0
#>  [15,]          0          1          0          0          0          0
#>  [16,]          0          0          0          1          0          1
#>  [17,]          0          1          0          0          1          1
#>  [18,]          1          1          1          1          0          0
#>  [19,]          0          0          1          0          0          0
#>  [20,]          0          0          0          1          0          0
#>  [21,]          0          1          0          1          0          0
#>  [22,]          0          1          0          1          0          0
#>  [23,]          0          0          0          1          0          0
#>  [24,]          0          1          1          0          1          0
#>  [25,]          0          1          0          0          1          0
#>  [26,]          0          0          0          0          0          0
#>  [27,]          0          0          0          0          0          0
#>  [28,]          0          0          0          0          0          1
#>  [29,]          0          0          0          0          1          0
#>  [30,]          1          0          1          1          1          1
#>  [31,]          1          0          0          0          0          0
#>  [32,]          1          1          0          1          1          0
#>  [33,]          0          0          0          0          1          0
#>  [34,]          0          1          0          1          0          1
#>  [35,]          0          1          0          1          1          0
#>  [36,]          1          1          0          0          0          0
#>  [37,]          0          0          0          0          0          0
#>  [38,]          1          1          0          1          1          0
#>  [39,]          1          0          0          0          0          0
#>  [40,]          0          1          0          0          0          0
#>  [41,]          0          0          0          0          0          0
#>  [42,]          0          1          1          0          1          0
#>  [43,]          1          1          1          1          1          0
#>  [44,]          0          0          1          1          0          0
#>  [45,]          1          0          1          1          1          0
#>  [46,]          0          0          0          0          0          0
#>  [47,]          0          0          0          0          0          0
#>  [48,]          0          1          1          0          1          0
#>  [49,]          0          0          0          0          0          1
#>  [50,]          1          0          0          0          0          0
#>  [51,]          1          1          0          1          1          1
#>  [52,]          0          0          1          0          1          0
#>  [53,]          0          1          0          1          0          0
#>  [54,]          1          1          0          1          1          0
#>  [55,]          0          0          1          0          0          0
#>  [56,]          1          1          1          1          0          0
#>  [57,]          0          1          1          0          0          0
#>  [58,]          0          1          0          0          1          0
#>  [59,]          0          0          1          0          0          0
#>  [60,]          1          1          0          1          0          0
#>  [61,]          1          1          1          0          1          0
#>  [62,]          1          0          0          0          0          1
#>  [63,]          1          1          1          1          1          1
#>  [64,]          1          1          0          0          1          0
#>  [65,]          0          1          0          0          1          1
#>  [66,]          0          1          0          1          0          0
#>  [67,]          1          0          1          1          0          1
#>  [68,]          0          0          0          0          1          1
#>  [69,]          0          0          0          0          0          0
#>  [70,]          1          0          0          1          0          1
#>  [71,]          0          0          0          0          0          1
#>  [72,]          0          1          1          0          0          0
#>  [73,]          0          1          0          1          0          0
#>  [74,]          1          0          0          0          0          0
#>  [75,]          0          0          0          0          0          0
#>  [76,]          0          0          1          0          1          1
#>  [77,]          0          0          0          0          1          1
#>  [78,]          1          1          1          0          1          0
#>  [79,]          0          0          0          1          1          1
#>  [80,]          0          0          1          1          0          0
#>  [81,]          0          0          0          1          0          1
#>  [82,]          0          0          0          0          0          0
#>  [83,]          0          1          0          0          0          0
#>  [84,]          0          0          0          1          1          0
#>  [85,]          1          0          1          0          0          1
#>  [86,]          0          0          0          0          1          1
#>  [87,]          1          0          0          1          1          0
#>  [88,]          1          0          0          1          0          0
#>  [89,]          1          1          1          1          0          1
#>  [90,]          1          1          1          1          0          1
#>  [91,]          0          1          0          0          0          0
#>  [92,]          1          0          1          0          0          0
#>  [93,]          0          0          1          0          0          0
#>  [94,]          0          0          0          0          0          0
#>  [95,]          0          1          0          0          0          0
#>  [96,]          1          0          1          1          0          0
#>  [97,]          1          1          0          0          1          0
#>  [98,]          1          1          1          1          1          0
#>  [99,]          1          0          0          0          0          0
#> [100,]          0          0          1          1          0          1
#>        y_pred[44] y_pred[45] y_pred[46]
#>   [1,]          0          1          0
#>   [2,]          1          1          1
#>   [3,]          1          1          1
#>   [4,]          0          0          0
#>   [5,]          0          0          0
#>   [6,]          0          0          0
#>   [7,]          1          0          0
#>   [8,]          1          0          0
#>   [9,]          1          1          0
#>  [10,]          0          0          0
#>  [11,]          0          0          0
#>  [12,]          0          1          0
#>  [13,]          1          0          0
#>  [14,]          0          0          1
#>  [15,]          0          1          0
#>  [16,]          0          0          0
#>  [17,]          1          0          1
#>  [18,]          1          0          0
#>  [19,]          0          0          1
#>  [20,]          1          0          0
#>  [21,]          0          1          0
#>  [22,]          0          0          1
#>  [23,]          0          0          0
#>  [24,]          1          0          0
#>  [25,]          1          0          0
#>  [26,]          0          0          0
#>  [27,]          1          1          1
#>  [28,]          1          0          0
#>  [29,]          0          0          1
#>  [30,]          1          0          1
#>  [31,]          0          1          0
#>  [32,]          0          0          1
#>  [33,]          0          1          1
#>  [34,]          0          1          0
#>  [35,]          0          1          1
#>  [36,]          0          0          0
#>  [37,]          0          1          1
#>  [38,]          0          0          1
#>  [39,]          1          0          0
#>  [40,]          1          1          0
#>  [41,]          1          0          0
#>  [42,]          0          0          0
#>  [43,]          0          0          0
#>  [44,]          0          0          0
#>  [45,]          1          0          1
#>  [46,]          0          1          0
#>  [47,]          0          0          0
#>  [48,]          0          1          0
#>  [49,]          0          0          0
#>  [50,]          0          0          1
#>  [51,]          1          0          0
#>  [52,]          0          0          1
#>  [53,]          0          1          0
#>  [54,]          1          0          0
#>  [55,]          0          1          0
#>  [56,]          1          0          1
#>  [57,]          1          1          1
#>  [58,]          0          1          0
#>  [59,]          0          1          1
#>  [60,]          0          0          0
#>  [61,]          0          0          1
#>  [62,]          0          0          0
#>  [63,]          0          0          0
#>  [64,]          1          0          0
#>  [65,]          0          0          1
#>  [66,]          0          1          0
#>  [67,]          1          0          0
#>  [68,]          1          0          1
#>  [69,]          1          0          0
#>  [70,]          0          0          0
#>  [71,]          1          0          1
#>  [72,]          0          1          0
#>  [73,]          1          0          1
#>  [74,]          1          1          0
#>  [75,]          0          0          0
#>  [76,]          0          0          0
#>  [77,]          0          0          0
#>  [78,]          1          0          0
#>  [79,]          0          0          0
#>  [80,]          0          0          0
#>  [81,]          0          1          0
#>  [82,]          1          0          0
#>  [83,]          0          1          0
#>  [84,]          0          0          0
#>  [85,]          1          1          1
#>  [86,]          0          1          1
#>  [87,]          0          0          0
#>  [88,]          0          0          1
#>  [89,]          0          1          0
#>  [90,]          0          1          0
#>  [91,]          0          0          0
#>  [92,]          0          0          1
#>  [93,]          0          0          0
#>  [94,]          0          0          0
#>  [95,]          1          0          1
#>  [96,]          1          0          1
#>  [97,]          1          0          0
#>  [98,]          1          0          0
#>  [99,]          0          0          1
#> [100,]          1          0          1
# }