Repository: incubator-samoa Updated Branches: refs/heads/gh-pages 73a58cabe -> d209c35af
SAMOA-60: update package name in doc Project: http://git-wip-us.apache.org/repos/asf/incubator-samoa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-samoa/commit/d209c35a Tree: http://git-wip-us.apache.org/repos/asf/incubator-samoa/tree/d209c35a Diff: http://git-wip-us.apache.org/repos/asf/incubator-samoa/diff/d209c35a Branch: refs/heads/gh-pages Commit: d209c35af6481341effd917c525efeb5f1d2d4f6 Parents: 73a58ca Author: manuzhang <[email protected]> Authored: Sun Mar 27 14:06:50 2016 +0800 Committer: manuzhang <[email protected]> Committed: Sun Mar 27 14:06:50 2016 +0800 ---------------------------------------------------------------------- documentation/Adaptive-Model-Rules-Regressor.md | 4 ++-- documentation/Bagging-and-Boosting.md | 2 +- documentation/Content-Event.md | 4 ++-- documentation/Developing-New-Tasks-in-SAMOA.md | 8 ++++---- .../Distributed-Stream-Frequent-Itemset-Mining.md | 2 +- documentation/Executing-SAMOA-with-Apache-Avro-Files.md | 4 ++-- documentation/Executing-SAMOA-with-Apache-Storm.md | 10 +++++----- documentation/Processor.md | 2 +- documentation/SAMOA-for-MOA-users.md | 4 ++-- documentation/Task.md | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Adaptive-Model-Rules-Regressor.md ---------------------------------------------------------------------- diff --git a/documentation/Adaptive-Model-Rules-Regressor.md b/documentation/Adaptive-Model-Rules-Regressor.md index ff6dc01..62e483a 100644 --- a/documentation/Adaptive-Model-Rules-Regressor.md +++ b/documentation/Adaptive-Model-Rules-Regressor.md @@ -19,7 +19,7 @@ For each incoming instance from _Source PI_, _Model Aggregator PI_ appies the cu The number of _Learner PIs_ can be set with the `-p` option: ``` -PrequentialEvaluationTask -l (com.yahoo.labs.samoa.learners.classifiers.rules.VerticalAMRulesRegressor -p 4) +PrequentialEvaluationTask -l (org.apache.samoa.learners.classifiers.rules.VerticalAMRulesRegressor -p 4) ``` ### Horizontal Adaptive Model Rules Regressor @@ -35,6 +35,6 @@ Newly created rules are sent from _Default Rule Learner PI_ to all _Model Aggreg The number of _Learner PIs_ can be set with the `-p` option and the number of _Model Aggregator PIs_ can be set with the `-r` option: ``` -PrequentialEvaluationTask -l (com.yahoo.labs.samoa.learners.classifiers.rules.HorizontalAMRulesRegressor -r 4 -p 2) +PrequentialEvaluationTask -l (org.apache.samoa.learners.classifiers.rules.HorizontalAMRulesRegressor -r 4 -p 2) ``` http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Bagging-and-Boosting.md ---------------------------------------------------------------------- diff --git a/documentation/Bagging-and-Boosting.md b/documentation/Bagging-and-Boosting.md index 09572b6..9f599d2 100644 --- a/documentation/Bagging-and-Boosting.md +++ b/documentation/Bagging-and-Boosting.md @@ -22,7 +22,7 @@ If data is evolving, it is better to use an adaptive version of bagging, where e `(classifiers.ensemble.AdaptiveBagging -s 10 -l (classifiers.trees.VerticalHoeffdingTree))` ###### Only with SAMOA-MOA adapter -`(classifiers.ensemble.AdaptiveBagging -s 10 -l (classifiers.SingleClassifier -l (com.yahoo.labs.samoa.learners.classifiers.MOAClassifierAdapter -l moa.classifiers.trees.HoeffdingTree)))` +`(classifiers.ensemble.AdaptiveBagging -s 10 -l (classifiers.SingleClassifier -l (org.apache.samoa.learners.classifiers.MOAClassifierAdapter -l moa.classifiers.trees.HoeffdingTree)))` ### Boosting Boosting is a well known ensemble method, that has a very good performance in non-streaming setting. SAMOA implements the version of Oza and Russel (_Nikunj C. Oza, Stuart J. Russell: Experimental comparisons of online and batch versions of bagging and boosting. KDD 2001:359-364_) http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Content-Event.md ---------------------------------------------------------------------- diff --git a/documentation/Content-Event.md b/documentation/Content-Event.md index 0a8ae9f..b8c7f88 100644 --- a/documentation/Content-Event.md +++ b/documentation/Content-Event.md @@ -9,7 +9,7 @@ A message or an event is called Content Event in SAMOA. As the name suggests, it ContentEvent has been implemented as an interface in SAMOA. Users need to implement `ContentEvent` interface to create their custom message classes. As it can be seen in the following code, key is the necessary part of a message. ``` -package com.yahoo.labs.samoa.core; +package org.apache.samoa.core; public interface ContentEvent extends java.io.Serializable { @@ -36,7 +36,7 @@ This method lets SAMOA know that this message is the last message. Following is the example of a `Message` class which implements `ContentEvent` interface. As `ContentEvent` is an interface, it can not hold variables. A user-defined message class should have its own data variables and its getter methods. In the following example, `value` variable of type `Object` is added to the class. Using a generic type `Object` is beneficial in the sense that any object can be passed to it and later it can be casted back to the original type. The following example also adds a `streamId` variable which stores the `id` of the stream the message belongs to. This is not a requirement but can be beneficial in certain applications. ``` -import com.yahoo.labs.samoa.core.ContentEvent; +import org.apache.samoa.core.ContentEvent; /** * A general key-value message class which adds a stream id in the class variables http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Developing-New-Tasks-in-SAMOA.md ---------------------------------------------------------------------- diff --git a/documentation/Developing-New-Tasks-in-SAMOA.md b/documentation/Developing-New-Tasks-in-SAMOA.md index b028bde..faefbef 100644 --- a/documentation/Developing-New-Tasks-in-SAMOA.md +++ b/documentation/Developing-New-Tasks-in-SAMOA.md @@ -12,7 +12,7 @@ The Hello World task consists of a source processor, a destination processor wit  -To develop the task, we create a new class that implements the interface `com.yahoo.labs.samoa.tasks.Task`. For convenience we also implement `com.github.javacliparser.Configurable` which allows to parse command-line options. +To develop the task, we create a new class that implements the interface `org.apache.samoa.tasks.Task`. For convenience we also implement `com.github.javacliparser.Configurable` which allows to parse command-line options. The `init` method builds the topology by instantiating the necessary `Processors`, `Streams` and connecting the source processor with the destination processor. @@ -151,13 +151,13 @@ Once we have created all the components, we use the builder to build the topolog To run the example in local mode: ``` -bin/samoa local target/SAMOA-Local-0.0.1-SNAPSHOT.jar "com.yahoo.labs.samoa.examples.HelloWorldTask -p 4 -i 100" +bin/samoa local target/SAMOA-Local-0.0.1-SNAPSHOT.jar "org.apache.samoa.examples.HelloWorldTask -p 4 -i 100" ``` To run the example in Storm local mode: ``` -java -cp $STORM_HOME/lib/*:$STORM_HOME/storm-0.8.2.jar:target/SAMOA-Storm-0.0.1-SNAPSHOT.jar com.yahoo.labs.samoa.LocalStormDoTask "com.yahoo.labs.samoa.examples.HelloWorldTask -p 4 -i 1000" +java -cp $STORM_HOME/lib/*:$STORM_HOME/storm-0.8.2.jar:target/SAMOA-Storm-0.0.1-SNAPSHOT.jar org.apache.samoa.LocalStormDoTask "org.apache.samoa.examples.HelloWorldTask -p 4 -i 1000" ``` -All the code for the HelloWorldTask and its components can be found [here](https://github.com/yahoo/samoa/tree/master/samoa-api/src/main/java/com/yahoo/labs/samoa/examples). +All the code for the HelloWorldTask and its components can be found [here](https://github.com/yahoo/samoa/tree/master/samoa-api/src/main/java/org/apache/samoa/examples). http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Distributed-Stream-Frequent-Itemset-Mining.md ---------------------------------------------------------------------- diff --git a/documentation/Distributed-Stream-Frequent-Itemset-Mining.md b/documentation/Distributed-Stream-Frequent-Itemset-Mining.md index 1730f6c..5434c24 100644 --- a/documentation/Distributed-Stream-Frequent-Itemset-Mining.md +++ b/documentation/Distributed-Stream-Frequent-Itemset-Mining.md @@ -22,7 +22,7 @@ In this way, epochs never overlap.If `fpmGap` is small and the StreamSourceProce Following is an example of the command used to run the SAMOA FIM task. ``` -bin/samoa storm target/SAMOA-Storm-0.0.1-SNAPSHOT.jar "FpmTask -t Myfpmtopology -r (com.yahoo.labs.samoa.fpm.processors.FileReaderProcessor -i /datasets/freqDataCombined.txt) -m (com.yahoo.labs.samoa.fpm.processors.ParmaStreamFpmMiner -e .1 -d .1 -f 10 -t 20 -n 23 -p 0.08 -b 100000 -s com.yahoo.labs.samoa.samplers.reservoir.TimeBiasedReservoirSampler) -w (com.yahoo.labs.samoa.fpm.processors.FileWriterProcessor -o /output/outPARMA) " +bin/samoa storm target/SAMOA-Storm-0.0.1-SNAPSHOT.jar "FpmTask -t Myfpmtopology -r (org.apache.samoa.fpm.processors.FileReaderProcessor -i /datasets/freqDataCombined.txt) -m (org.apache.samoa.fpm.processors.ParmaStreamFpmMiner -e .1 -d .1 -f 10 -t 20 -n 23 -p 0.08 -b 100000 -s org.apache.samoa.samplers.reservoir.TimeBiasedReservoirSampler) -w (org.apache.samoa.fpm.processors.FileWriterProcessor -o /output/outPARMA) " ``` Parameters: http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Executing-SAMOA-with-Apache-Avro-Files.md ---------------------------------------------------------------------- diff --git a/documentation/Executing-SAMOA-with-Apache-Avro-Files.md b/documentation/Executing-SAMOA-with-Apache-Avro-Files.md index c31fcdf..e60118e 100644 --- a/documentation/Executing-SAMOA-with-Apache-Avro-Files.md +++ b/documentation/Executing-SAMOA-with-Apache-Avro-Files.md @@ -87,7 +87,7 @@ The samples below describe how the default ARFF file formats may be converted to #### Iris Dataset - JSON Encoded AVRO Format ``` -{"type":"record","name":"Iris","namespace":"com.yahoo.labs.samoa.avro.iris","fields":[{"name":"sepallength","type":"double"},{"name":"sepalwidth","type":"double"},{"name":"petallength","type":"double"},{"name":"petalwidth","type":"double"},{"name":"class","type":{"type":"enum","name":"Labels","symbols":["setosa","versicolor","virginica"]}}]} +{"type":"record","name":"Iris","namespace":"org.apache.samoa.avro.iris","fields":[{"name":"sepallength","type":"double"},{"name":"sepalwidth","type":"double"},{"name":"petallength","type":"double"},{"name":"petalwidth","type":"double"},{"name":"class","type":{"type":"enum","name":"Labels","symbols":["setosa","versicolor","virginica"]}}]} {"sepallength":5.1,"sepalwidth":3.5,"petallength":1.4,"petalwidth":0.2,"class":"setosa"} {"sepallength":3.0,"sepalwidth":1.4,"petallength":4.9,"petalwidth":0.2,"class":"virginica"} {"sepallength":4.7,"sepalwidth":3.2,"petallength":1.3,"petalwidth":0.2,"class":"virginica"} @@ -97,7 +97,7 @@ The samples below describe how the default ARFF file formats may be converted to #### Iris Dataset - Binary Encoded AVRO Format ``` -Objavro.schemaÎ {"type":"record","name":"Iris","namespace":"com.yahoo.labs.samoa.avro.iris","fields":[{"name":"sepallength","type":"double"},{"name":"sepalwidth","type":"double"},{"name":"petallength","type":"double"},{"name":"petalwidth","type":"double"},{"name":"class","type":{"type":"enum","name":"Labels","symbols":["setosa","versicolor","virginica"]}}]} !<khCrÖ±Së¹§Þ©Èffffff@ @ffffffÙÙÉ¿ @ffffffÙÙ@ÚÙÙÉ¿ÎÍÍ@ÚÙÙ @ÎÍÍÙÙÉ¿ÎÍÍ@ 𿦦ffff@ÚÙÙÉ¿ !<khCrÖ±Së¹§Þ© +Objavro.schemaÎ {"type":"record","name":"Iris","namespace":"org.apache.samoa.avro.iris","fields":[{"name":"sepallength","type":"double"},{"name":"sepalwidth","type":"double"},{"name":"petallength","type":"double"},{"name":"petalwidth","type":"double"},{"name":"class","type":{"type":"enum","name":"Labels","symbols":["setosa","versicolor","virginica"]}}]} !<khCrÖ±Së¹§Þ©Èffffff@ @ffffffÙÙÉ¿ @ffffffÙÙ@ÚÙÙÉ¿ÎÍÍ@ÚÙÙ @ÎÍÍÙÙÉ¿ÎÍÍ@ 𿦦ffff@ÚÙÙÉ¿ !<khCrÖ±Së¹§Þ© ``` #### Forest CoverType Dataset http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Executing-SAMOA-with-Apache-Storm.md ---------------------------------------------------------------------- diff --git a/documentation/Executing-SAMOA-with-Apache-Storm.md b/documentation/Executing-SAMOA-with-Apache-Storm.md index 0fcdea2..3a38a2e 100644 --- a/documentation/Executing-SAMOA-with-Apache-Storm.md +++ b/documentation/Executing-SAMOA-with-Apache-Storm.md @@ -22,8 +22,8 @@ nimbus.host: "<enter your nimbus host name here>" ## List of custom serializations kryo.register: - - com.yahoo.labs.samoa.learners.classifiers.trees.AttributeContentEvent: com.yahoo.labs.samoa.learners.classifiers.trees.AttributeContentEvent$AttributeCEFullPrecSerializer - - com.yahoo.labs.samoa.learners.classifiers.trees.ComputeContentEvent: com.yahoo.labs.samoa.learners.classifiers.trees.ComputeContentEvent$ComputeCEFullPrecSerializer + - org.apache.samoa.learners.classifiers.trees.AttributeContentEvent: org.apache.samoa.learners.classifiers.trees.AttributeContentEvent$AttributeCEFullPrecSerializer + - org.apache.samoa.learners.classifiers.trees.ComputeContentEvent: org.apache.samoa.learners.classifiers.trees.ComputeContentEvent$ComputeCEFullPrecSerializer ``` <!-- Or, if you are using SAMOA with optimized VHT, you should use this following configuration file: @@ -33,8 +33,8 @@ nimbus.host: "<enter your nimbus host name here>" ## List of custom serializations kryo.register: - - com.yahoo.labs.samoa.learners.classifiers.trees.NaiveAttributeContentEvent: com.yahoo.labs.samoa.classifiers.trees.NaiveAttributeContentEvent$NaiveAttributeCEFullPrecSerializer - - com.yahoo.labs.samoa.learners.classifiers.trees.ComputeContentEvent: com.yahoo.labs.samoa.classifiers.trees.ComputeContentEvent$ComputeCEFullPrecSerializer + - org.apache.samoa.learners.classifiers.trees.NaiveAttributeContentEvent: org.apache.samoa.classifiers.trees.NaiveAttributeContentEvent$NaiveAttributeCEFullPrecSerializer + - org.apache.samoa.learners.classifiers.trees.ComputeContentEvent: org.apache.samoa.classifiers.trees.ComputeContentEvent$ComputeCEFullPrecSerializer ``` --> @@ -86,7 +86,7 @@ You can execute a SAMOA task using the aforementioned `bin/samoa` script with th The complete command to execute SAMOA is: ``` -bin/samoa storm target/SAMOA-Storm-0.0.1-SNAPSHOT.jar "PrequentialEvaluation -d /tmp/dump.csv -i 1000000 -f 100000 -l (com.yahoo.labs.samoa.learners.classifiers.trees.VerticalHoeffdingTree -p 4) -s (com.yahoo.labs.samoa.moa.streams.generators.RandomTreeGenerator -c 2 -o 10 -u 10)" +bin/samoa storm target/SAMOA-Storm-0.0.1-SNAPSHOT.jar "PrequentialEvaluation -d /tmp/dump.csv -i 1000000 -f 100000 -l (org.apache.samoa.learners.classifiers.trees.VerticalHoeffdingTree -p 4) -s (org.apache.samoa.moa.streams.generators.RandomTreeGenerator -c 2 -o 10 -u 10)" ``` The example above uses [Prequential Evaluation task](Prequential-Evaluation-Task) and [Vertical Hoeffding Tree](Vertical-Hoeffding-Tree-Classifier) classifier. http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Processor.md ---------------------------------------------------------------------- diff --git a/documentation/Processor.md b/documentation/Processor.md index 8891cd7..4031581 100644 --- a/documentation/Processor.md +++ b/documentation/Processor.md @@ -48,7 +48,7 @@ is very simple to implement. This method is just a technical overhead that has n ### Preview of EntranceProcessor ``` -package com.yahoo.labs.samoa.core; +package org.apache.samoa.core; public interface EntranceProcessor extends Processor { public boolean isFinished(); http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/SAMOA-for-MOA-users.md ---------------------------------------------------------------------- diff --git a/documentation/SAMOA-for-MOA-users.md b/documentation/SAMOA-for-MOA-users.md index b091e2a..dfd9727 100644 --- a/documentation/SAMOA-for-MOA-users.md +++ b/documentation/SAMOA-for-MOA-users.md @@ -7,8 +7,8 @@ If you're an advanced user of [MOA](http://moa.cms.waikato.ac.nz/), you'll find * There is no GUI interface in SAMOA * You can run SAMOA in the following modes: - 1. Simulation Environment. Use `com.yahoo.labs.samoa.DoTask` instead of `moa.DoTask` - 2. Storm Local Mode. Use `com.yahoo.labs.samoa.LocalStormDoTask` instead of `moa.DoTask` + 1. Simulation Environment. Use `org.apache.samoa.DoTask` instead of `moa.DoTask` + 2. Storm Local Mode. Use `org.apache.samoa.LocalStormDoTask` instead of `moa.DoTask` 3. Storm Cluster Mode. You need to use the `samoa` script as it is explained in [Executing SAMOA with Apache Storm](Executing SAMOA with Apache Storm). 4. S4. You need to use the `samoa` script as it is explained in [Executing SAMOA with Apache S4](Executing SAMOA with Apache S4) http://git-wip-us.apache.org/repos/asf/incubator-samoa/blob/d209c35a/documentation/Task.md ---------------------------------------------------------------------- diff --git a/documentation/Task.md b/documentation/Task.md index e583ce7..03648ae 100644 --- a/documentation/Task.md +++ b/documentation/Task.md @@ -7,10 +7,10 @@ Task is similar to a job in Hadoop. Task is an execution entity. A topology must ###1. Implementation ``` -package com.yahoo.labs.samoa.tasks; +package org.apache.samoa.tasks; -import com.yahoo.labs.samoa.topology.ComponentFactory; -import com.yahoo.labs.samoa.topology.Topology; +import org.apache.samoa.topology.ComponentFactory; +import org.apache.samoa.topology.Topology; /** * Task interface, the mother of all SAMOA tasks!
