docstr: Test training different models
docstr_tok: ["Test","training","different","models"]
code: def test_train_regressor(self, space, fspace):
      """Test training different models"""
      array = flatten_numpy(to_numpy(data, space), fspace)
      model = train_regressor("AdaBoostRegressor", array)
      assert isinstance(model, AdaBoostRegressor)
      model = train_regressor("BaggingRegressor", array)
      assert isinstance(model, BaggingRegressor)
      model = train_regressor("ExtraTreesRegressor", array)
      assert isinstance(model, ExtraTreesRegressor)
      model = train_regressor("GradientBoostingRegressor", array)
      assert isinstance(model, GradientBoostingRegressor)
      model = train_regressor("RandomForestRegressor", array)
      assert isinstance(model, RandomForestRegressor)
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.ensemble import AdaBoostRegressor, BaggingRegressor, ExtraTreesRegressor, GradientBoostingRegressor, RandomForestRegressor
  from orion.analysis.base import average, flatten_numpy, flatten_params, ranking, to_numpy, train_regressor
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.transformer import build_required_space
label_desc: Use image node_id 1 for calling the TestTrainRegressor obj's underlying member method code with example usage: obj.test_train_regressor(space, fspace) without return types