uni_multiStats.py
def baseline(data, target, path):
    '''
    Generate baseline accuracy and f1 score and multivariate and univariate, and save them in a txt file.

    Args:
        data: The dataset after preprocessing
        target: The dependent variable of the dataset
        path: Directory from which the python file is being run
    '''
    f = open(path+'Baseline.txt','w+')
    rate = sum(data[target])/data.shape[0]
    rate2 = 1-rate
    f.write('base line accuracy is '+str( max(rate,1-rate))+'\n')
    f1 = 2*rate/(1+rate)
    f.write('base line f1 value is '+str(f1))
    f.close()

    Generate baseline accuracy and f1 score and multivariate and univariate, and save them in a txt file.

    Args:
        data: The dataset after preprocessing
        target: The dependent variable of the dataset
        path: Directory from which the python file is being run
    
Generate baseline accuracy and f1 score and multivariate and univariate, and save them in a txt file.
Generate baseline accuracy and f1 score and multivariate and univariate and save them in a txt file .
def baseline(data, target, path):
    f = open(path+'Baseline.txt','w+')
    rate = sum(data[target])/data.shape[0]
    rate2 = 1-rate
    f.write('base line accuracy is '+str( max(rate,1-rate))+'\n')
    f1 = 2*rate/(1+rate)
    f.write('base line f1 value is '+str(f1))
    f.close()
def baseline ( data , target , path ) : f = open ( path + 'Baseline.txt' , 'w+' ) rate = sum ( data [ target ] ) / data . shape [ 0 ] rate2 = 1 - rate f . write ( 'base line accuracy is ' + str ( max ( rate , 1 - rate ) ) + '\n' ) f1 = 2 * rate / ( 1 + rate ) f . write ( 'base line f1 value is ' + str ( f1 ) ) f . close ( )
Generate baseline accuracy and f1 score and multivariate and univariate, and save them in a txt file.
Generate baseline accuracy and f1 score and multivariate and univariate and save them in a txt file .
'''
    Generate baseline accuracy and f1 score and multivariate and univariate, and save them in a txt file.

    Args:
        data: The dataset after preprocessing
        target: The dependent variable of the dataset
        path: Directory from which the python file is being run
    '''
data
The dataset after preprocessing
The dataset after preprocessing
target
The dependent variable of the dataset
The dependent variable of the dataset
path
Directory from which the python file is being run
Directory from which the python file is being run