Commit ebb1314d authored by DAUXAIS Yann's avatar DAUXAIS Yann

switch off emerging multiset occcurrence computation

parent cf58e9ec
......@@ -108,22 +108,22 @@ CDA::run (
std::vector<EMSet> bset;
if (print) {
std::cout << "Examples number : " << trace1.size() + trace2.size() << std::endl;
std::cout << "Positives examples : " << trace1.size() << std::endl;
std::cout << "Negatives examples : " << trace2.size() << std::endl;
std::cout << "Example number : " << trace1.size() + trace2.size() << std::endl;
std::cout << "Positive examples : " << trace1.size() << std::endl;
std::cout << "Negative examples : " << trace2.size() << std::endl;
std::cout << "Ratio : " << ((double) trace1.size() / (double) trace2.size()) << std::endl;
}
{
if (print) std::cout << "Multisets mining" << std::endl;
std::vector<EMSet> set1 = trace1.extractFrequentMSet(fmin, mincs, maxcs, closed);
if (print) std::cout << "Multisets number : " << set1.size() << std::endl;
if (print) std::cout << "Multisets number: " << set1.size() << std::endl;
std::vector<MSetOcc> disc_msets;
emergeMSetOcc(emergeMSet(set1,trace2,&bset,gmin,mincs,maxcs), trace1, nb_e, disc_msets);
}
if (print) std::cout << "Non emergeant multisets number : " << bset.size() << std::endl << std::endl;
if (print) std::cout << "Non emergeant multisets number: " << bset.size() << std::endl << std::endl;
std::vector<EMSet>::iterator it;
......@@ -180,7 +180,9 @@ CDA::emergeMSetOcc (
std::vector<MSetOcc>& res
) {
for (unsigned int i = 0; i < set.size(); i++) {
MSetOcc pat = trace.compileOccurrences(set[i].getSub(), set[i].getMSet(), set[i].getShortMSet(), nb_se);
// We do not compute emerging multiset occurrences for memory space and computational time
// MSetOcc pat = trace.compileOccurrences(set[i].getSub(), set[i].getMSet(), set[i].getShortMSet(), nb_se);
MSetOcc pat = MSetOcc(set[i].getShortMSet(), std::vector<std::vector<std::pair<int,unsigned int>>>());
pat.classe = (unsigned int) trace.classe;
pat.frequency = set[i].getFreq();
pat.ofrequency = set[i].getOFreq();
......
......@@ -17,6 +17,7 @@ MSetOcc::txt (const std::vector<std::string>& events, bool empty) const {
_occurrences[i][_occurrences[i].size() - 1].first);
tcs.push_back(TCIterator(std::shared_ptr<TC>(tc), true));
}
if (empty) tcs = std::vector<TCIterator>(disc->size());
os << Chronicle(_elements, tcs, frequency, ofrequency).txt(events,disc);
}
......
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