From a79c30f0d3bf03f90b6cbad4bc0437ab4978b652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Berk=20Ba=C5=9Fo=C4=9Flu?= Date: Fri, 26 Sep 2025 21:27:52 -0400 Subject: [PATCH] Fixed the comments. --- logistic-regression-wdbc.py | 8 ++++---- mini-batch-sgd-logistic-regression-wdbc.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/logistic-regression-wdbc.py b/logistic-regression-wdbc.py index 4941c4c..e47e32e 100644 --- a/logistic-regression-wdbc.py +++ b/logistic-regression-wdbc.py @@ -142,10 +142,10 @@ if __name__ == "__main__": # ____________________________________________________________________________________ # separate dependent VS independent variables - X = cancer.drop(cancer.columns[0], axis=1) + x = cancer.drop(cancer.columns[0], axis=1) y = cancer[1] - # print(X.head().to_string()) + # print(x.head().to_string()) # normalize data # normalize = cancer.drop(cancer.columns[0], axis=1) @@ -154,14 +154,14 @@ if __name__ == "__main__": # print(cancer.head().to_string()) # turn into array for regression - X = X.to_numpy() + x = x.to_numpy() y = y.to_numpy() # cancer_y = np.asarray(cancer2[0].tolist()) # cancer2.drop(cancer2[0], axis = 1, inplace = True) # split data into train / tests datasets - X_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=y) + x_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=y) ''' missing_rows = df[df.isin(['?', 'NA', 'na', '']).any(axis=1)] # checks null values print(f"Rows with null values: {len(missing_rows)}") diff --git a/mini-batch-sgd-logistic-regression-wdbc.py b/mini-batch-sgd-logistic-regression-wdbc.py index 5f5de17..5d466bd 100644 --- a/mini-batch-sgd-logistic-regression-wdbc.py +++ b/mini-batch-sgd-logistic-regression-wdbc.py @@ -158,7 +158,7 @@ if __name__ == "__main__": # ____________________________________________________________________________________ # separate dependent VS independent variables - X = cancer.drop(cancer.columns[0], axis=1) + x = cancer.drop(cancer.columns[0], axis=1) y = cancer[1] # print(X.head().to_string()) @@ -170,14 +170,14 @@ if __name__ == "__main__": # print(cancer.head().to_string()) # turn into array for regression - X = X.to_numpy() + x = x.to_numpy() y = y.to_numpy() # cancer_y = np.asarray(cancer2[0].tolist()) # cancer2.drop(cancer2[0], axis = 1, inplace = True) # split data into train / tests datasets - X_train, x_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42, stratify=y) + x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42, stratify=y) ''' missing_rows = df[df.isin(['?', 'NA', 'na', '']).any(axis=1)] # checks null values print(f"Rows with null values: {len(missing_rows)}")