Code2Text 0.2.1__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)
@@ -224,7 +225,7 @@ ax.set_zlabel("Age")
224
225
  plt.show()"""
225
226
 
226
227
  class fdsa_data:
227
- def iris(self):
228
+ def iris():
228
229
  return '''Id,SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species
229
230
  1,5.1,3.5,1.4,0.2,setosa
230
231
  2,4.9,3.0,1.4,0.2,setosa
@@ -377,7 +378,7 @@ class fdsa_data:
377
378
  149,6.2,3.4,5.4,2.3,virginica
378
379
  150,5.9,3.0,5.1,1.8,virginica
379
380
  '''
380
- def diabetes(self):
381
+ def diabetes():
381
382
  return '''Pregnancies,Glucose,BloodPressure,SkinThickness,Insulin,BMI,DiabetesPedigreeFunction,Age,Outcome
382
383
  6,98,69,25,362,43.0,2.138,43,1
383
384
  3,105,58,30,507,30.2,0.699,51,1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Code2Text
3
- Version: 0.2.1
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.1
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.1"
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.1",
5
+ version="0.2.3",
6
6
  packages=find_packages(),
7
7
  install_requires=[],
8
8
  )
File without changes
File without changes