Пример #1
0
    testIndex = dataIndex
    trainIndex = dataIndex
    relevantMarkers = np.asarray([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,
                                 19,20,21,22,23,24,25,26,27,28])-1
    mode = 'CSV'
    numClasses = 57
    keepProb = .8

'''
Choose the reference sample.
'''
print('Choose the reference sample between ' + str(trainIndex))

start = tm.time()
refSampleInd = dh.chooseReferenceSample(dataPath, trainIndex,
                                        relevantMarkers, mode,
                                        choice)
end = tm.time()
print('reference sample selection time: ' + str(end - start))

print('Load the target ' + str(trainIndex[refSampleInd])) 
target = dh.loadDeepCyTOFData(dataPath, trainIndex[refSampleInd],
                              relevantMarkers, mode)

# Pre-process sample.
if choice!=5:
    target = dh.preProcessSamplesCyTOFData(target)

'''
Train the de-noising auto encoder.
'''
Пример #2
0
        numClasses = len(actual.columns)
        keepProb = .8
        '''
    dataIndex = np.arange(1, 16 + 1)
    trainIndex = dataIndex
    testIndex = dataIndex
    relevantMarkers = np.asarray([1, 2, 3, 4, 5, 6, 7, 8]) - 1
    mode = 'CSV'
    numClasses = 4
    keepProb = .8
    '''
        '''
    Choose the reference sample.
    '''
        print('Choose the reference sample')
        refSampleInd = dh.chooseReferenceSample(data_dir, trainIndex,
                                                relevantMarkers, mode)
        target = dh.loadDeepCyTOFData(data_dir, trainIndex[refSampleInd],
                                      relevantMarkers, mode)

        # for data_path in data_paths:
        #   data = pd.read_csv(data_path, compression='gzip', error_bad_lines=False)
        #   actual = pd.read_csv(data_path.replace("/x/","/y/"), compression='gzip', error_bad_lines=False)

        # Pre-process sample. Don't need to, my samples are cleaned and processed
        target = dh.preProcessSamplesCyTOFData(target)
        '''
    Train the de-noising auto encoder.
    '''
        print('Train the de-noising auto encoder.')
        res_dir = data_dir.replace("raw/", "results/").replace(
            "/x/", "/deepCyTOF_models/" + str(trainNum) + "/")