Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2017-05-23 16:51:25 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d06233435934b3a693989db4f22b1d20f72f8a9c
d0623343
1 parent
e537c51e
Annotation en pourcentage float et plus de contrôle d'annotation sur les solitaires.
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
grog-recommendation/grog-recommendation-preprocess/src/main/java/org/legrog/recommendation/preprocess/PreprocessingRunner.java
grog-recommendation/grog-recommendation-process/src/main/java/org/legrog/recommendation/process/ProcessingRunner.java
grog-recommendation/grog-recommendation-preprocess/src/main/java/org/legrog/recommendation/preprocess/PreprocessingRunner.java
View file @
d062334
...
...
@@ -50,7 +50,7 @@ public class PreprocessingRunner implements ApplicationRunner {
private
Boolean
ratings
;
private
in
t
annotatePercent
;
private
floa
t
annotatePercent
;
@Override
public
void
run
(
ApplicationArguments
applicationArguments
)
throws
Exception
{
...
...
@@ -161,8 +161,6 @@ public class PreprocessingRunner implements ApplicationRunner {
logger
.
debug
(
"Remaining AssociationElement count {}"
,
associationElements
.
size
());
logger
.
debug
(
"Remover item or user {}"
,
removedUser
||
removedItem
);
return
associationElements
;
}
...
...
@@ -180,6 +178,7 @@ public class PreprocessingRunner implements ApplicationRunner {
randomInteger
=
new
Integer
(
random
.
nextInt
(
size
));
if
(!
annotatedChosen
.
contains
(
randomInteger
))
{
/* Annotation sans contrôle
randomAssociationElement = annotableElements.get(randomInteger);
final Long itemId = randomAssociationElement.getItemId();
final Long userId = randomAssociationElement.getUserId();
...
...
@@ -199,10 +198,10 @@ public class PreprocessingRunner implements ApplicationRunner {
}
}
if
(
userCount
>
userSize
&&
itemCount
>
itemSize
)
{
if (userCount > userSize && itemCount > itemSize) {
*/
annotatedChosen
.
add
(
randomInteger
);
logger
.
debug
(
"Adding new AssociationElement to annotated, total is {}"
,
annotatedChosen
.
size
());
}
//
logger.debug("Adding new AssociationElement to annotated, total is {}", annotatedChosen.size());
//
}
}
}
...
...
@@ -309,10 +308,10 @@ public class PreprocessingRunner implements ApplicationRunner {
}
if
(
properties
.
containsKey
(
"annotatePercent"
))
{
annotatePercent
=
Integer
.
parseIn
t
(
properties
.
getProperty
(
"annotatePercent"
));
annotatePercent
=
Float
.
parseFloa
t
(
properties
.
getProperty
(
"annotatePercent"
));
}
else
{
// default
top size is 10
annotatePercent
=
1
;
// default
annotate percent is 1
annotatePercent
=
1
.0f
;
}
}
catch
(
IOException
e
)
{
...
...
grog-recommendation/grog-recommendation-process/src/main/java/org/legrog/recommendation/process/ProcessingRunner.java
View file @
d062334
...
...
@@ -46,7 +46,7 @@ public class ProcessingRunner implements ApplicationRunner {
private
Recommender
recommender
;
private
int
topSize
;
private
in
t
annotatePercent
;
private
floa
t
annotatePercent
;
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
...
...
@@ -151,7 +151,7 @@ public class ProcessingRunner implements ApplicationRunner {
Properties
properties
=
new
Properties
();
properties
.
load
(
in
);
if
(
properties
.
containsKey
(
"annotatePercent"
))
{
annotatePercent
=
Integer
.
parseIn
t
(
properties
.
getProperty
(
"annotatePercent"
));
annotatePercent
=
Float
.
parseFloa
t
(
properties
.
getProperty
(
"annotatePercent"
));
}
else
{
// default annotate percent is 0
...
...
Please
register
or
login
to post a comment