Skip to content
Snippets Groups Projects
Commit 90a5f37f authored by Tibo's avatar Tibo
Browse files

Update README.md : add maven installation

parent 7fc5d4a8
No related branches found
No related tags found
No related merge requests found
Pipeline #1077 passed
......@@ -14,8 +14,16 @@ This project is a Java implementation of the [PHP wowa-training](https://gitlab.
Using maven :
TO COMPLETE !
```
<dependency>
<groupId>be.cylab</groupId>
<artifactId>java-wowa-training</artifactId>
<version>0.0.3</version>
</dependency>
```
https://mvnrepository.com/artifact/be.cylab/java-wowa-training
## Usage
......@@ -31,7 +39,8 @@ public static void main(String[] args) {
int selection_method = TrainerParameters.SELECTION_METHOD_RWS;
int max_generation = 110;
TrainerParameters parameters = new TrainerParameters(logger, population_size, crossover_rate, mutation_rate, selection_method, max_generation);
TrainerParameters parameters = new TrainerParameters(logger, population_size,
crossover_rate, mutation_rate, selection_method, max_generation);
Trainer trainer = new Trainer(parameters);
//Input data
List<double[]> data = new ArrayList<double[]>();
......@@ -54,7 +63,10 @@ public static void main(String[] args) {
The example above will produce something like:
```
SolutionDistance{weights_w=[0.1403303611048977, 0.416828569516884, 0.12511121306189063, 0.1872211165629538, 0.1305087298401635], weights_p=[0.0123494228072248, 0.10583088288437666, 0.5459452827654444, 0.17470250892324257, 0.1611718492107217], distance=8.114097675242476}
SolutionDistance{
weights_w=[0.1403303611048977, 0.416828569516884, 0.12511121306189063, 0.1872211165629538, 0.1305087298401635],
weights_p=[0.0123494228072248, 0.10583088288437666, 0.5459452827654444, 0.17470250892324257, 0.1611718492107217],
distance=8.114097675242476}
```
The **run** method returns a solution object, consisting of p weights and w weights to use with the WOWA operator, plus the total distance between the expected aggregated values that are given as parameter, and the aggregated values computed by WOWA using these weights.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment