loss+=(prop*(1.0-prop)) returnloss # 選取任意的n個(gè)特征,在這n個(gè)特征中,選取分割時(shí)的最優(yōu)特征 defget_best_spilt(dataSet, n_features): features=[] class_values=list(set(row[-1]forrowindataSet)) b_index, b_value, b_loss, b_left, b_right...
www.dbjr.com.cn/article/1311...htm 2025-6-8