I'm new to the machine learning and working on a supervised classification problem. I used discretization process to transform continuous variables into discrete variables. So I followed this article to implement it. But when repeat same process with same values it generate different boundary values. Can anyone explain about it?
X_train, X_test, y_train, y_test = train_test_split(train[['tripid', 'Hour', 'is_FairCorrect']],train.is_FairCorrect , test_size = 0.3) tree_model = DecisionTreeClassifier(max_depth=2) tree_model.fit(X_train.Hour.to_frame(), X_train.is_FairCorrect) X_train['Age_tree']=tree_model.predict_proba(X_train.Hour.to_frame())[:,1] pd.concat([X_train.groupby(['Age_tree'])['Hour'].min(), X_train.groupby(['Age_tree'])['Hour'].max()], axis=1)