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-04 15:13:43 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e5a9315ac709f788dc34f1e83f4a03399739c572
e5a9315a
1 parent
511e64d4
Re-configuration des logs.
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
20 deletions
grog-recommendation/grog-recommendation-postprocess/src/main/java/org/legrog/recommendation/postprocess/PostprocessingExpert.java
grog-recommendation/grog-recommendation-postprocess/src/main/resources/logback.xml
grog-recommendation/grog-recommendation-process/src/main/resources/logback.xml
grog-recommendation/grog-recommendation-postprocess/src/main/java/org/legrog/recommendation/postprocess/PostprocessingExpert.java
View file @
e5a9315
...
...
@@ -67,8 +67,8 @@ public class PostprocessingExpert {
}
recommendableItemCount
=
sampleItemIds
.
size
();
logger
.
trace
(
"C: Nombre d'objets recommandables {}"
,
recommendableItemCount
);
logger
.
trace
(
"C: Taille de la matrice item-user {}"
,
sampleItemIds
.
size
()
*
sampleUserIds
.
size
());
logger
.
debug
(
"C: Nombre d'objets recommandables {}"
,
recommendableItemCount
);
logger
.
debug
(
"C: Taille de la matrice item-user {}"
,
sampleItemIds
.
size
()
*
sampleUserIds
.
size
());
int
sampleCoupleCount
=
0
;
for
(
Long
itemId
:
sampleItemIds
)
{
...
...
@@ -76,8 +76,8 @@ public class PostprocessingExpert {
}
recommendableItemUserCount
=
sampleItemIds
.
size
()
*
sampleUserIds
.
size
()
-
sampleCoupleCount
;
logger
.
trace
(
"C: Nombre de couples item-user dans l'échantillon {}"
,
sampleCoupleCount
);
logger
.
trace
(
"C: Nombre de couples item-user recommandables {}"
,
recommendableItemUserCount
);
logger
.
debug
(
"C: Nombre de couples item-user dans l'échantillon {}"
,
sampleCoupleCount
);
logger
.
debug
(
"C: Nombre de couples item-user recommandables {}"
,
recommendableItemUserCount
);
}
protected
void
analyzeRecommendations
()
{
...
...
@@ -104,11 +104,11 @@ public class PostprocessingExpert {
}
}
recommendedItemCount
=
recommendedItemIds
.
size
();
logger
.
trace
(
"C: Nombre d'objets recommandés {}"
,
recommendedItemCount
);
logger
.
trace
(
"C/PR: Nombre de couples item-user recommandés {}"
,
recommendedItemUserCount
);
logger
.
debug
(
"C: Nombre d'objets recommandés {}"
,
recommendedItemCount
);
logger
.
debug
(
"C/PR: Nombre de couples item-user recommandés {}"
,
recommendedItemUserCount
);
annotatedItemUserCount
=
annotatedList
.
size
();
logger
.
trace
(
"PR: Nombre d'associations annotées {}"
,
annotatedItemUserCount
);
logger
.
trace
(
"PR: Nombre de recommandations annotées {}"
,
validRecommendationCount
);
logger
.
debug
(
"PR: Nombre d'associations annotées {}"
,
annotatedItemUserCount
);
logger
.
debug
(
"PR: Nombre de recommandations annotées {}"
,
validRecommendationCount
);
}
protected
PostprocessingCoverage
computeCoverage
()
{
...
...
@@ -116,16 +116,16 @@ public class PostprocessingExpert {
float
c2
;
int
c3
;
logger
.
trace
(
"C: Nombre d'objets recommandés {}"
,
recommendedItemCount
);
logger
.
trace
(
"C: Nombre d'objets recommandables {}"
,
recommendableItemCount
);
logger
.
debug
(
"C: Nombre d'objets recommandés {}"
,
recommendedItemCount
);
logger
.
debug
(
"C: Nombre d'objets recommandables {}"
,
recommendableItemCount
);
c1
=
(
float
)
recommendedItemCount
/
recommendableItemCount
;
logger
.
trace
(
"c1 {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
c1
));
logger
.
trace
(
"C: Nombre de couples item-user recommandés {}"
,
recommendedItemUserCount
);
logger
.
trace
(
"C: Nombre de couples item-user recommandables {}"
,
recommendableItemUserCount
);
logger
.
debug
(
"c1 {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
c1
));
logger
.
debug
(
"C: Nombre de couples item-user recommandés {}"
,
recommendedItemUserCount
);
logger
.
debug
(
"C: Nombre de couples item-user recommandables {}"
,
recommendableItemUserCount
);
c2
=
(
float
)
recommendedItemUserCount
/
recommendableItemUserCount
;
logger
.
trace
(
"c2 {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
c2
));
logger
.
debug
(
"c2 {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
c2
));
c3
=
recommendedItemCount
;
logger
.
trace
(
"c3 {}"
,
c3
);
logger
.
debug
(
"c3 {}"
,
c3
);
return
new
PostprocessingCoverage
(
c1
,
c2
,
c3
);
}
...
...
@@ -134,13 +134,13 @@ public class PostprocessingExpert {
float
precision
;
float
recall
;
logger
.
trace
(
"PR: nombre de recommandations annotées {}"
,
validRecommendationCount
);
logger
.
trace
(
"PR: nombre de recommandations {}"
,
recommendedItemUserCount
);
logger
.
debug
(
"PR: nombre de recommandations annotées {}"
,
validRecommendationCount
);
logger
.
debug
(
"PR: nombre de recommandations {}"
,
recommendedItemUserCount
);
precision
=
(
float
)
validRecommendationCount
/
recommendedItemUserCount
;
logger
.
trace
(
"PR: précision {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
precision
));
logger
.
trace
(
"PR: nombre d'associations annotées {}"
,
annotatedItemUserCount
);
logger
.
debug
(
"PR: précision {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
precision
));
logger
.
debug
(
"PR: nombre d'associations annotées {}"
,
annotatedItemUserCount
);
recall
=
(
float
)
validRecommendationCount
/
annotatedItemUserCount
;
logger
.
trace
(
"PR: rappel {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
recall
));
logger
.
debug
(
"PR: rappel {}"
,
String
.
format
(
Locale
.
FRENCH
,
"%.3f"
,
recall
));
return
new
PostprocessingPrecisionRecall
(
precision
,
recall
);
}
...
...
grog-recommendation/grog-recommendation-postprocess/src/main/resources/logback.xml
View file @
e5a9315
...
...
@@ -11,6 +11,7 @@
<logger
name=
"org.legrog"
level=
"DEBUG"
/>
<logger
name=
"org.legrog.recommendation.postprocess"
level=
"TRACE"
/>
<logger
name=
"org.legrog.recommendation.postprocess.PostprocessingExpert"
level=
"DEBUG"
/>
<root
level=
"warn"
>
<appender-ref
ref=
"STDOUT"
/>
...
...
grog-recommendation/grog-recommendation-process/src/main/resources/logback.xml
View file @
e5a9315
...
...
@@ -11,6 +11,7 @@
<logger
name=
"org.legrog"
level=
"DEBUG"
/>
<logger
name=
"org.legrog.recommendation.process"
level=
"TRACE"
/>
<logger
name=
"org.legrog.recommendation.process.ProcessingExpert"
level=
"DEBUG"
/>
<root
level=
"warn"
>
<appender-ref
ref=
"STDOUT"
/>
...
...
Please
register
or
login
to post a comment