Main functions to data mining