ionic_liquids/utils.py
def read_model(file_dir):
    """
    Read the trained regressor to
    avoid repeating training.

    Input
    ------
    file_dir : the directory containing all model info

    Returns
    ------
    obj: model object
    X_mean : mean of columns in training X
    X_stdev : stdev of columns in training X
    X : predictor matrix (if it exists) otherwise None
    y : response vector (if it exists) otherwise None

    """
    filename = file_dir + '/model.pkl'
    obj = joblib.load(filename)
    X_mean = joblib.load(file_dir+'/X_mean.pkl')
    X_stdev = joblib.load(file_dir+'/X_stdev.pkl')

    try:
        X = joblib.load(file_dir + '/X_data.pkl')
    except:
        X = None
    try:
        y = joblib.load(file_dir + '/y_data.pkl')
    except:
        y = None

    return obj, X_mean, X_stdev, X, y

    Read the trained regressor to
    avoid repeating training.

    Input
    ------
    file_dir : the directory containing all model info

    Returns
    ------
    obj: model object
    X_mean : mean of columns in training X
    X_stdev : stdev of columns in training X
    X : predictor matrix (if it exists) otherwise None
    y : response vector (if it exists) otherwise None

    
Read the trained regressor to
avoid repeating training.

Input

file_dir : the directory containing all model info

Returns

model object
X_mean : mean of columns in training X
X_stdev : stdev of columns in training X
X : predictor matrix (if it exists) otherwise None
y : response vector (if it exists) otherwise None
Read the trained regressor to avoid repeating training . Input file_dir : the directory containing all model info Returns model object X_mean : mean of columns in training X X_stdev : stdev of columns in training X X : predictor matrix ( if it exists ) otherwise None y : response vector ( if it exists ) otherwise None
def read_model(file_dir):
    filename = file_dir + '/model.pkl'
    obj = joblib.load(filename)
    X_mean = joblib.load(file_dir+'/X_mean.pkl')
    X_stdev = joblib.load(file_dir+'/X_stdev.pkl')
    try:
        X = joblib.load(file_dir + '/X_data.pkl')
    except:
        X = None
    try:
        y = joblib.load(file_dir + '/y_data.pkl')
    except:
        y = None
    return obj, X_mean, X_stdev, X, y
def read_model ( file_dir ) : filename = file_dir + '/model.pkl' obj = joblib . load ( filename ) X_mean = joblib . load ( file_dir + '/X_mean.pkl' ) X_stdev = joblib . load ( file_dir + '/X_stdev.pkl' ) try : X = joblib . load ( file_dir + '/X_data.pkl' ) except : X = None try : y = joblib . load ( file_dir + '/y_data.pkl' ) except : y = None return obj , X_mean , X_stdev , X , y
Read the trained regressor to
avoid repeating training.
Read the trained regressor to avoid repeating training .
"""
    Read the trained regressor to
    avoid repeating training.

    Input
    ------
    file_dir : the directory containing all model info

    Returns
    ------
    obj: model object
    X_mean : mean of columns in training X
    X_stdev : stdev of columns in training X
    X : predictor matrix (if it exists) otherwise None
    y : response vector (if it exists) otherwise None

    """
file_dir