scripts/coxph_preprocessing.py [147:181]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )

    logger.info(X_train.dtypes)

    numerical_idx = X_train.select_dtypes(
        exclude=["object", "category"]
    ).columns.tolist()

    categorical_idx = X_train.select_dtypes(exclude=["float", "int"]).columns.tolist()

    numeric_transformer = Pipeline(
        steps=[
            ("imputer", SimpleImputer(strategy="median")),
            ("scaler", StandardScaler()),
        ]
    )

    categorical_transformer = Pipeline(
        steps=[
            ("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
            ("onehot", OneHotEncoder(sparse=False, handle_unknown="ignore")),
        ]
    )

    preprocessor = ColumnTransformer(
        [
            ("numerical", numeric_transformer, numerical_idx),
            ("categorical", categorical_transformer, categorical_idx),
        ],
        remainder="passthrough",
    )

    logger.info("Running preprocessing and feature engineering transformations")
    train_features = preprocessor.fit_transform(X_train)
    test_features = preprocessor.transform(X_test)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/preprocessing.py [156:189]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    )
    logger.info(X_train.dtypes)

    numerical_idx = X_train.select_dtypes(
        exclude=["object", "category"]
    ).columns.tolist()

    categorical_idx = X_train.select_dtypes(exclude=["float", "int"]).columns.tolist()

    numeric_transformer = Pipeline(
        steps=[
            ("imputer", SimpleImputer(strategy="median")),
            ("scaler", StandardScaler()),
        ]
    )

    categorical_transformer = Pipeline(
        steps=[
            ("imputer", SimpleImputer(strategy="constant", fill_value="missing")),
            ("onehot", OneHotEncoder(sparse=False, handle_unknown="ignore")),
        ]
    )

    preprocessor = ColumnTransformer(
        [
            ("numerical", numeric_transformer, numerical_idx),
            ("categorical", categorical_transformer, categorical_idx),
        ],
        remainder="passthrough",
    )

    logger.info("Running preprocessing and feature engineering transformations")
    train_features = preprocessor.fit_transform(X_train)
    test_features = preprocessor.transform(X_test)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



