Exemplo n.º 1
0
#Step 6: Parse arguments
options.parse()

#Use random seed
random.seed(options.args.random_seed)

#Custom function to read language from input
options.args.predict_languages = languages(options.args.predict_languages)

#Print system
printer = Printer('System')
printer.system(options.args_dict)

#Step 7: Create data with default arguments
data = Data(options.args.avoid_skewness, options.args.data_folder,
            options.args.predict_label, options.args.data_method)

#Step 8: Add all datasources and transform them to row(Y, X) format
#Custom, should be self-made!

#Step 8.1: Add the files or folders the data is preserved in (only if available)
if options.args.predict_languages:
    data.file_train = options.args.data_folder + 'training/'
    # data.file_development = 'eng-trial.pickle'
    # data.file_test = 'eng-test.pickle'

#Custom function
data.languages = options.args.predict_languages

#Load data into a file
data.train = data.load(data.file_train, format='specific_age_gender')
Exemplo n.º 2
0
#Step 6: Parse arguments
options.parse()

#Use random seed
random.seed(options.args.random_seed)

#Custom function to read language from input
options.args.predict_languages = languages(options.args.predict_languages)

#Print system
printer = Printer('System')
printer.system(options.args_dict)

#Step 7: Create data with default arguments
data = Data(options.args.avoid_skewness, options.args.data_folder, options.args.predict_label, options.args.data_method)

#Step 8: Add all datasources and transform them to row(Y, X) format
#Custom, should be self-made!

#Step 8.1: Add the files or folders the data is preserved in (only if available)
data.file_train = 'impression_data.csv'

#Custom function
data.languages = options.args.predict_languages

#Load data into a file
data.train, test = data.load(data.file_train, format='complex_file')
x_tester = [x[1] for x in test]
y_tester = [y[0] for y in test]
#Step 8.2: Formulate the preprocessing steps which have to be done
Exemplo n.º 3
0
#options.add(name='predict_languages', _type=str, _default='esdi', _help='specify which language you want to predict')

#Step 6: Parse arguments
options.parse()

#Use random seed
random.seed(options.args.random_seed)

#Custom function to read language from input

#Print system
printer = Printer('System')
printer.system(options.args_dict)

#Step 7: Create data with default arguments
data = Data(options.args.avoid_skewness, options.args.data_folder, options.args.predict_label, options.args.data_method)

#Step 8: Add all datasources and transform them to row(Y, X) format
#Custom, should be self-made!

#Step 8.1: Add the files or folders the data is preserved in (only if available)

file_name = 'conversion_path' 
#data.file_train = 'conversion_chance.pickle'
#data.file_train = 'conversion_product.pickle'
data.file_train = file_name'.pickle'

#Custom function

#Load data into a file
data.train = data.load(data.file_train, format='pickle')