Skip to content

Commit c88fe5b

Browse files
committed
Removed XGBoost from examples
1 parent ededed6 commit c88fe5b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/sklearn_adaboost_dtree_stack_xgboost.py renamed to examples/sklearn_adaboost_dtree_stack_gboost.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from graph_ensemble import Graph
22
from graph_ensemble.nodes import Concatenate, Input, Reshape
33
from graph_ensemble.wrappers import SKLearnNode
4-
from xgboost import XGBRegressor
4+
from sklearn.ensemble import GradientBoostingRegressor
55
from sklearn.ensemble import AdaBoostRegressor
66
from sklearn.tree import DecisionTreeRegressor
77
from sklearn import datasets
@@ -21,10 +21,10 @@
2121
dtree_reshape = Reshape((-1, 1))
2222
dtree_reshape.set_input(dtree)
2323
concat = Concatenate([ab_reshape, dtree_reshape], axis=-1)
24-
xgbreg = SKLearnNode(XGBRegressor())
25-
xgbreg.set_input(concat)
24+
gboost = SKLearnNode(GradientBoostingRegressor())
25+
gboost.set_input(concat)
2626

27-
graph = Graph(inp, xgbreg)
27+
graph = Graph(inp, gboost)
2828

2929
graph.fit(X, y)
3030
print graph.predict(X)

examples/sklearn_two_inputs_adaboost_dtree_stack_xgboost.py renamed to examples/sklearn_two_inputs_adaboost_dtree_stack_gboost.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from graph_ensemble import Graph
22
from graph_ensemble.nodes import Concatenate, Input, Reshape
33
from graph_ensemble.wrappers import SKLearnNode
4-
from xgboost import XGBRegressor
4+
from sklearn.ensemble import GradientBoostingRegressor
55
from sklearn.ensemble import AdaBoostRegressor
66
from sklearn.tree import DecisionTreeRegressor
77
from sklearn import datasets
@@ -23,10 +23,10 @@
2323
dtree_reshape = Reshape((-1, 1))
2424
dtree_reshape.set_input(dtree)
2525
concat = Concatenate([ab_reshape, dtree_reshape], axis=-1)
26-
xgbreg = SKLearnNode(XGBRegressor())
27-
xgbreg.set_input(concat)
26+
gbreg = SKLearnNode(GradientBoostingRegressor())
27+
gbreg.set_input(concat)
2828

29-
graph = Graph([inp1, inp2], xgbreg)
29+
graph = Graph([inp1, inp2], gbreg)
3030

3131
graph.fit((X1, X2), y)
3232
print graph.predict((X1, X2))

0 commit comments

Comments
 (0)