Commit 1e718022 authored by DAUXAIS Yann's avatar DAUXAIS Yann

resolve bug with minimal window constraint for frequent chronicle mining

parent ebb1314d
......@@ -46,7 +46,7 @@ Base::getWindow (
for (int x = 0; x < e; x++) {
time = match[x];
if (cwm > -1) {
if (cwm > 0) {
if (time - cwm > start)
start = time - cwm;
if (time + cwm < end)
......@@ -92,7 +92,7 @@ Base::getWindow (
Event el_x = match[x];
time = el_x.getTime();
if (cwm > -1) {
if (cwm > 0) {
if (time - cwm > start)
start = time - cwm;
if (time + cwm < end)
......@@ -122,4 +122,4 @@ Base::getWindow (
}
std::sort(stop.begin(),stop.end());
}
\ No newline at end of file
}
......@@ -706,7 +706,7 @@ VerticalEventBase<Event>::getIntOccurences(
for (unsigned int k = 0; k < _base[i][t].size(); k++) {
a = getOTime(_base[i][t][k]) - getTime(_base[i][t][k]);
if (_cwm == -1 || (abs(a) <= _cwm))
if (_cwm == 0 || (abs(a) <= _cwm))
Ak.push_back(std::pair<int,int>(a,t));
}
}
......
......@@ -266,8 +266,9 @@ CDA::run (
for (; j < nb_e; j++) {
if (base_pct[indice(i,j,nb_e)] != nullptr) {
if (!itv_only || i < nb_se || j != i+1 || (i-nb_se)%2 == 1)
if (!itv_only || i < nb_se || j != i+1 || (i-nb_se)%2 == 1)
extends.push_back(Chronicle({(int) i, (int) j},{TCIterator (base_pct[indice(i,j,nb_e)],true)}));
}
}
}
......@@ -284,7 +285,6 @@ CDA::run (
Chronicle c (extends.back());
extends.pop_back();
add = true;
if (trace.frequent(c, fmin, frequents, add, (close || freq), cwm)) {
if (maxcs < 2 || c.size() <= maxcs) {
if (c.size() >= mincs) {
......
......@@ -402,7 +402,8 @@ int main(const int argc, char* argv[])
}
if (options.verbose) std::cout << "Chronicles mining" << std::endl;
if (options.disc) algo.inv_events = options.inv_events;
if (options.disc)
algo.inv_events = options.inv_events;
algo.txt = options.txt;
std::vector<Chronicle> res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment