Exemplo n.º 1
0
def loadAndUpdate(pathTrain,
                  pathTest,
                  featureStruct=featUp.generateFeatureStruct()):
    usersTrain = pd.read_csv(pathTrain)
    yRes = pd.DataFrame(usersTrain['country_destination'])
    usersTrain = usersTrain.drop('country_destination', axis=1)
    usersTest = pd.read_csv(pathTest)
    users = pd.concat([usersTrain, usersTest], ignore_index=True)
    for feature in featureStruct:
        feature.update(users)
    yFeat = featUp.countriesFeature()
    yFeat.update(yRes)
    return users, yRes, usersTrain, usersTest
Exemplo n.º 2
0
def loadAndUpdateFeatures(path, featureStruct=featUp.generateFeatureStruct()):
    users = pd.read_csv(path)
    for feature in featureStruct:
        feature.update(users)
    return users