コード例 #1
0
int main() {
    kmeans("./dataset", "./result");
    Forecast forecast("./result");
    HMM hmm = HMM("./dataset", "./dictionnary.txt", forecast);

    hmm.print();
    {
        cout << "Save" << endl;
        std::ofstream ofs("hmm_save");
        boost::archive::text_oarchive oa(ofs);
        oa << hmm;
    }
    
    HMM hmm2 = HMM();
    {
        cout << "Load" << endl;
        std::ifstream ifs("hmm_save");
        boost::archive::text_iarchive ia(ifs);
        ia >> hmm2;
    }
    hmm2.print();    
    return (EXIT_SUCCESS);
}
コード例 #2
0
int main()
{     
    calculate_no_samples2(); 
    
    //printf("\nThe no. of samples in the given sound data is: %d\n", no_samples);
    /*
    DCshift();
    normalize();
    silence_removal();
    hamming_window_values();
    start = 0;
    calculate_ci();*/
    HMM();
	free(data_set);
	free(initial_codebook);
	free(centroid);
	free(min_distance);
	free(data_set_index);
	delete[]values;
	delete[]data;
	printf("Finished.:)\n");
	getchar();
}