Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct some syntax/compilation errors in Titanic Binary Classification Docs Example #202

Merged
merged 3 commits into from
Jan 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/examples/Titanic-Binary-Classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ val name = FeatureBuilder.Text[Passenger].extract(_.name.toText).asPredictor

val sex = FeatureBuilder.PickList[Passenger].extract(_.sex.map(_.toString).toPickList).asPredictor

val age = FeatureBuilder.RealNN[Passenger].extract(_.age.toRealNN).asPredictor
val age = FeatureBuilder.Real[Passenger].extract(_.age.toReal).asPredictor

val sibSp = FeatureBuilder.Integral[Passenger].extract(_.sibSp.toIntegral).asPredictor

Expand Down Expand Up @@ -101,9 +101,9 @@ See [“Creating Shortcuts for Transformers and Estimators”](../developer-guid
We now define a Feature of type Vector, that is a vector representation of all the features we would like to use as predictors in our workflow.

```scala
val passengerFeatures: FeatureLike[Vector] = Seq(
val passengerFeatures: FeatureLike[OPVector] = Seq(
pClass, name, sex, age, sibSp, parCh, ticket,
cabin, embarked, familySize, estimatedCostOfTickets, normedAge
cabin, embarked, familySize, estimatedCostOfTickets, normedAge,
pivotedSex, ageGroup
).transmogrify()
```
Expand Down Expand Up @@ -146,6 +146,8 @@ val workflow =
When we now call 'train' on this workflow, it automatically computes and executes the entire DAG of Stages needed to compute the features ```survived, prediction, rawPrediction```, and ```prob```, fitting all the estimators on the training data in the process. Calling ```score``` on the fitted workflow then transforms the underlying training data to produce a DataFrame with the all the features manifested. The ```score``` method can optionally be passed an evaluator that produces metrics.

```scala
import com.salesforce.op.evaluators.Evaluators

// Fit the workflow to the data
val fittedWorkflow = workflow.train()

Expand Down