Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
java-wowa-training
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cylab
java-wowa-training
Commits
d4b89ac0
Commit
d4b89ac0
authored
6 years ago
by
a.croix
Browse files
Options
Downloads
Patches
Plain Diff
Fix checkstyle issues
parent
e1e8e3ac
No related branches found
No related tags found
1 merge request
!2
Add AUC as a score for distance
Pipeline
#1322
passed
6 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/be/cylab/java/wowa/training/Factory.java
+3
-3
3 additions, 3 deletions
src/main/java/be/cylab/java/wowa/training/Factory.java
src/main/java/be/cylab/java/wowa/training/Trainer.java
+2
-1
2 additions, 1 deletion
src/main/java/be/cylab/java/wowa/training/Trainer.java
with
5 additions
and
4 deletions
src/main/java/be/cylab/java/wowa/training/Factory.java
+
3
−
3
View file @
d4b89ac0
package
be.cylab.java.wowa.training
;
package
be.cylab.java.wowa.training
;
import
java.lang.reflect.InvocationTargetException
;
/**
/**
* Class to generate objects.
* Class to generate objects.
...
@@ -18,13 +17,14 @@ public class Factory {
...
@@ -18,13 +17,14 @@ public class Factory {
/**
/**
* @return
* @return
*/
*/
public
AbstractSolution
createSolutionObject
(
final
int
a
)
{
public
final
AbstractSolution
createSolutionObject
(
final
int
a
)
{
if
(
this
.
solution_type
instanceof
SolutionDistance
)
{
if
(
this
.
solution_type
instanceof
SolutionDistance
)
{
return
new
SolutionDistance
(
a
);
return
new
SolutionDistance
(
a
);
}
else
if
(
this
.
solution_type
instanceof
SolutionAUC
)
{
}
else
if
(
this
.
solution_type
instanceof
SolutionAUC
)
{
return
new
SolutionAUC
(
a
);
return
new
SolutionAUC
(
a
);
}
else
{
}
else
{
throw
new
IllegalArgumentException
(
"Provide o correct type of Solution"
);
throw
new
IllegalArgumentException
(
"Provide o correct type of Solution"
);
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
src/main/java/be/cylab/java/wowa/training/Trainer.java
+
2
−
1
View file @
d4b89ac0
...
@@ -95,7 +95,8 @@ public class Trainer {
...
@@ -95,7 +95,8 @@ public class Trainer {
List
<
AbstractSolution
>
population
=
new
ArrayList
<>();
List
<
AbstractSolution
>
population
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
population_size
;
i
++)
{
for
(
int
i
=
0
;
i
<
population_size
;
i
++)
{
AbstractSolution
solution
=
this
.
factory
.
createSolutionObject
(
number_of_weights
);
AbstractSolution
solution
=
this
.
factory
.
createSolutionObject
(
number_of_weights
);
population
.
add
(
solution
);
population
.
add
(
solution
);
}
}
return
population
;
return
population
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment