Skip to content

Commit 890ea29

Browse files
committed
Finalzes Wit integration, code generation, and Otto interaction
1 parent a2a5459 commit 890ea29

File tree

102 files changed

+22011
-101736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+22011
-101736
lines changed

.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "build",
7+
"problemMatcher": [
8+
"$tsc"
9+
],
10+
"group": "build",
11+
"label": "npm: build",
12+
"detail": "react-scripts build"
13+
}
14+
]
15+
}

README.md

Lines changed: 108 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,140 @@
1-
run `npm install` on fresh clone
1+
# Otto: Your friendly machine learning assistant.
2+
<img src="logo.png" width="90%">
23

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4+
## Build machine learning pipelines through natural language conversation
5+
Otto is an intelligent chat application, designed to help aspiring machine learning engineers _go from idea to implementation with zero domain knowledge_. Our website features easy model selection, insightful visualizations, and an intuitive natural language experience guiding you every step of the way. A collection of four Wit backend apps service Otto's conversational abilities and machine learning tools.
46

5-
## Available Scripts
7+
***
68

7-
In the project directory, you can run:
9+
## Highlights
810

9-
### `npm start`
11+
- **Beginner-friendly design.** Otto is made for novices, as it assumes no prior knowledge of machine learning. Users simply describe their end goals to obtain intelligent recommendations, or can choose from sample datasets to harness our models in an instant.
1012

11-
Runs the app in the development mode.<br />
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13+
- **Powerful machine learning tools.** A range of machine learning capabilities are supported, including models for regression, classification and natural language processing, as well as preprocessors tailored to your problem. Play with neural networks, explore data visualizations, and generate ready-made Python code right in your browser!
1314

14-
The page will reload if you make edits.<br />
15-
You will also see any lint errors in the console.
15+
- **Educational experience.** Users are walked through each stage of the process, with Otto explaining terminology when needed. Annotated code blocks provide eager learners a high-level understanding of their end-to-end pipeline.
1616

17-
### `npm test`
17+
***
1818

19-
Launches the test runner in the interactive watch mode.<br />
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19+
## Quick Start
2120

22-
### `npm run build`
21+
To demo some of Otto's main features, try out the following:
2322

24-
Builds the app for production to the `build` folder.<br />
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
23+
- **Say: _I want to label flower species by petal length_** to watch Otto prefill your pipeline and render a nearest neighbors classification on the popular Iris dataset.
2624

27-
The build is minified and the filenames include the hashes.<br />
28-
Your app is ready to be deployed!
25+
- **Select: _Regression > Sample Dataset_** to preview sample datasets for regression, and discover the strongest predictors using different best fit lines
2926

30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
27+
- **Say: _Detect fraudulent credit card activity_** and select the Custom Dataset option to experience Otto's model recommendation system and interactive neural network designer.
3128

32-
### `npm run eject`
29+
- **Say: _I'd like to interpret the mood of a review_** to query Wit-powered natural language models for live results.
3330

34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
31+
and feel free to get creative! Come up with your own ML goals and see where Otto takes you.
3532

36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
33+
## Stages
3734

38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
35+
Below is a step-by-step breakdown intended for the technical reader.
3936

40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
37+
### Task
4138

42-
## Learn More
39+
One of the biggest obstacles faced by those just getting started with ML is the abundance of jargon, from “loss functions” to “contour boundaries“ — beginners can't be expected to decide what model to use based on cryptic terminology, let alone develop one from scratch! Otto narrows down your options by inferring the high-level task at hand from a simple objective statement.
4340

44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
41+
![taskInference](img/taskInference.gif)
4542

46-
To learn React, check out the [React documentation](https://reactjs.org/).
43+
Task inference is powered by a Wit application (**Otto-Task**) trained on 300 such statements (e.g. “I want to detect loan applications as fraudulent”, “help me forecast stock prices”, or “let's summarize an article into a paragraph”) derived from real-world machine learning research. **Otto-Task** attempts to categorize the _task_ intent as regression, classification, or natural language processing, and additionally extracts a _subject_ entity embodying a streamlined form of the objective in order to filter out extraneous words.
4744

48-
### Code Splitting
45+
The subject is parsed for keyword matches (“tweets”, “housing”, etc) against our database of sample datasets. If a relevant dataset is found, Otto pulls the optimal task, model, and preprocessors for the dataset and pre-selects them for the user throughout the pipeline-building process. Otherwise, Otto issues a task recommendation based on the recognized intent. And if no intent was identified, the user is provided with some tips to help them pick the best task themselves.
4946

50-
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
47+
### Dataset
5148

52-
### Analyzing the Bundle Size
49+
Users are recommended a specific sample dataset matching their subject, or otherwise offered to preview and choose one themselves. Sample data allows beginners to prototype models quickly and easily, without the complexity of finding a dataset and figuring out the relevant features among dozens. Users may also opt to with their own data, which they can include later on in the generated code.
5350

54-
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
51+
![samplePreview](img/samplePreview.gif)
5552

56-
### Making a Progressive Web App
53+
### Model
5754

58-
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
55+
If the user opted for custom data, Otto leverages Wit to perform the key step of selecting a classifier or regressor. A Wit client (**Otto-Model**) parses a brief user description of their data for key phrases indicating the desirability of a particular model. **Otto-Model** includes around 15 phrases and synonyms per model and performs fuzzy string matching, making it an effective and scalable technique for model recommendation.
5956

60-
### Advanced Configuration
57+
A characterization of the classification dataset as “simple” or having “just a few columns”, would make the K-Nearest Neighbors algorithm a good choice, while a description of the regression data as “crime rates” or “annual consumer rankings” would suggest a Poisson or ordinal model, respectively. If no phrase is flagged, Otto will default to the most general model available: a Neural Network for classification, or a linear fit for regression.
6158

62-
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
59+
In the case of a natural language task, users can combine multiple models together for a more comprehensive analysis. Otto will recommend both sentiment analysis and entity recognition models, but provides users with information about both in case they'd like to adjust this. Our NLP models are built on a Wit backend (**Otto-NLP**) configured to identify [built-in traits and entities](https://wit.ai/docs/built-in-entities/20180601).
6360

64-
### Deployment
61+
#### Supported models:
6562

66-
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
63+
| Model Name | Task | Description |
64+
|---------------------|------------------|-------------------------------------------------------------------|
65+
| K-Nearest Neighbors | Classification | Draws class regions by looking at surrounding data |
66+
| Neural Network | Classification | Deep learning model suitable for complex datasets |
67+
| Linear | Regression | Ordinary linear relationship between variables |
68+
| Poisson | Regression | Models count data, which tends to follow a Poisson distribution |
69+
| Ordinal | Regression | Learns rankings (e.g. "on a scale of 1-5") |
70+
| Sentiment Analysis | Natural Language | Detects polarity, expressions of thanks, and greetings/goodbyes |
71+
| Entity Recognition | Natural Language | Extracts structures such as people, times & locations, and works of art |
6772

68-
### `npm run build` fails to minify
73+
### Preprocessors
6974

70-
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
75+
What good is a fancy model if it takes ages to train? In this step, Otto swoops in with handpicked preprocessors for the user's data and model selections, abstracting away the intricacies of feature engineering and dimensionality reduction — machine learning techniques that optimize the data for efficient learning. As always, users can override the recommendations.
76+
77+
#### Supported preprocessors:
78+
| Preprocessor Name | Description |
79+
|------------------------------|----------------------------------------------------------------|
80+
| Principal Component Analysis | Performs dimensionality reduction and/or feature selection |
81+
| Normalization | Scales data to have mean centered at 0 and unit variance |
82+
| Text Cleaning | Removes emojis, noisy symbols, and leading/trailing whitespace |
83+
84+
### Visualization
85+
86+
The visualization stage activates for neural network design, or to render any models built on sample data.
87+
88+
#### Neural Network
89+
90+
Satisfy your curious mind with our fun, interactive network builder!
91+
92+
![nn](img/nn.gif)
93+
94+
Otto preconfigures a standard model architecture with [research-based](http://proceedings.mlr.press/v9/glorot10a/glorot10a.pdf) activations and initializers, but users are free to tinker with it layer by layer as they wish. Additionally, Otto can make network redesigns en masse with the aid of a dedicated Wit model (**Otto-Net**) that translates user instructions into architecture changes.
95+
96+
#### Model Visualization (Sample)
97+
98+
Instantly explore how parameters affect KNN clusters and regression slopes!
99+
100+
![linreg](img/linreg.gif)
101+
102+
![knn](img/knn.gif)
103+
104+
### Code Display
105+
106+
All done! With your data sorted out, preprocessors set, and model configured, Otto gives you a nice view of your work.
107+
108+
![codegen](img/codeGen.gif)
109+
110+
## Future Plans
111+
112+
Otto's modular design makes it readibly extensible, and its use of Wit means its natural language capabilities can be extended to even more domains. Here are just a few things planned for Otto:
113+
114+
- **More models**: logistic regression, support vector machines, decision trees
115+
- **New tasks**: data generation (e.g. GANs), speech recognition
116+
- **Smarter NLP**: being able to ask Otto to explain machine learning concepts or describe the difference between options
117+
118+
## About
119+
120+
### Contributors
121+
122+
<p align="center">
123+
<img src="img/a.jpg" height="200px">
124+
</p>
125+
126+
**Kartik Chugh**
127+
128+
Kartik is an incoming second-year at the University of Virginia and currently an intern at Amazon Alexa. An avid open-source contributor, he is passionate about API design and developing only the coolest machine learning tools!
129+
130+
<p align="center">
131+
<img src="img/b.jpg" height="200px">
132+
</p>
133+
134+
**Sanuj Bhatia**
135+
136+
Sanuj is Software Engineer at Facebook who loves building interactive React-based applications. When possible, he likes to introduce and then fix bugs for maximum impact.
137+
138+
### Why Otto the Owl?
139+
140+
There's the alliteration, the portrait of the wise owl that comes to mind, the subtle use of [OttoML](https://en.wikipedia.org/wiki/Automated_machine_learning)..

img/a.jpg

113 KB
Loading

img/b.jpg

90.9 KB
Loading

img/codeGen.gif

4 MB
Loading

img/knn.gif

4.19 MB
Loading

img/linreg.gif

5.34 MB
Loading

img/nn.gif

3.49 MB
Loading

img/samplePreview.gif

4.88 MB
Loading

img/taskInference.gif

11 MB
Loading

logo.png

143 KB
Loading

0 commit comments

Comments
 (0)