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

Github Wiki migration #79

Merged
merged 24 commits into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
added language types
  • Loading branch information
tovbinm committed Aug 22, 2018
commit a87c6babe1edacf214d9a690a5b019727394a55b
6 changes: 3 additions & 3 deletions docs/abstractions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ Once all the Features and Feature transformations have been defined, actual data

In the example below, we would like to materialize ```bucketizedAge``` and ```nameTokens```. So we set these two Features as the result Features for a new Workflow:

```
```scala
val workflow = new OPWorkflow().setResultFeatures(bucketizedAge, nameTokens).setReader(PassengerReader)
```

The PassengerReader is a DataReader that essentially specifies a ```read``` method that can be used for loading the Passenger data. When we train this workflow, it reads the Passenger data and fits the bucketization estimator by determining the optimal buckets for ```age```:

```
```scala
val workflowModel = workflow.train()
```

The workflowModel now has a prepped DAG of Transformers. By calling the ```score``` method on the workflowModel, we can transform any data of type Passenger to a DataFrame with two columns for ```bucketizedAge``` and ```nameTokens```

```
```scala
val dataFrame = workflowModel.setReader(OtherPassengerReader).score()
```

Expand Down
9 changes: 6 additions & 3 deletions docs/examples/Bootstrap-Your-First-Project.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Build the TransmogrifAI CLI by running:
alias transmogrifai="java -cp `pwd`/cli/build/libs/\* com.salesforce.op.cli.CLI"
```
Finally generate your Titanic model project (follow the instructions on screen):
```
```bash
transmogrifai gen --input `pwd`/test-data/PassengerDataAll.csv \
--id passengerId --response survived \
--schema `pwd`/test-data/PassengerDataAll.avsc Titanic
Expand All @@ -29,8 +29,11 @@ If you run this command more than once, two important command line arguments wil
- `--answers <answers_file>` will provide answers to the questions that the generator asks.

e.g.
```
transmogrifai gen --input `pwd`/test-data/PassengerDataAll.csv --id passengerId --response survived --schema `pwd`/test-data/PassengerDataAll.avsc --answers cli/passengers.answers Titanic --overwrite
```bash
transmogrifai gen --input `pwd`/test-data/PassengerDataAll.csv \
--id passengerId --response survived \
--schema `pwd`/test-data/PassengerDataAll.avsc \
--answers cli/passengers.answers Titanic --overwrite
```
will do the generation without asking you anything.

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Iris-MultiClass-Classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def runner(opParams: OpParams): OpWorkflowRunner =
)
```
You can run the code using the following commands for train, score and evaluate:
```
```bash
cd helloworld
./gradlew compileTestScala installDist
```
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/Titanic-Binary-Classification.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Here we describe a very simple TransmogrifAI workflow for predicting survivors in the often-cited Titanic dataset. The code for building and applying the Titanic model can be found here: [Titanic Code](https://github.com/salesforce/TransmogrifAI/blob/master/helloworld/src/main/scala/com/salesforce/hw/OpTitanicSimple.scala), and the data can be found here: [Titanic Data](https://github.com/salesforce/op/blob/master/helloworld/src/main/resources/TitanicDataset/TitanicPassengersTrainData.csv).

You can run this code as follows:
```
```bash
cd helloworld
./gradlew compileTestScala installDist
./gradlew -q sparkSubmit -Dmain=com.salesforce.hw.OpTitanicSimple -Dargs="\
Expand Down Expand Up @@ -46,7 +46,6 @@ Basic FeatureBuilders will be created for you if you use the TransmogrifAI CLI t

When defining raw features, specify the extract logic to be applied to the raw data, and also annotate the features as either predictor or response variables via the FeatureBuilders:
```scala

// import necessary packages
import com.salesforce.op.features.FeatureBuilder
import com.salesforce.op.features.types._
Expand Down