Completed
Push — master ( b88790...a2fd74 )
by
unknown
05:30
created

load_data()   A

Complexity

Conditions 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 9
ccs 0
cts 9
cp 0
crap 2
rs 9.6666
1
#import required python modules
2
import numpy as np
3
from numpy import genfromtxt
4
import pandas as pd
5
import matplotlib.pyplot as plt
6
from os import listdir
7
import os.path
8
import urllib.request
9
import zipfile
10
import keras
11
from keras.utils.np_utils import to_categorical
12
13
def split_activities(labels, X, borders=10*100):
0 ignored issues
show
Coding Style Naming introduced by
The name X does not conform to the argument naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
14
    """
15
    Splits up the data per activity and exclude activity=0.
16
    Also remove borders for each activity.
17
    Returns lists with subdatasets
18
    """
19
    tot_len = len(labels)
20
    startpoints = np.where([1] + [labels[i]!=labels[i-1] for i in range(1, tot_len)])[0]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (88/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Exactly one space required around comparison
startpoints = np.where([1] + [labels[i]!=labels[i-1] for i in range(1, tot_len)])[0]
^^
Loading history...
21
    endpoints = np.append(startpoints[1:]-1, tot_len-1)
22
    acts = [labels[s] for s,e in zip(startpoints, endpoints)]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
acts = [labels[s] for s,e in zip(startpoints, endpoints)]
^
Loading history...
23
    #Also split up the data, and only keep the non-zero activities
24
    Xy_split = [(X[s+borders:e-borders+1,:], a) for s,e,a in zip(startpoints, endpoints, acts) if a != 0]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (105/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Exactly one space required after comma
Xy_split = [(X[s+borders:e-borders+1,:], a) for s,e,a in zip(startpoints, endpoints, acts) if a != 0]
^
Loading history...
Coding Style introduced by
Exactly one space required after comma
Xy_split = [(X[s+borders:e-borders+1,:], a) for s,e,a in zip(startpoints, endpoints, acts) if a != 0]
^
Loading history...
Coding Style introduced by
Exactly one space required after comma
Xy_split = [(X[s+borders:e-borders+1,:], a) for s,e,a in zip(startpoints, endpoints, acts) if a != 0]
^
Loading history...
Coding Style Naming introduced by
The name Xy_split does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
25
    Xy_split = [(X, y) for X,y in Xy_split if len(X)>0]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Xy_split = [(X, y) for X,y in Xy_split if len(X)>0]
^
Loading history...
Coding Style introduced by
Exactly one space required around comparison
Xy_split = [(X, y) for X,y in Xy_split if len(X)>0]
^
Loading history...
Coding Style Naming introduced by
The name Xy_split does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
26
    X_list = [X for X,y in Xy_split]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
X_list = [X for X,y in Xy_split]
^
Loading history...
Coding Style Naming introduced by
The name X_list does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
27
    y_list = [y for X,y in Xy_split]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
y_list = [y for X,y in Xy_split]
^
Loading history...
28
    return X_list, y_list
29
30
31
32
def sliding_window(X, y_binary, frame_length, step, X_samples, y_samples):
0 ignored issues
show
Coding Style Naming introduced by
The name X does not conform to the argument naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
Coding Style Naming introduced by
The name X_samples does not conform to the argument naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
33
    for i in range(0, X.shape[0]-frame_length, step):
34
        X_sub = X[i:i+frame_length,:]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
X_sub = X[i:i+frame_length,:]
^
Loading history...
Coding Style Naming introduced by
The name X_sub does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
35
        y_sub = y_binary
36
        X_samples.append(X_sub)
37
        y_samples.append(y_sub)
38
39
def fetch_and_preprocess(directory_to_extract_to,columns_to_use):
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
def fetch_and_preprocess(directory_to_extract_to,columns_to_use):
^
Loading history...
40
    targetdir = directory_to_extract_to + '/PAMAP2'
41
    if os.path.exists(targetdir):
42
        print('Data previously downloaded and stored in ' + targetdir)
43
    else:
44
        #download the PAMAP2 data, this is 688 Mb
45
        path_to_zip_file = directory_to_extract_to + '/PAMAP2_Dataset.zip'
46
        test_file_exist = os.path.isfile(path_to_zip_file)
47
        if test_file_exist is False:
48
            url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/00231/PAMAP2_Dataset.zip'
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (102/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
49
            local_fn, headers = urllib.request.urlretrieve(url,filename=path_to_zip_file) #retrieve data from url
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (113/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
Exactly one space required after comma
local_fn, headers = urllib.request.urlretrieve(url,filename=path_to_zip_file) #retrieve data from url
^
Loading history...
50
            print('Download complete and stored in: ' + path_to_zip_file )
0 ignored issues
show
Coding Style introduced by
No space allowed before bracket
print('Download complete and stored in: ' + path_to_zip_file )
^
Loading history...
51
        else:
52
            print('The data was previously downloaded and stored in ' + path_to_zip_file )
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (90/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
Coding Style introduced by
No space allowed before bracket
print('The data was previously downloaded and stored in ' + path_to_zip_file )
^
Loading history...
53
        # unzip
54
        os.makedirs(targetdir) # create target directory
55
        with zipfile.ZipFile(path_to_zip_file ,"r") as zip_ref:
0 ignored issues
show
Coding Style introduced by
No space allowed before comma
with zipfile.ZipFile(path_to_zip_file ,"r") as zip_ref:
^
Loading history...
Coding Style introduced by
Exactly one space required after comma
with zipfile.ZipFile(path_to_zip_file ,"r") as zip_ref:
^
Loading history...
56
            zip_ref.extractall(targetdir)
57
    outdatapath = targetdir + '/PAMAP2_Dataset' + '/slidingwindow512cleaned/'
58
    if not os.path.exists(outdatapath):
59
        os.makedirs(outdatapath)
60
    if os.path.isfile(outdatapath+'X_train.npy'):
61
        print('Data previously pre-processed and np-files saved to ' + outdatapath)
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (83/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
62
    else:
63
        datadir = targetdir + '/PAMAP2_Dataset/Protocol'
64
        filenames = listdir(datadir)
65
        print('Start pre-processing all ' + str(len(filenames)) + ' files...')
66
        # load the files and put them in a list of pandas dataframes:
67
        datasets = [pd.read_csv(datadir+'/'+fn, header=None, sep=' ') for fn in filenames]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (90/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
68
        # The columns are numbers, which is not very practical. Let's add column labels to the pandas dataframe:
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (112/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
69
        axes = ['x', 'y', 'z']
70
        IMUsensor_columns = ['temperature'] + \
0 ignored issues
show
Coding Style Naming introduced by
The name IMUsensor_columns does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
71
                        ['acc_16g_' + i for i in axes] + \
72
                        ['acc_6g_' + i for i in axes] + \
73
                        ['gyroscope_'+ i for i in axes] + \
74
                        ['magnometer_'+ i for i in axes] + \
75
                        ['orientation_' + str(i) for i in range(4)]
76
        header = ["timestamp", "activityID", "heartrate"] + ["hand_"+s for s in IMUsensor_columns]\
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (99/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
77
            + ["chest_"+s for s in IMUsensor_columns]+ ["ankle_"+s for s in IMUsensor_columns]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (94/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
78
        for i in range(0,len(datasets)):
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
for i in range(0,len(datasets)):
^
Loading history...
79
                datasets[i].columns = header
0 ignored issues
show
Coding Style introduced by
The indentation here looks off. 12 spaces were expected, but 16 were found.
Loading history...
80
        #Interpolate dataset to get same sample rate between channels
81
        datasets_filled = [d.interpolate() for d in datasets]
82
        # Create mapping for class labels
83
        y_set_all = [set(np.array(data.activityID)) - set([0]) for data in datasets_filled]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (91/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
84
        classlabels = list(set.union(*[set(y) for y in y_set_all]))
85
        nr_classes = len(classlabels)
86
        mapclasses = {classlabels[i] : i for i in range(len(classlabels))}
87
        def transform_y(y):
0 ignored issues
show
Coding Style Naming introduced by
The name y does not conform to the argument naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
88
            y_mapped = np.array([mapclasses[c] for c in y], dtype='int')
89
            y_binary = to_categorical(y_mapped, nr_classes)
90
            return y_binary
91
        #Create input (X) and output (y) sets
92
        X_all = [np.array(data[columns_to_use]) for data in datasets_filled]
0 ignored issues
show
Coding Style Naming introduced by
The name X_all does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
93
        y_all = [np.array(data.activityID) for data in datasets_filled]
94
        Xy_lists = [split_activities(y, X) for X,y in zip(X_all, y_all)]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
Xy_lists = [split_activities(y, X) for X,y in zip(X_all, y_all)]
^
Loading history...
Coding Style Naming introduced by
The name Xy_lists does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
95
        X_lists, y_lists = zip(*Xy_lists)
0 ignored issues
show
Coding Style Naming introduced by
The name X_lists does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
96
        y_binary_lists = [transform_y(y) for y in y_lists]
97
        # Split in train, test and val
98
        train_range = slice(0, 6)
99
        val_range = 6
100
        test_range = slice(7,len(datasets_filled))
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
test_range = slice(7,len(datasets_filled))
^
Loading history...
101
        X_train_list = [X for X_list in X_lists[train_range] for X in X_list]
0 ignored issues
show
Coding Style Naming introduced by
The name X_train_list does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
102
        X_val_list = [X for X in X_lists[val_range]]
0 ignored issues
show
Coding Style Naming introduced by
The name X_val_list does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
103
        X_test_list = [X for X_list in X_lists[test_range] for X in X_list]
0 ignored issues
show
Coding Style Naming introduced by
The name X_test_list does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
104
105
        y_train_list = [y for y_list in y_binary_lists[train_range] for y in y_list]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (84/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
106
        y_val_list = [y for y in y_binary_lists[val_range]]
107
        y_test_list = [y for y_list in y_binary_lists[test_range] for y in y_list]
0 ignored issues
show
Coding Style introduced by
This line is too long as per the coding-style (82/79).

This check looks for lines that are too long. You can specify the maximum line length.

Loading history...
108
109
        # Take sliding-window frames. Target is label of last time step
110
        # Data is 100 Hz
111
        frame_length = int(5.12 * 100)
112
        step = 1 * 100
113
114
        X_train = []
0 ignored issues
show
Coding Style Naming introduced by
The name X_train does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
115
        y_train = []
116
        X_val = []
0 ignored issues
show
Coding Style Naming introduced by
The name X_val does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
117
        y_val = []
118
        X_test = []
0 ignored issues
show
Coding Style Naming introduced by
The name X_test does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
119
        y_test = []
120
        for j in range(len(X_train_list)):
121
            X = X_train_list[j]
0 ignored issues
show
Coding Style Naming introduced by
The name X does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
122
            y_binary = y_train_list[j]
123
            sliding_window(X, y_binary, frame_length, step, X_train, y_train)
124
        for j in range(len(X_val_list)):
125
            X = X_val_list[j]
0 ignored issues
show
Coding Style Naming introduced by
The name X does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
126
            y_binary = y_val_list[j]
127
            sliding_window(X, y_binary, frame_length, step, X_val, y_val)
128
        for j in range(len(X_test_list)):
129
            X = X_test_list[j]
0 ignored issues
show
Coding Style Naming introduced by
The name X does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
130
            y_binary = y_test_list[j]
131
            sliding_window(X, y_binary, frame_length, step, X_test, y_test)
132
133
        X_train = np.array(X_train)
0 ignored issues
show
Coding Style Naming introduced by
The name X_train does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
134
        y_train = np.array(y_train)
135
        X_val = np.array(X_val)
0 ignored issues
show
Coding Style Naming introduced by
The name X_val does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
136
        y_val = np.array(y_val)
137
        X_test = np.array(X_test)
0 ignored issues
show
Coding Style Naming introduced by
The name X_test does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
138
        y_test = np.array(y_test)
139
140
        #Shuffle around the train set
141
        np.random.seed(123)
142
        neworder = np.random.permutation(X_train.shape[0])
143
        X_train = X_train[neworder,:,:]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
X_train = X_train[neworder,:,:]
^
Loading history...
Coding Style introduced by
Exactly one space required after comma
X_train = X_train[neworder,:,:]
^
Loading history...
Coding Style Naming introduced by
The name X_train does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
144
        y_train = y_train[neworder,:]
0 ignored issues
show
Coding Style introduced by
Exactly one space required after comma
y_train = y_train[neworder,:]
^
Loading history...
145
146
        # Save binary file
147
        np.save(outdatapath+'X_train', X_train)
148
        np.save(outdatapath+'y_train_binary', y_train)
149
        np.save(outdatapath+'X_val', X_val)
150
        np.save(outdatapath+'y_val_binary', y_val)
151
        np.save(outdatapath+'X_test', X_test)
152
        np.save(outdatapath+'y_test_binary', y_test)
153
        print('Processed data succesfully stored in ' + outdatapath)
154
    return outdatapath
155
156
def load_data(outputpath):
157
    ext = '.npy'
158
    X_train = np.load(outputpath+'X_train'+ext)
0 ignored issues
show
Coding Style Naming introduced by
The name X_train does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
159
    y_train_binary = np.load(outputpath+'y_train_binary'+ext)
160
    X_val = np.load(outputpath+'X_val'+ext)
0 ignored issues
show
Coding Style Naming introduced by
The name X_val does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
161
    y_val_binary = np.load(outputpath+'y_val_binary'+ext)
162
    X_test = np.load(outputpath+'X_test'+ext)
0 ignored issues
show
Coding Style Naming introduced by
The name X_test does not conform to the variable naming conventions ([a-z_][a-z0-9_]{1,30}$).

This check looks for invalid names for a range of different identifiers.

You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.

If your project includes a Pylint configuration file, the settings contained in that file take precedence.

To find out more about Pylint, please refer to their site.

Loading history...
163
    y_test_binary = np.load(outputpath+'y_test_binary'+ext)
164
    return X_train, y_train_binary, X_val, y_val_binary, X_test, y_test_binary
165