https://github.com/vepo/machine-learning-tutorial
An example of how to use Tensorflow in a project [UNDER CONSTRUCTION]
https://github.com/vepo/machine-learning-tutorial
machine-learning python3 tensorfow
Last synced: 3 months ago
JSON representation
An example of how to use Tensorflow in a project [UNDER CONSTRUCTION]
- Host: GitHub
- URL: https://github.com/vepo/machine-learning-tutorial
- Owner: vepo
- License: gpl-3.0
- Created: 2017-08-19T00:39:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-31T23:20:05.000Z (almost 8 years ago)
- Last Synced: 2025-01-16T06:55:55.656Z (5 months ago)
- Topics: machine-learning, python3, tensorfow
- Language: Python
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Machine Learning Tutorial
This is a simple tutorial of how create a Tensorflow model and how to use this model in a application.
## When use Machine Learning
With Machine Learning you can:
* Predict values using the historical data.
* Classify based on features
* ...## What is Tensorflow
Tensor is a Google framework that helps you add Machine Learning to your application.
## How Machine Learning works
Machines will never learning anything.
Machine only recognizes patterns.
So the first step for using a Machine Learning approaches is teach the machine to recognizes a pattern. This means you should train the machine and creates a model.
### So they learn!
No! There is a mathematical model to preview the output based on a train.
Let me explain better.
Our trainning set is composed of rows, each row is a historical data. For each row we have at least one feature and one real data. Let's create an equation where  is a matrix for all the input values and  is all the real data.

Now we are guessing that exists a vector  that can convert each input data in their respective output.
 does not exists! But if we find any values that minimizes the error, we can contruct a model that predicts the output.
## Creating the trainning environment
The first step for using Tensorflow is create the trainning environment.
You can see at [Dockerfile](train/Dockerfile) who you can setup the environment for trainging and prepare the data.
## Creating the model
With everything running fine, you should start trainning your model. You can see [here](train/train_data.py) how it can be done.
## Validating the data
Running the train container, you can inspect the trainning you had done at http://localhost:6006.
```bash
docker build -t mlt-trainning train/
docker run -p 6006:6006 --name mlt -i -t mlt
```## Serving the data
You can see in the gcloud scripts how [install](train/gcloud-activate.sh) an [upload](train/upload-model.sh) the model to Google Cloud.
Before you run theses scripts you should:
1. Create a project at [Google Cloud Console](https://console.cloud.google.com)
2. Create a credentials file at `train/credentials.json`
3. Enable billing, if you do not enable you cannot upload the model