varshitha22 commited on
Commit
5550da8
·
verified ·
1 Parent(s): 109c87e

Update cancer.py

Browse files
Files changed (1) hide show
  1. cancer.py +2 -2
cancer.py CHANGED
@@ -16,11 +16,11 @@ def load_data():
16
  return pd.read_csv('cancer_prediction_data (2).csv')
17
 
18
  # Data Preprocessing
19
- # Separate preprocessing steps for numeric and categorical features
20
- def preprocess_data(df):
21
  numeric = ['Age', 'Tumor_Size']
22
  ordinal = ['Tumor_Grade', 'Symptoms_Severity', 'Alcohol_Consumption', 'Exercise_Frequency']
23
  nominal = ['Gender', 'Family_History', 'Smoking_History']
 
24
  preprocess = ColumnTransformer([
25
  ('num', Pipeline([
26
  ('imputer', SimpleImputer(strategy='mean')),
 
16
  return pd.read_csv('cancer_prediction_data (2).csv')
17
 
18
  # Data Preprocessing
19
+ def preprocess_data(df):
 
20
  numeric = ['Age', 'Tumor_Size']
21
  ordinal = ['Tumor_Grade', 'Symptoms_Severity', 'Alcohol_Consumption', 'Exercise_Frequency']
22
  nominal = ['Gender', 'Family_History', 'Smoking_History']
23
+
24
  preprocess = ColumnTransformer([
25
  ('num', Pipeline([
26
  ('imputer', SimpleImputer(strategy='mean')),