A learning-based ensemble algorithm with optimal selection for outlier detection