from pyartm import regularizers from pyartm_datasets import main_cases from pyartm.optimizations import timed_default import manager if __name__ == '__main__': n_dw_matrix = main_cases.get_20newsgroups([ 'rec.autos', 'rec.motorcycles', 'rec.sport.baseball', 'rec.sport.hockey', 'sci.crypt', 'sci.electronics', 'sci.med', 'sci.space' ])[0] manager.perform_experiment( n_dw_matrix, timed_default.Optimizer( regularization_list=[regularizers.Additive(0., 0.)] * 100, return_counters=True), 10, 100)
'rec.sport.hockey', 'sci.crypt', 'sci.electronics', 'sci.med', 'sci.space' ], train_proportion=0.8)[:2] args_list = list() for T in [10, 25]: for theta_alpha in [0.1, 0.01, 0.1]: regularization_list = [regularizers.Additive(0, theta_alpha) ] * ITERS_COUNT args_list.append( (train_n_dw_matrix, test_n_dw_matrix, default.Optimizer(regularization_list), T, SAMPLES, '20news_experiment/20news_{}t_default_{}_{}.pkl'.format( T, 0., theta_alpha))) args_list.append( (train_n_dw_matrix, test_n_dw_matrix, thetaless.Optimizer(regularization_list), T, SAMPLES, '20news_experiment/20news_{}t_thetaless_{}_{}.pkl'.format( T, 0., theta_alpha))) args_list.append( (train_n_dw_matrix, test_n_dw_matrix, transfer_thetaless.Optimizer(regularization_list), T, SAMPLES, '20news_experiment/20news_{}t_transfer_thetaless_{}_{}.pkl'. format(T, 0., theta_alpha))) #manager.perform_experiment(args_list[0]) #manager.perform_experiment(args_list[1]) manager.perform_experiment(args_list[2]) #Pool(processes=5).map(manager.perform_experiment, args_list)
from pyartm import regularizers from pyartm_datasets import main_cases from pyartm.optimizations import timed_default import manager if __name__ == '__main__': manager.perform_experiment( main_cases.get_nips()[0], timed_default.Optimizer( regularization_list=[regularizers.Additive(0., 0.)] * 100, return_counters=True ), 10, 100 )
from pyartm_datasets import main_cases import manager if __name__ == '__main__': (train_n_dw_matrix, test_n_dw_matrix, _, num_2_token) = main_cases.get_twitter_sentiment140(train_proportion=0.8, min_docs_occurrences=3) manager.perform_experiment(train_n_dw_matrix, test_n_dw_matrix, 10, num_2_token)
from pyartm import regularizers from pyartm_datasets import main_cases from pyartm.optimizations import timed_default import manager if __name__ == '__main__': manager.perform_experiment( main_cases.get_twitter_sentiment140(min_docs_occurrences=3, train_proportion=0.8)[0], timed_default.Optimizer( regularization_list=[regularizers.Additive(0., 0.)] * 100, return_counters=True), 10, 100)