All pastes #805764 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-12-04 17:19 UTC
rendered paste body
double bayes(string archivo)  {    double prob_si = 1;    double prob_no = 1;    string tipo = "prueba";    set<string> prueba;    prueba = cambia_html(archivo,tipo);    set<string>::iterator it = prueba.begin();    map<string,float>::iterator it1;    while(it != prueba.end())      {        if(probabilidades_cl.find(*it) != probabilidades_cl.end())          {            it1 = probabilidades_cl.find(*it);            prob_si = prob_si *  it1->second;            cout<<prob_si<<endl;          }        else          {          prob_si = prob_si * 0.00001;          }        it++;      }    /* it = prueba.begin();    while(it != prueba.end())      {        if(probabilidades_no_cl.find(*it) != probabilidades_no_cl.end())          {            it1 = probabilidades_no_cl.find(*it);            prob_no *= it1->second;          }        else          prob_no *= 0.00001;        it++;        }*/    return prob_si;  }