qsarify.qsar_scoring module

Copyright (C) 2023 Stephen Szwiec

This file is part of qsarify.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

qsarify.qsar_scoring.ccc_score(y_true, y_pred)[source]

Calculates the CCC score

Parameters:
  • y_true (numpy array, shape (n_samples,)) –

  • y_pred (numpy array, shape (n_samples,)) –

Return type:

float

qsarify.qsar_scoring.q2_score(y_true, y_pred)[source]

Calculates the Q2 score

Parameters:
  • y_true (numpy array , shape (n_samples,)) –

  • y_pred (numpy array, shape (n_samples,)) –

Return type:

float

qsarify.qsar_scoring.q2f3_score(y_true, y_pred, n_train, n_external)[source]

Calculates the Q2_f3 score

Parameters:
  • y_true (numpy array, shape (n_samples,)) –

  • y_pred (numpy array, shape (n_samples,)) –

  • n_external (int) – number of external samples

  • n_train (int) – number of training samples

Return type:

float

qsarify.qsar_scoring.q2f_score(y_true, y_pred, y_mean)[source]

Calculates the Q2_f1 or Q2_f2 score depending on whether the mean is calculated from the training set or the external set

Parameters:
  • y_true (numpy array, shape (n_samples,)) –

  • y_pred (numpy array, shape (n_samples,)) –

  • y_mean (float, mean of the training (for q2f1) or test (for q2f2) set) –

Return type:

float

qsarify.qsar_scoring.rmse_score(y_true, y_pred)[source]

Calculates the RMSE score

Parameters:
  • y_true (numpy array , shape (n_samples,)) –

  • y_pred (numpy array, shape (n_samples,)) –

Return type:

float