4.3. copro.machine_learning.split_scale_train_test_split

copro.machine_learning.split_scale_train_test_split(X, Y, config, scaler)[source]

Splits and transforms the X-array (or sample data) and Y-array (or target data) in test-data and training-data. The fraction of data used to split the data is specified in the configuration file. Additionally, the unique identifier and geometry of each data point in both test-data and training-data is retrieved in separate arrays.

Parameters
  • X (array) – array containing the variable values plus unique identifer and geometry information.

  • Y (array) – array containing merely the binary conflict classifier data.

  • config (ConfigParser-object) – object containing the parsed configuration-settings of the model.

  • scaler (scaler) – the specified scaling method instance.

Returns

arrays containing training-set and test-set for X-data and Y-data as well as IDs and geometry.

Return type

arrays