classifiers.py
def classify(estimator, X_train, X_test, y_train, y_test):
    '''
    Runs the specific Classification method.

    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 of the specified Classifier
    '''
    if estimator == 'svm':
        return SVM(X_train, X_test, y_train, y_test)
    elif estimator == 'naive_bayes':
        return naive_bayes(X_train, X_test, y_train, y_test)
    elif estimator == 'rdforest':
        return rdforest(X_train, X_test, y_train, y_test)
    elif estimator == 'knn':
        return KNN(X_train, X_test, y_train, y_test)
    elif estimator == 'elasticnet':
        return elasticnet(X_train, X_test, y_train, y_test)
    elif estimator =='xgboost':
        return xgboost(X_train, X_test, y_train, y_test)
    elif estimator =='logreg':
        return logistic_regression(X_train, X_test, y_train, y_test)

    Runs the specific Classification method.

    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 of the specified Classifier
    
Runs the specific Classification method.
Runs the specific Classification method .
def classify(estimator, X_train, X_test, y_train, y_test):
    if estimator == 'svm':
        return SVM(X_train, X_test, y_train, y_test)
    elif estimator == 'naive_bayes':
        return naive_bayes(X_train, X_test, y_train, y_test)
    elif estimator == 'rdforest':
        return rdforest(X_train, X_test, y_train, y_test)
    elif estimator == 'knn':
        return KNN(X_train, X_test, y_train, y_test)
    elif estimator == 'elasticnet':
        return elasticnet(X_train, X_test, y_train, y_test)
    elif estimator =='xgboost':
        return xgboost(X_train, X_test, y_train, y_test)
    elif estimator =='logreg':
        return logistic_regression(X_train, X_test, y_train, y_test)
def classify ( estimator , X_train , X_test , y_train , y_test ) : if estimator == 'svm' : return SVM ( X_train , X_test , y_train , y_test ) elif estimator == 'naive_bayes' : return naive_bayes ( X_train , X_test , y_train , y_test ) elif estimator == 'rdforest' : return rdforest ( X_train , X_test , y_train , y_test ) elif estimator == 'knn' : return KNN ( X_train , X_test , y_train , y_test ) elif estimator == 'elasticnet' : return elasticnet ( X_train , X_test , y_train , y_test ) elif estimator == 'xgboost' : return xgboost ( X_train , X_test , y_train , y_test ) elif estimator == 'logreg' : return logistic_regression ( X_train , X_test , y_train , y_test )
Runs the specific Classification method.
Runs the specific Classification method .
'''
    Runs the specific Classification method.

    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 of the specified Classifier
    '''
A DataFrame with all the paramaters used and confusion matrices of each model of the specified Classifier
A DataFrame with all the paramaters used and confusion matrices of each model of the specified Classifier
estimator
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