Skip to content
This repository was archived by the owner on Jun 29, 2019. It is now read-only.
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Sentiment Analysis using Deep Learning: Modeling - Keras with CNTK Backend

The script that executes the below steps is [SentimentExtraction.py](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Code/SentimentExtraction.py)
Expand All @@ -19,6 +20,10 @@ The IMDB movie dataset consists of moving reviews with positive and negative sen

## 3. CNTK Backend

If you do not have cntk installed, you can install it using
```
pip install https://cntk.ai/PythonWheel/CPU-Only/cntk-2.2-cp35-cp35m-win_amd64.whl
```
If you do not have Keras installed, you can install it using
```
pip install keras
Expand Down
35 changes: 32 additions & 3 deletions Docs/SentimentAnalysisOperationalization.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Sentiment Analysis using Deep Learning: Operationalization

## 1. Objectives
Expand Down Expand Up @@ -25,21 +26,49 @@ If you encounter “locale.Error: unsupported locale setting” error, perform t
```
export LC_ALL=C
```

Change to root
```
sudo -i
```
Update pip to the latest:
```
pip install –-upgrade pip
```
Update azure to the latest:
```
pip install --upgrade azure
```
Install azure-cli and azure-cli-ml using pip:

```
pip install azure-cli
pip install azure-cli-ml
```

In addition, change python default version and run the following commands. Local mode deployments run in docker containers on your local computer, whether that is your personal machine or a VM running on Azure. You can use local mode for development and testing.

Create a bash_aliases file
```
gedit ~/.bash_aliases
```
Open your ~/.bash_aliases file and add the following and save it to home directory
```
alias python=python3
```
Source the ~/.bash_aliases file
```
source ~/.bash_aliases
az ml env setup
```
Setup azure ml environment
```
az ml env setup -n <environment name> – g <resource group> -l <location>
az ml env set -g <resource group> -n <environment name>
```
Source the file to set up your environment variables
```
source ~/.amlenvrc
```
To always set these variables when you log in, copy the export commands into your .bashrc file
```
cat < ~/.amlenvrc >> ~/.bashrc
```
Upload the below files to the vm (you could use scp to perform the upload):
Expand Down
5 changes: 2 additions & 3 deletions scenario-sentiment-analysis-deep-learning.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Follow this link to the public GitHub repository:

[https://github.com/Azure/MachineLearningSamples-SentimentAnalysis](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis)


## Introduction

Sentiment analysis is a well-known task in the realm of natural language processing. Given a set of texts, the aim is to determine the sentiment of that text. The objective of this solution is to use CNTK as the backend for Keras (a model level library, providing high-level building blocks for developing deep learning models) and implement sentiment analysis from movie reviews.
Expand Down Expand Up @@ -68,8 +67,8 @@ The order of Hands-on Labs to carry out the solution is as follows:
| Order| File Name | Related Files |
|--|-----------|------|
| 1 | [`DataPreparation.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisDataPreparation.md) | 'Data/sampleReviews.txt' |
| 2 | [`ModelingAndEvaluation.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingDocker.md) | 'Code/SentimentExtraction.py' |
| 3 | [`ModelingAndEvaluationDocker.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md) | 'Code/SentimentExtractionDocker.py' |
| 2 | [`ModelingAndEvaluationDocker.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingDocker.md) | 'Code/SentimentExtractionDocker.py' |
| 3 | [`ModelingAndEvaluationCNTK.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisModelingKerasWithCNTKBackend.md) | 'Code/SentimentExtraction.py' |
| 4 | [`Operationalization.md`](https://github.com/Azure/MachineLearningSamples-SentimentAnalysis/blob/master/Docs/SentimentAnalysisOperationalization.md) | 'Code/Operaionalization' |

## Conclusion
Expand Down