View source: R/customMetrics.R
pearson_correlation_coefficient | R Documentation |
Function for Pearson correlation coefficient.
pearson_correlation_coefficient(y_true, y_pred)
y_true |
True labels (Tensor) |
y_pred |
Predictions (Tensor of the same shape as |
Correlation
Tustison NJ
library( ANTsRNet )
library( keras )
model <- createUnetModel2D( c( 64, 64, 1 ) )
metric_pearson_correlation_coefficient <-
custom_metric( "pearson_correlation_coefficient",
pearson_correlation_coefficient )
model %>% compile( loss = loss_categorical_crossentropy,
optimizer = optimizer_adam( lr = 0.0001 ),
metrics = c( metric_pearson_correlation_coefficient ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.