Skip to content

Commit 0a55ee8

Browse files
authored
removed imports
1 parent 4d0a4f1 commit 0a55ee8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ds11mltoolkit/machine_learning.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from sklearn.preprocessing import PolynomialFeatures, StandardScaler, MinMaxScaler
44
from sklearn.model_selection import train_test_split
5-
from sklearn.metrics import accuracy_score, roc_curve, auc, roc_auc_score, confusion_matrix
5+
from sklearn.metrics import accuracy_score, roc_curve, auc, roc_auc_score, confusion_matrix, mean_absolute_error, mean_squared_error, mean_absolute_percentage_error
66

77
import pandas as pd
88
import numpy as np
@@ -18,6 +18,7 @@
1818
import io
1919
from PIL import Image
2020
import pickle
21+
import zipfile
2122

2223

2324
def balance_binary_target(df, strategy='smote', minority_ratio=None, visualize=False):
@@ -159,7 +160,7 @@ def create_multiclass_prediction_df(model, class_names: List[str], X_test: Union
159160
return model_predictions_df
160161

161162
def quickregression(name):
162-
from sklearn.metrics import mean_absolute_error, mean_squared_error, mean_absolute_percentage_error
163+
163164
"""
164165
Function to save time when doing Machine Learning models.
165166
It only asks the name of the model to train and returns the scoring.
@@ -188,8 +189,7 @@ def quickregression(name):
188189

189190

190191
def load_model_zip(zip_file, model_file):
191-
import pickle
192-
import zipfile
192+
193193
"""
194194
Uploads a model file from a zip file.
195195

0 commit comments

Comments
 (0)