Code2Text 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text/fdsa.py +5 -4
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text.egg-info/PKG-INFO +1 -1
- {code2text-0.2.2 → code2text-0.2.3}/PKG-INFO +1 -1
- {code2text-0.2.2 → code2text-0.2.3}/pyproject.toml +1 -1
- {code2text-0.2.2 → code2text-0.2.3}/setup.py +1 -1
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text/__init__.py +0 -0
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text/utils.py +0 -0
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text.egg-info/SOURCES.txt +0 -0
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text.egg-info/dependency_links.txt +0 -0
- {code2text-0.2.2 → code2text-0.2.3}/Code2Text.egg-info/top_level.txt +0 -0
- {code2text-0.2.2 → code2text-0.2.3}/setup.cfg +0 -0
|
@@ -106,7 +106,6 @@ analysis(df)"""
|
|
|
106
106
|
def program_6():
|
|
107
107
|
"""EX NO: 6 – Logistic Regression"""
|
|
108
108
|
return """# ========== PROGRAM 6: Logistic Regression ==========
|
|
109
|
-
|
|
110
109
|
import pandas as pd
|
|
111
110
|
import numpy as np
|
|
112
111
|
from sklearn.model_selection import train_test_split
|
|
@@ -115,13 +114,15 @@ from sklearn.metrics import accuracy_score
|
|
|
115
114
|
|
|
116
115
|
df = pd.read_csv("diabetes.csv")
|
|
117
116
|
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
# Check classes
|
|
118
|
+
print(df["Outcome"].value_counts())
|
|
120
119
|
|
|
121
120
|
X = df.drop("Outcome", axis=1)
|
|
122
121
|
y = df["Outcome"]
|
|
123
122
|
|
|
124
|
-
X_train, X_test, y_train, y_test = train_test_split(
|
|
123
|
+
X_train, X_test, y_train, y_test = train_test_split(
|
|
124
|
+
X, y, test_size=0.2, stratify=y
|
|
125
|
+
)
|
|
125
126
|
|
|
126
127
|
model = LogisticRegression(max_iter=1000)
|
|
127
128
|
model.fit(X_train, y_train)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|