add sklearn and maxMargin