FukuML/Utility.py
def load(input_data_file='', data_type='float'):
        """load file"""
        X = []
        Y = []

        if data_type == 'float':
            with open(input_data_file) as f:
                for line in f:
                    data = line.split()
                    x = [1] + [float(v) for v in data[:-1]]
                    X.append(x)
                    Y.append(float(data[-1]))
        else:
            with open(input_data_file) as f:
                for line in f:
                    data = line.split()
                    x = [1] + [v for v in data[:-1]]
                    X.append(x)
                    Y.append(data[-1])

        return np.array(X), np.array(Y)
def load(input_data_file='', data_type='float'):
        """load file"""
        X = []
        Y = []

        if data_type == 'float':
            with open(input_data_file) as f:
                for line in f:
                    data = line.split()
                    x = [1] + [float(v) for v in data[:-1]]
                    X.append(x)
                    Y.append(float(data[-1]))
        else:
            with open(input_data_file) as f:
                for line in f:
                    data = line.split()
                    x = [1] + [v for v in data[:-1]]
                    X.append(x)
                    Y.append(data[-1])

        return np.array(X), np.array(Y)
load file