Skip to content

Instantly share code, notes, and snippets.

@jamesward
Last active August 20, 2018 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesward/cc04a77bc0b35e85a7839c346a15ad34 to your computer and use it in GitHub Desktop.
Save jamesward/cc04a77bc0b35e85a7839c346a15ad34 to your computer and use it in GitHub Desktop.
// Read the Deal data
val dealData = DataReaders.Simple.csvCase[Deal](path = pathToData).readDataset().toDF()
// Extract response and predictor Features
val (isClosed, predictors) = FeatureBuilder.fromDataFrame[RealNN](dealData, response = "isClosed")
// Automated feature engineering
val featureVector = predictors.transmogrify()
// Automated feature validation
val cleanFeatures = isClosed.sanityCheck(featureVector, removeBadFeatures = true)
// Automated model selection
val (pred, raw, prob) = BinaryClassificationModelSelector().setInput(isClosed, cleanFeatures).getOutput()
// Setting up the workflow and training the model
val model = new OpWorkflow().setInputDataset(dealData).setResultFeatures(pred).train()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment