def setUp(self):
        DB = pm.MongoClient(port=22334)['ModelBehavior']
        feature_name = 'IT'
        feature_split = [1, 2]
        features, meta = feature_loader.get_features_by_name(feature_name)
        decoder_model = decoder_models.get_decoder_model_by_name('StandardModel')
        gridfs_name = '_'.join([decoder_model['name'], feature_name, 'results'])+'TEST'
        fs = gridfs.GridFS(DB, gridfs_name) # Decide where to store things
        additional_info = {'feature_split': feature_split, 'test': True}

        self.F = features
        self.decoder_model = decoder_model
        self.meta = meta
        self.fs = fs
        self.feature_inds = feature_split
        self.additional_info = additional_info
        self.ids = []
예제 #2
0
    def setUp(self):
        DB = pm.MongoClient(port=22334)['ModelBehavior']
        feature_name = 'IT'
        feature_split = [1, 2]
        features, meta = feature_loader.get_features_by_name(feature_name)
        decoder_model = decoder_models.get_decoder_model_by_name(
            'StandardModel')
        gridfs_name = '_'.join(
            [decoder_model['name'], feature_name, 'results']) + 'TEST'
        fs = gridfs.GridFS(DB, gridfs_name)  # Decide where to store things
        additional_info = {'feature_split': feature_split, 'test': True}

        self.F = features
        self.decoder_model = decoder_model
        self.meta = meta
        self.fs = fs
        self.feature_inds = feature_split
        self.additional_info = additional_info
        self.ids = []
__author__ = 'ardila'
import sys
import gridfs
import pymongo as pm



feature_name = sys.argv[1]

decoder_model_name = sys.argv[3] # Can make this an option later

feature_split = [int(ind) for ind in sys.argv[2].split(',')]

# Load feature from name

features, meta = feature_loader.get_features_by_name(feature_name)

#Load decoder model from name

decoder_model = decoder_models.get_decoder_model_by_name(decoder_model_name)


fs = store_feature_results.get_gridfs(decoder_model_name=decoder_model_name, # Decide where to store things
                                      feature_name=feature_name)

additional_info = {'feature_split': feature_split}

store_feature_results.store_subsampled_feature_results(features, meta,
                                                       decoder_model, fs,
                                                       feature_split,
                                                       additional_info)
from BehavioralBenchmark.ImageLevel import store_feature_results, feature_loader, decoder_models

__author__ = 'ardila'
import sys
import gridfs
import pymongo as pm

feature_name = sys.argv[1]

decoder_model_name = sys.argv[3]  # Can make this an option later

feature_split = [int(ind) for ind in sys.argv[2].split(',')]

# Load feature from name

features, meta = feature_loader.get_features_by_name(feature_name)

#Load decoder model from name

decoder_model = decoder_models.get_decoder_model_by_name(decoder_model_name)

fs = store_feature_results.get_gridfs(
    decoder_model_name=decoder_model_name,  # Decide where to store things
    feature_name=feature_name)

additional_info = {'feature_split': feature_split}

store_feature_results.store_subsampled_feature_results(features, meta,
                                                       decoder_model, fs,
                                                       feature_split,
                                                       additional_info)