classifiers.py
def logistic_regression(X_train, X_test, y_train, y_test):
    '''
    Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters.
    Runs the models on X_test and compare the results with y_test.
    
    Args:
        X_train: A Numpy array containing the dataset for training
        X_test: A Numpy array containing the dataset for testing
        y_train: A Numpy array consisting of the target values for training
        y_test: A Numpy array consisting of the target values for testing

    Returns:
        A DataFrame with all the paramaters used and confusion matrices of each model
    '''
    model = LogisticRegression(penalty = 'none', max_iter=10000)
    model.fit(X_train, y_train)
    predicted_labels = model.predict(X_test)
    tn, fp, fn, tp = confusion_matrix(y_test, predicted_labels, labels=[0,1]).ravel()
    convert_matrix = [tn,fp,fn,tp]
    df = pd.DataFrame()
    df['Confusion Matrix'] = [convert_matrix]
    return df

    Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters.
    Runs the models on X_test and compare the results with y_test.
    
    Args:
        X_train: A Numpy array containing the dataset for training
        X_test: A Numpy array containing the dataset for testing
        y_train: A Numpy array consisting of the target values for training
        y_test: A Numpy array consisting of the target values for testing

    Returns:
        A DataFrame with all the paramaters used and confusion matrices of each model
    
Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters.
Runs the models on X_test and compare the results with y_test.
Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters . Runs the models on X_test and compare the results with y_test .
def logistic_regression(X_train, X_test, y_train, y_test):
    model = LogisticRegression(penalty = 'none', max_iter=10000)
    model.fit(X_train, y_train)
    predicted_labels = model.predict(X_test)
    tn, fp, fn, tp = confusion_matrix(y_test, predicted_labels, labels=[0,1]).ravel()
    convert_matrix = [tn,fp,fn,tp]
    df = pd.DataFrame()
    df['Confusion Matrix'] = [convert_matrix]
    return df
def logistic_regression ( X_train , X_test , y_train , y_test ) : model = LogisticRegression ( penalty = 'none' , max_iter = 10000 ) model . fit ( X_train , y_train ) predicted_labels = model . predict ( X_test ) tn , fp , fn , tp = confusion_matrix ( y_test , predicted_labels , labels = [ 0 , 1 ] ) . ravel ( ) convert_matrix = [ tn , fp , fn , tp ] df = pd . DataFrame ( ) df [ 'Confusion Matrix' ] = [ convert_matrix ] return df
Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters.
Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters .
'''
    Creates multiple Logitic Regression classifier models on X_train and y_train with different parameters.
    Runs the models on X_test and compare the results with y_test.
    
    Args:
        X_train: A Numpy array containing the dataset for training
        X_test: A Numpy array containing the dataset for testing
        y_train: A Numpy array consisting of the target values for training
        y_test: A Numpy array consisting of the target values for testing

    Returns:
        A DataFrame with all the paramaters used and confusion matrices of each model
    '''
A DataFrame with all the paramaters used and confusion matrices of each model
A DataFrame with all the paramaters used and confusion matrices of each model
X_train
A Numpy array containing the dataset for training
A Numpy array containing the dataset for training
X_test
A Numpy array containing the dataset for testing
A Numpy array containing the dataset for testing
y_train
A Numpy array consisting of the target values for training
A Numpy array consisting of the target values for training
y_test
A Numpy array consisting of the target values for testing
A Numpy array consisting of the target values for testing