def tree_quality_comparison(n_samples=200000, n_features=10):
    trainX, trainY = generate_sample(n_samples=n_samples, n_features=n_features)
    testX, testY = generate_sample(n_samples=n_samples, n_features=n_features)

    # Multiplying by random matrix
    multiplier = numpy.random.normal(size=[n_features, n_features])
    trainX = numpy.dot(trainX.values, multiplier)
    testX = numpy.dot(testX.values, multiplier)
    regressors = OrderedDict()
    regressors['old'] = DecisionTreeRegressor(max_depth=10, min_samples_split=50)
    regressors['new'] = FastTreeRegressor(max_depth=10, min_samples_split=50, criterion='pvalue')
    w = numpy.ones(n_samples)

    for name, regressor in regressors.items():
        regressor.fit(trainX, trainY, sample_weight=w)
        print(name, roc_auc_score(testY, regressor.predict(testX)))
Function is NOT a test, bit helpful to compare performance of standard DT and new one.
dataset/ETHPy150Open anaderi/lhcb_trigger_ml/tests/test_fasttree.py/tree_quality_comparison