In order to calculate score of different types of Algorithm we use following types of methods, few methods from SkLearn library are mentioned below.
Scoring  Function  Comment 

Classification  
‘accuracy’  metrics.accuracy_score 

‘average_precision’  metrics.average_precision_score 

‘f1’  metrics.f1_score 
for binary targets 
‘f1_micro’  metrics.f1_score 
microaveraged 
‘f1_macro’  metrics.f1_score 
macroaveraged 
‘f1_weighted’  metrics.f1_score 
weighted average 
‘f1_samples’  metrics.f1_score 
by multilabel sample 
‘neg_log_loss’  metrics.log_loss 
requires predict_proba support 
‘precision’ etc.  metrics.precision_score 
suffixes apply as with ‘f1’ 
‘recall’ etc.  metrics.recall_score 
suffixes apply as with ‘f1’ 
‘roc_auc’  metrics.roc_auc_score 

Clustering  
‘adjusted_mutual_info_score’  metrics.adjusted_mutual_info_score 

‘adjusted_rand_score’  metrics.adjusted_rand_score 

‘completeness_score’  metrics.completeness_score 

‘fowlkes_mallows_score’  metrics.fowlkes_mallows_score 

‘homogeneity_score’  metrics.homogeneity_score 

‘mutual_info_score’  metrics.mutual_info_score 

‘normalized_mutual_info_score’  metrics.normalized_mutual_info_score 

‘v_measure_score’  metrics.v_measure_score 

Regression  
‘explained_variance’  metrics.explained_variance_score 

‘neg_mean_absolute_error’  metrics.mean_absolute_error 

‘neg_mean_squared_error’  metrics.mean_squared_error 

‘neg_mean_squared_log_error’  metrics.mean_squared_log_error 

‘neg_median_absolute_error’  metrics.median_absolute_error 

‘r2’  metrics.r2_score 
Few Examples are as:
from sklearn.metrics import r2_score
import numpy as np
model.score(x_test, y_test)
r2_score(y_test,y_predict)
from sklearn.metrics import mean_squared_error
print(“Mean squared error: %.2f” % mean_squared_error(y_test,y_predict,multioutput=’raw_values’))
from sklearn.metrics import explained_variance_score
explained_variance_score(y_test,y_predict)
#note Best possible score is 1.0, lower values are worse.