Suppose, I create a decision tree classifier through sklearn library.Now,I tried to see what are the split values inside the tree with this function: export_text()
|--- feature1<= 1.50
| |--- feature2<= 0.88
| | |--- feature3<= 0.05
| | | |--- feat4<= 0.58
| | | | |--- class: 1.0
| | | |--- feat4> 0.58
| | | | |--- class: 1.0
| | |--- feat3> 0.05
| | | |--- class: 1.0
| |--- feat2> 0.88
| | |--- class: 0.0
|--- feat1> 1.50
| |--- feat5<= 0.22
| | |--- feat6<= 0.90
| | | |--- feat7<= 0.1
| | | | | |--- other_chars > 0.14
| | | | | | |--- class: 0.0
| | |--- feat3> 0.90
| | | |--- feat5<= 0.13
| | | | |--- feat6<= 0.25
| | | | | |--- class: 1.0
| | | | |--- feat6> 0.25
| | | | | |--- class: 0.0
Now, is it possible to change these feature's split values iterating through the tree manually? like, at first split, we have feature1 as split feature and its value is 1.5
What my requirement is, once we reach that feature1 split point, I want to change the value from 1.5 to say, 1.2 and then save the tree into pickle file and use that for future predictions.