Ejemplo n.º 1
0
 def test_lightgbm_regressor(self):
     model = LGBMRegressor(n_estimators=3, min_child_samples=1)
     dump_single_regression(model,
                            target_opset={
                                '': TARGET_OPSET,
                                'ai.onnx.ml': TARGET_OPSET_ML
                            })
 def test_decision_tree_regressor(self):
     model = DecisionTreeRegressor()
     dump_single_regression(
         model,
         allow_failure=
         "StrictVersion(onnx.__version__) < StrictVersion('1.2')")
     dump_multiple_regression(
         model,
         allow_failure=
         "StrictVersion(onnx.__version__) < StrictVersion('1.2')")
 def test_extra_trees_regressor(self):
     model = ExtraTreesRegressor(n_estimators=3)
     dump_single_regression(
         model,
         allow_failure=
         "StrictVersion(onnxruntime.__version__) <= StrictVersion('0.2.1')")
     dump_multiple_regression(
         model,
         allow_failure=
         "StrictVersion(onnxruntime.__version__) <= StrictVersion('0.2.1')")
 def test_random_forest_regressor(self):
     model = RandomForestRegressor(n_estimators=3)
     dump_single_regression(
         model,
         allow_failure=
         "StrictVersion(onnxruntime.__version__) <= StrictVersion('0.2.1')")
     dump_multiple_regression(
         model,
         allow_failure=
         "StrictVersion(onnxruntime.__version__) <= StrictVersion('0.2.1')")
Ejemplo n.º 5
0
 def test_extra_tree_regressor(self):
     model = ExtraTreeRegressor()
     dump_single_regression(
         model,
         allow_failure="StrictVersion(onnx.__version__)"
                       " < StrictVersion('1.2')",
     )
     dump_multiple_regression(
         model,
         allow_failure="StrictVersion(onnx.__version__)"
                       " < StrictVersion('1.2')",
     )
Ejemplo n.º 6
0
    def test_xgb_regressor(self):
        iris = load_iris()
        X = iris.data[:, :2]
        y = iris.target

        xgb = XGBRegressor()
        xgb.fit(X, y)
        conv_model = convert_sklearn(
            xgb, initial_types=[
                ('input', FloatTensorType(shape=[None, X.shape[1]]))])
        self.assertTrue(conv_model is not None)
        dump_single_regression(xgb, suffix="-Dec4")
Ejemplo n.º 7
0
 def test_extra_trees_regressor(self):
     model = ExtraTreesRegressor(n_estimators=3)
     dump_single_regression(model)
     dump_multiple_regression(model)
Ejemplo n.º 8
0
 def test_random_forest_regressor(self):
     model = RandomForestRegressor(n_estimators=3)
     dump_single_regression(model)
     dump_multiple_regression(model)
Ejemplo n.º 9
0
 def test_lightgbm_regressor2(self):
     model = LGBMRegressor(n_estimators=2, max_depth=1, min_child_samples=1)
     dump_single_regression(model, suffix="2")
Ejemplo n.º 10
0
 def test_lightgbm_regressor(self):
     model = LGBMRegressor(n_estimators=3, min_child_samples=1)
     dump_single_regression(model)
Ejemplo n.º 11
0
 def test_extra_tree_regressor(self):
     model = ExtraTreeRegressor()
     dump_single_regression(model)
     dump_multiple_regression(model)
Ejemplo n.º 12
0
 def test_decision_tree_regressor(self):
     model = DecisionTreeRegressor()
     dump_single_regression(model)
     dump_multiple_regression(model)
Ejemplo n.º 13
0
 def test_gradient_boosting_regressor(self):
     model = GradientBoostingRegressor(n_estimators=3)
     dump_single_regression(model)