sudhirpgcmma02 commited on
Commit
7a3201d
·
verified ·
1 Parent(s): 2ba35c4

Upload train.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. train.py +5 -5
train.py CHANGED
@@ -57,8 +57,8 @@ class FeatureEngineer(BaseEstimator, TransformerMixin):
57
  else:
58
  # These are the expected column names after initial preprocessing
59
  # They should be consistent with the features defined in the overall dataset.
60
-
61
-
62
  print("columna names #######################\n",df.columns)
63
  df.columns = (df.columns
64
  .str.strip()
@@ -67,9 +67,9 @@ class FeatureEngineer(BaseEstimator, TransformerMixin):
67
  .str.lower()
68
  )
69
  print("columna names #######################\n",df.columns)
70
-
71
  core_sensor_cols =df.columns.tolist()
72
-
73
  # ===== diff features
74
  for col_name in df.select_dtypes(include=np.number).columns:
75
  df[f"{col_name}_diff"] = df[col_name].diff()
@@ -90,7 +90,7 @@ class FeatureEngineer(BaseEstimator, TransformerMixin):
90
 
91
  # ===== aggregates
92
  # Corrected: Use actual string column names instead of integer indices
93
-
94
  df["temp_gap"] = df['lub_oil_temp'] - df['coolant_temp'] # oil vs coolant
95
  df["pressure_sum"] = df[['lub_oil_pressure','fuel_pressure','coolant_pressure']].sum(axis=1)
96
 
 
57
  else:
58
  # These are the expected column names after initial preprocessing
59
  # They should be consistent with the features defined in the overall dataset.
60
+
61
+
62
  print("columna names #######################\n",df.columns)
63
  df.columns = (df.columns
64
  .str.strip()
 
67
  .str.lower()
68
  )
69
  print("columna names #######################\n",df.columns)
70
+
71
  core_sensor_cols =df.columns.tolist()
72
+
73
  # ===== diff features
74
  for col_name in df.select_dtypes(include=np.number).columns:
75
  df[f"{col_name}_diff"] = df[col_name].diff()
 
90
 
91
  # ===== aggregates
92
  # Corrected: Use actual string column names instead of integer indices
93
+
94
  df["temp_gap"] = df['lub_oil_temp'] - df['coolant_temp'] # oil vs coolant
95
  df["pressure_sum"] = df[['lub_oil_pressure','fuel_pressure','coolant_pressure']].sum(axis=1)
96