From f52015170f4fa0b7003fde7a47521c3edd451350 Mon Sep 17 00:00:00 2001 From: Gene Date: Thu, 6 Apr 2023 16:36:48 +0800 Subject: [PATCH] [MNT] Modify examples --- examples/example_market_db/example_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/example_market_db/example_db.py b/examples/example_market_db/example_db.py index 7f0f753..8c8b22d 100644 --- a/examples/example_market_db/example_db.py +++ b/examples/example_market_db/example_db.py @@ -19,7 +19,7 @@ def prepare_learnware(learnware_num = 10): data_y = np.random.randn(5000) data_y = np.where(data_y > 0, 1, 0) - clf = svm.SVC() + clf = svm.SVC(kernel="linear") clf.fit(data_X, data_y) joblib.dump(clf, "./svm/svm_%d.pkl"%(i)) @@ -29,7 +29,7 @@ def prepare_learnware(learnware_num = 10): def test_market(): easy_market = EasyMarket() print('Total Item:', len(easy_market)) - root_path = '/home/chenzx/code/learnware_project/learnware-market/examples/example_market_db/svm' + root_path = './svm' os.makedirs(root_path, exist_ok=True) test_learnware_num = 10 prepare_learnware(test_learnware_num)