Code Monkey home page Code Monkey logo

machinelearningsamples-sentimentanalysis's Introduction

Sentiment analysis using deep learning with Azure Machine Learning

NOTE This content is no longer maintained. Visit the Azure Machine Learning Notebook project for sample Jupyter notebooks for ML and deep learning with Azure Machine Learning.

Link to the Microsoft DOCS site

The detailed documentation for this sentiment analysis example includes the step-by-step walk-through: https://docs.microsoft.com/azure/machine-learning/preview/scenario-sentiment-analysis-deep-learning

Link to the Gallery GitHub repository

The public GitHub repository for this sentiment analysis example contains all the code samples: https://github.com/Azure/MachineLearningSamples-SentimentAnalysis

Overview

Sentiment analysis is a well-known task in the realm of natural language processing. Given a set of texts, the objective is to determine the sentiment of that text. This example demonstrates the use of Keras to perform sentiment analysis from movie reviews.

Key components needed to run this example

  1. An Azure account (free trials are available).
  2. An installed copy of Azure Machine Learning Workbench with a workspace created.
  3. The deployment part of this example is run on a Linux DSVM.

Data / Telemetry

Sentiment Analysis collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (for example, label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

machinelearningsamples-sentimentanalysis's People

Contributors

angusrtaylor avatar hning86 avatar jreynolds01 avatar linya9191 avatar microsoftopensource avatar mithun-prasad avatar msftgits avatar pechyony avatar rastala avatar rloutlaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machinelearningsamples-sentimentanalysis's Issues

dprep in Docker

SentimentAnalysisModelingDocker.md says that dprep file cannot be used in Docker. But iris sample experiment shows that dprep file works fine in Docker

SentimentAnalysisModelingKerasWithCNTKBackend failed with error mkl err (-127)

Environment:
Windows 10 x64
Python 3.5.2
Keras 2.1.1
CNTK CPU-Only 2.3

Outputs:
PS F:\Study\LuisSentimentAnalysis> az ml experiment submit -c local SentimentExtraction.py
RunId: LuisSentimentAnalysis_1511486594580

Executing user inputs .....

Using CNTK backend
Selected CPU as the process wide default device.
F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\keras\backend\cntk_backend.py:18: UserWarning: CNTK backend warning: GPU is not detected. CNTK's CPU version is not fully optimized,please run with GPU to get better performance.
'CNTK backend warning: GPU is not detected. '
Building model...
Train on 105 samples, validate on 106 samples
Epoch 1/2
Traceback (most recent call last):
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\azureml\logging_exec_wrapper.py", line 159, in execute
raise exc
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\azureml\logging_exec_wrapper.py", line 157, in execute
run_name="main")
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\runpy.py", line 254, in run_path
pkg_name=pkg_name, script_name=fname)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "SentimentExtraction.py", line 179, in
model = train_model()
File "SentimentExtraction.py", line 99, in train_model
validation_data=(x_test, y_test))
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\keras\models.py", line 960, in fit
validation_steps=validation_steps)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\keras\engine\training.py", line 1650, in fit
validation_steps=validation_steps)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\keras\engine\training.py", line 1213, in _fit_loop
outs = f(ins_batch)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\keras\backend\cntk_backend.py", line 1815, in call
input_dict, self.trainer_output)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\cntk\train\trainer.py", line 171, in train_minibatch
output_map, device)
File "F:\Users\stlui\AppData\local\AmlWorkbench\Python\lib\site-packages\cntk\cntk_py.py", line 2853, in train_minibatch
return _cntk_py.Trainer_train_minibatch(self, *args)
RuntimeError: mkl err (-127)

[CALL STACK]
> Microsoft::MSR::CNTK::ConvolutionEngine:: MaxUnpooling
- Microsoft::MSR::CNTK::ConvolutionEngine:: Forward (x2)
- CNTK::Dictionary:: ~Dictionary (x2)
- CNTK::Internal:: UseSparseGradientAggregationInDataParallelSGD
- CNTK::Dictionary:: ~Dictionary
- CNTK::Internal:: UseSparseGradientAggregationInDataParallelSGD
- CNTK::Function:: Forward
- CNTK:: CreateTrainer
- CNTK::Trainer:: TotalNumberOfUnitsSeen
- CNTK::Trainer:: TrainMinibatch
- PyInit__cntk_py (x2)
- PyCFunction_Call
- PyEval_GetFuncDesc

Execution Details

RunId: LuisSentimentAnalysis_1511486594580

Lab is supposed to show CNTK not TensorFlow

The text for this project says the Objective is:

This example demonstrates the use CNTK as the backend for Keras to perform sentiment analysis from 
movie reviews.

But the actual instructions show only Tensorflow, no CNTK.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.