def setUp(self): self.config = { "method": "AROW", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}] }, "parameter": { "regularization_weight": 1.001 } } TestUtil.write_file('config_classifier.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('classifier', port, 'config_classifier.json') try: self.cli = Classifier(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "AROW", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{ "key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin" }], "num_types": {}, "num_rules": [{ "key": "*", "type": "num" }] }, "parameter": { "regularization_weight": 1.001 } } TestUtil.write_file('config_classifier.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('classifier', port, 'config_classifier.json') try: self.cli = Classifier(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "lsh", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{ "key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin" }], "num_types": {}, "num_rules": [{ "key": "*", "type": "num" }] }, "parameter": { "hash_num": 64 } } TestUtil.write_file('config_nearest_neighbor.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('nearest_neighbor', port, 'config_nearest_neighbor.json') try: self.cli = NearestNeighbor(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "lof", "converter" : { "string_filter_types" : {}, "string_filter_rules" : [], "num_filter_types" : {}, "num_filter_rules" : [], "string_types" : {}, "string_rules" : [{"key" : "*", "type" : "space", "sample_weight" : "bin", "global_weight" : "bin"}], "num_types" : {}, "num_rules" : [{"key" : "*","type" : "num"}] }, "parameter": { "nearest_neighbor_num": 10, "reverse_nearest_neighbor_num": 30, "method": "euclid_lsh", "parameter": { "lsh_num": 8, "table_num": 16, "probe_num": 64, "bin_width": 10.0, "seed": 1091, "retain_projection": False } } } TestUtil.write_file('config_anomaly.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('anomaly', port, 'config_anomaly.json') self.cli = anomaly(host, port)
def setUp(self): self.config = { "method": "kmeans", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}], }, "parameter": {"k": 10, "seed": 0}, "compressor_method": "simple", "compressor_parameter": {"bucket_size": 3}, } TestUtil.write_file("config_clustering.json", json.dumps(self.config)) self.srv = TestUtil.fork_process("clustering", port, "config_clustering.json") try: self.cli = Clustering(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "lsh", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}] }, "parameter": { "hash_num": 64 } } TestUtil.write_file('config_nearest_neighbor.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('nearest_neighbor', port, 'config_nearest_neighbor.json') try: self.cli = NearestNeighbor(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method" : "kmeans", "converter" : { "string_filter_types" : {}, "string_filter_rules" : [], "num_filter_types" : {}, "num_filter_rules" : [], "string_types" : {}, "string_rules" : [ { "key" : "*", "type" : "str", "sample_weight" : "bin", "global_weight" : "bin" } ], "num_types" : {}, "num_rules" : [ { "key" : "*", "type" : "num" } ] }, "parameter" : { "k" : 10, "seed": 0 }, "compressor_method" : "simple", "compressor_parameter" : { "bucket_size" : 3, } } TestUtil.write_file('config_clustering.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('clustering', port, 'config_clustering.json') try: self.cli = Clustering(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "PA1", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{ "key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin" }], "num_types": {}, "num_rules": [{ "key": "*", "type": "num" }] }, "parameter": { "sensitivity": 0.1, "regularization_weight": 3.402823e+38 } } TestUtil.write_file('config_regression.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('regression', port, 'config_regression.json') try: self.cli = Regression(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "AROW", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [], "num_types": {}, "num_rules": [] }, "parameter": { "regularization_weight": 1.001 } } TestUtil.write_file('config_for_error.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('classifier', port, 'config_for_error.json') try: address = msgpackrpc.Address(host, port) client = msgpackrpc.Client(address) self.cli = jubatus.common.Client(client, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "PA", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}] }, "parameter": { "sensitivity" : 0.1, "regularization_weight" : 3.402823e+38 } } TestUtil.write_file('config_regression.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('regression', port, 'config_regression.json') try: self.cli = Regression(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "window_size": 10 } TestUtil.write_file('config_stat.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('stat', port, 'config_stat.json') self.cli = stat(host, port)
def setUp(self): self.config = {"window_size": 10} TestUtil.write_file('config_stat.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('stat', port, 'config_stat.json') try: self.cli = Stat(host, port, 'name') except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "window_size": 10 } TestUtil.write_file('config_stat.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('stat', port, 'config_stat.json') try: self.cli = Stat(host, port, 'name') except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "graph_wo_index", "parameter": { "damping_factor": 0.9, "landmark_num": 5 } } TestUtil.write_file('config_graph.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('graph', port, 'config_graph.json') self.cli = graph(host, port)
def setUp(self): self.config = { "method": "graph_wo_index", "parameter": { "damping_factor": 0.9, "landmark_num": 5 } } TestUtil.write_file('config_graph.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('graph', port, 'config_graph.json') try: self.cli = Graph(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "AROW", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}], }, "parameter": {"regularization_weight": 1.001}, } TestUtil.write_file("config_classifier.json", json.dumps(self.config)) self.srv = TestUtil.fork_process("classifier", port, "config_classifier.json") self.cli = classifier(host, port)
def setUp(self): self.config = { "method": "lof", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{ "key": "*", "type": "space", "sample_weight": "bin", "global_weight": "bin" }], "num_types": {}, "num_rules": [{ "key": "*", "type": "num" }] }, "parameter": { "nearest_neighbor_num": 10, "reverse_nearest_neighbor_num": 30, "method": "euclid_lsh", "parameter": { "hash_num": 8, "table_num": 16, "probe_num": 64, "bin_width": 10.0, "seed": 1091, } } } TestUtil.write_file('config_anomaly.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('anomaly', port, 'config_anomaly.json') try: self.cli = Anomaly(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "inverted_index", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}], }, "parameter": {}, } TestUtil.write_file("config_recommender.json", json.dumps(self.config)) self.srv = TestUtil.fork_process("recommender", port, "config_recommender.json") self.cli = recommender(host, port)
def setUp(self): self.config = { "method": "inverted_index", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}] }, "parameter": {} } TestUtil.write_file('config_recommender.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('recommender', port, 'config_recommender.json') try: self.cli = Recommender(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method": "inverted_index", "converter": { "string_filter_types": {}, "string_filter_rules": [], "num_filter_types": {}, "num_filter_rules": [], "string_types": {}, "string_rules": [{"key": "*", "type": "str", "sample_weight": "bin", "global_weight": "bin"}], "num_types": {}, "num_rules": [{"key": "*", "type": "num"}] }, "parameter": {} } TestUtil.write_file('config_recommender.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('recommender', port, 'config_recommender.json') try: self.cli = Recommender(host, port, "name") except: TestUtil.kill_process(self.srv) raise
def setUp(self): self.config = { "method" : "kmeans", "converter" : { "string_filter_types" : {}, "string_filter_rules" : [], "num_filter_types" : {}, "num_filter_rules" : [], "string_types" : {}, "string_rules" : [ { "key" : "*", "type" : "str", "sample_weight" : "bin", "global_weight" : "bin" } ], "num_types" : {}, "num_rules" : [ { "key" : "*", "type" : "num" } ] }, "parameter" : { "k" : 10, "compressor_method" : "simple", "bucket_size" : 3, "compressed_bucket_size" : 2, "bicriteria_base_size" : 1, "bucket_length" : 2, "forgetting_factor" : 0, "forgetting_threshold" : 0.5, "seed": 0, } } TestUtil.write_file('config_clustering.json', json.dumps(self.config)) self.srv = TestUtil.fork_process('clustering', port, 'config_clustering.json') try: self.cli = Clustering(host, port, "name") except: TestUtil.kill_process(self.srv) raise