effspm 0.1.11__tar.gz → 0.1.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {effspm-0.1.11/effspm.egg-info → effspm-0.1.12}/PKG-INFO +1 -1
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/load_inst.cpp +6 -4
- {effspm-0.1.11 → effspm-0.1.12/effspm.egg-info}/PKG-INFO +1 -1
- {effspm-0.1.11 → effspm-0.1.12}/pyproject.toml +1 -1
- {effspm-0.1.11 → effspm-0.1.12}/setup.py +1 -1
- effspm-0.1.12/tests/test.py +22 -0
- effspm-0.1.11/tests/test.py +0 -3
- {effspm-0.1.11 → effspm-0.1.12}/LICENSE +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/MANIFEST.in +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/README.md +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/__init__.py +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/_core.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/_effspm.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/build_mdd.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/build_mdd.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/freq_miner.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/freq_miner.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/load_inst.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/main.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/utility.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/btminer/src/utility.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/freq_miner.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/freq_miner.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/load_inst.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/load_inst.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/main.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/utility.cpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm/utility.hpp +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm.egg-info/SOURCES.txt +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm.egg-info/dependency_links.txt +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm.egg-info/not-zip-safe +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm.egg-info/requires.txt +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/effspm.egg-info/top_level.txt +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/setup.cfg +0 -0
- {effspm-0.1.11 → effspm-0.1.12}/tests/test_basic.py +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
#include <iostream>
|
|
2
3
|
#include <sstream>
|
|
3
4
|
#include <fstream>
|
|
@@ -15,14 +16,13 @@ namespace btminer {
|
|
|
15
16
|
|
|
16
17
|
using namespace std;
|
|
17
18
|
|
|
18
|
-
extern int num_nodes, cur_node;
|
|
19
|
+
extern int num_nodes, cur_node;
|
|
19
20
|
|
|
20
21
|
map<string, int> item_map;
|
|
21
22
|
map<int, string> item_map_rev;
|
|
22
23
|
vector<int> freq;
|
|
23
24
|
vector<int> item_dic;
|
|
24
25
|
|
|
25
|
-
|
|
26
26
|
void Load_items_pre(string& inst_name);
|
|
27
27
|
bool Load_items(string& inst_name);
|
|
28
28
|
bool Preprocess(string& inst, double thresh);
|
|
@@ -124,11 +124,11 @@ void Load_items_pre(string& inst_name) {
|
|
|
124
124
|
ditem = stoi(itm);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
if (freq[abs(ditem) - 1] < theta) {
|
|
127
|
+
if (pre_pro && freq.size() > abs(ditem) - 1 && freq[abs(ditem) - 1] < theta) {
|
|
128
128
|
if (!sgn)
|
|
129
129
|
sgn = ditem < 0;
|
|
130
130
|
continue;
|
|
131
|
-
} else {
|
|
131
|
+
} else if (pre_pro) {
|
|
132
132
|
ditem = (ditem > 0) ? item_dic[ditem - 1] : -item_dic[-ditem - 1];
|
|
133
133
|
}
|
|
134
134
|
|
|
@@ -144,6 +144,7 @@ void Load_items_pre(string& inst_name) {
|
|
|
144
144
|
++N;
|
|
145
145
|
if (temp_vec.size() > M) M = temp_vec.size();
|
|
146
146
|
|
|
147
|
+
E += temp_vec.size(); // <-- make sure E gets incremented
|
|
147
148
|
Build_MDD(temp_vec);
|
|
148
149
|
}
|
|
149
150
|
}
|
|
@@ -186,6 +187,7 @@ bool Load_items(string& inst_name) {
|
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
if (temp_vec.size() > M) M = temp_vec.size();
|
|
190
|
+
E += temp_vec.size(); // <-- make sure E gets incremented
|
|
189
191
|
Build_MDD(temp_vec);
|
|
190
192
|
}
|
|
191
193
|
return true;
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "effspm"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.12"
|
|
8
8
|
description = "Prefix‑Projection and other sequential pattern mining algorithms"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "yeshu999", email = "vootlayeswanth20@gmail.com" }
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from effspm import BTMiner
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
# === Parameters ===
|
|
5
|
+
data_path = "/Users/yeswanthvootla/Desktop/final_kosarak_s.txt"
|
|
6
|
+
min_support = 0.01 # float or int
|
|
7
|
+
time_limit = 36000 # seconds
|
|
8
|
+
preproc = True # Enable preprocessing
|
|
9
|
+
use_dic = False # Disable dictionary mapping
|
|
10
|
+
verbose = True # Enable verbose logging
|
|
11
|
+
out_file = "" # Keep empty unless you want file output
|
|
12
|
+
|
|
13
|
+
# === Run BTMiner ===
|
|
14
|
+
start_time = time.time()
|
|
15
|
+
result = BTMiner(data_path, min_support, time_limit, preproc, use_dic, verbose, out_file)
|
|
16
|
+
end_time = time.time()
|
|
17
|
+
|
|
18
|
+
# === Process Output ===
|
|
19
|
+
patterns = result["patterns"]
|
|
20
|
+
print(f"[BTMiner] Found {len(patterns)} patterns")
|
|
21
|
+
print("Patterns:", patterns)
|
|
22
|
+
print(f"Time taken: {end_time - start_time:.4f} seconds")
|
effspm-0.1.11/tests/test.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|