Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
trainedLr = lrPipeline.train(input=XTrain, targetOutput=yTrain)

This produces a new type `trainedLr` which contains all of the parameters and model definitions of the trained MLPipeline. We can now inspect this model's parameters and evaluate it on new data.

Code Block
param_map = trainedLr.params()
param_map['preprocess__standardScaler__mean_']

Might return something like this:

Code Block
c3.Arry<double>([5.809166666666665,
 3.0616666666666674,
 3.726666666666667,
 1.1833333333333333])

And to evaluate on new data:

Code Block
prediction = trainedLr.process(input=XTest)

We can also score this MLPipeline based on the metric we chose with the 'score' function:

Code Block
score = trainedLr.score(input=XTest, targetOutput=yTest)

Storing the trained C3 Pipeline

...