scripts/coxph_preprocessing.py [14:67]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        stdout=open(os.devnull, "wb"),
    )


install("scikit-learn==0.24.1")
install("awswrangler==2.4.0")
os.system("conda install -c conda-forge hdbscan -y")
install("Amazon-DenseClus==0.0.7")

import awswrangler as wr
import boto3
import joblib
import numpy as np
import pandas as pd
from denseclus import DenseClus
from sklearn.compose import ColumnTransformer
from sklearn.exceptions import DataConversionWarning
from sklearn.impute import SimpleImputer
from sklearn.model_selection import train_test_split
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder, StandardScaler

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

warnings.filterwarnings(action="ignore", category=DataConversionWarning)

col_type = {
    "state": "category",
    "account length": "int64",
    "area code": "str",
    "phone": "str",
    "int'l plan": "category",
    "vmail plan": "category",
    "vmail message": "int64",
    "day mins": "float64",
    "day calls": "int64",
    "day charge": "float64",
    "eve mins": "float64",
    "eve calls": "int64",
    "eve charge": "float64",
    "night mins": "float64",
    "night calls": "int64",
    "night charge": "float64",
    "intl mins": "float64",
    "intl calls": "int64",
    "intl charge": "float64",
    "custserv calls": "int64",
    "churn?": "category",
}

columns = list(col_type.keys())
target_col = "churn?"
class_labels = ["True.", "False."]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/preprocessing.py [16:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        stdout=open(os.devnull, "wb"),
    )


install("scikit-learn==0.24.1")
install("awswrangler==2.4.0")
os.system("conda install -c conda-forge hdbscan -y")
install("Amazon-DenseClus==0.0.7")

import awswrangler as wr
import boto3
import joblib
import pandas as pd
from denseclus import DenseClus
from sklearn.compose import ColumnTransformer
from sklearn.exceptions import DataConversionWarning
from sklearn.impute import SimpleImputer
from sklearn.model_selection import train_test_split
from sklearn.pipeline import Pipeline
from sklearn.preprocessing import OneHotEncoder, StandardScaler

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

warnings.filterwarnings(action="ignore", category=DataConversionWarning)

col_type = {
    "state": "category",
    "account length": "int64",
    "area code": "str",
    "phone": "str",
    "int'l plan": "category",
    "vmail plan": "category",
    "vmail message": "int64",
    "day mins": "float64",
    "day calls": "int64",
    "day charge": "float64",
    "eve mins": "float64",
    "eve calls": "int64",
    "eve charge": "float64",
    "night mins": "float64",
    "night calls": "int64",
    "night charge": "float64",
    "intl mins": "float64",
    "intl calls": "int64",
    "intl charge": "float64",
    "custserv calls": "int64",
    "churn?": "category",
}

columns = list(col_type.keys())
target_col = "churn?"
class_labels = ["True.", "False."]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



