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.
@@ -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
- df.replace(0, np.nan, inplace=True)
119
- df.fillna(df.mean(numeric_only=True), inplace=True)
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(X, y, test_size=0.2)
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Code2Text
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: My reusable python module
5
5
  Author: Unknown
6
6
  Requires-Python: >=3.7
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Code2Text
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: My reusable python module
5
5
  Author: Unknown
6
6
  Requires-Python: >=3.7
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Code2Text"
3
- version = "0.2.2"
3
+ version = "0.2.3"
4
4
  description = "My reusable python module"
5
5
  authors = [{name = "Unknown"}]
6
6
  readme = "README.md"
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="Code2Text",
5
- version="0.2.2",
5
+ version="0.2.3",
6
6
  packages=find_packages(),
7
7
  install_requires=[],
8
8
  )
File without changes
File without changes