Jump to: navigation, search

Difference between revisions of "Meteos/ExampleNativebyes"

(Created page with "== Detect a Spam Mail using Meteos == In this example, you create a prediction model which predict it is a spam mail or not by using Native byes Model. === 1. Create a exper...")
 
(Detect a Spam Mail using Meteos)
Line 7: Line 7:
 
Create template of experiment.
 
Create template of experiment.
  
Select Template panel and create template with below parameters.
+
Select a Template panel and create template with below parameters.
  
 
=== 2. Create a experiment from template ===
 
=== 2. Create a experiment from template ===
Line 13: Line 13:
 
Create a experiment by using template created in the above step.
 
Create a experiment by using template created in the above step.
  
Select Experiment panel and create experiment with below parameters.
+
Select a Experiment panel and create experiment with below parameters.
  
 
Experiment consists of virtual machines created by nova.
 
Experiment consists of virtual machines created by nova.
Line 23: Line 23:
 
Upload a raw data (in this example sample mail data set) to OpenStack Swift.
 
Upload a raw data (in this example sample mail data set) to OpenStack Swift.
  
You can download spam collection data set from [https://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection | here].
+
You can download a spam collection dataset from [https://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection | here].
  
 
<pre>
 
<pre>
Line 46: Line 46:
  
 
For using Classification Model of Meteos, dataset must begin with "[flag] [value]...".
 
For using Classification Model of Meteos, dataset must begin with "[flag] [value]...".
And flag must be integer string.
+
And flag must be integer string.In this case, flag indicate whether it is a spam mail or not.
  
In this case, flag indicate whether it is a spam mail or not.
+
Select a Dataset panel and create dataset with parse method to enable Meteos to handle it.
  
 
=== 5. Split a Dataset ===
 
=== 5. Split a Dataset ===
Line 54: Line 54:
 
Split a dataset for creating model and evaluation model.
 
Split a dataset for creating model and evaluation model.
  
Select Dataset Panel and create dataset with parse method as below.
+
Select Dataset Panel and create dataset with split method as below.
  
 
You can specify the percentage of split.
 
You can specify the percentage of split.

Revision as of 02:23, 15 March 2017

Detect a Spam Mail using Meteos

In this example, you create a prediction model which predict it is a spam mail or not by using Native byes Model.

1. Create a experiment template

Create template of experiment.

Select a Template panel and create template with below parameters.

2. Create a experiment from template

Create a experiment by using template created in the above step.

Select a Experiment panel and create experiment with below parameters.

Experiment consists of virtual machines created by nova.

So, you can see virtual machines in Instance panel.

3. Upload a raw data

Upload a raw data (in this example sample mail data set) to OpenStack Swift.

You can download a spam collection dataset from | here.

$ wget https://archive.ics.uci.edu/ml/machine-learning-databases/00228/smsspamcollection.zip
$ unzip smsspamcollection.zip
$ swift upload meteos SMSSpamCollection
SMSSpamCollection

4. Parse a raw data

Parse a raw data to enable Meteos to handle it.

As you can see in below, uploaded dataset begin with "[ham|smap] [body of the mail] "

$ $ head -n3 SMSSpamCollection
ham     Go until jurong point, crazy.. Available only in bugis n great world la e buffet... Cine there got amore wat...
ham     Ok lar... Joking wif u oni...
spam    Free entry in 2 a wkly comp to win FA Cup final tkts 21st May 2005. Text FA to 87121 to receive entry question(std txt rate)T&C's apply 08452810075over18's

For using Classification Model of Meteos, dataset must begin with "[flag] [value]...". And flag must be integer string.In this case, flag indicate whether it is a spam mail or not.

Select a Dataset panel and create dataset with parse method to enable Meteos to handle it.

5. Split a Dataset

Split a dataset for creating model and evaluation model.

Select Dataset Panel and create dataset with split method as below.

You can specify the percentage of split.

You can see split dataset in Dataset Panel.

6. Create a prediction model

In this example, User creates a Model from parsed dataset.

Parsed dataset has been already distributed in hdfs of experiment environment.

So, you specify the internal url (internal://<dataset-id>) in source_dataset_url parameter.

7. Predict

Create a learning job predicting whether it is a spam mail or not.

Specify the input value as "args" parameter. In this case, you specify the body of mail in args parameter.

Retrieve a predicted data as a stdout of job execution.

8. Online Prediction

You can load a Prediction Model in advance for online prediction by using "meteos-load" command.

In online prediction, user can retrieve a predicted data immediately.

You can get a predicted data as a response of REST API.