Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
java-roc
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-roc
Commits
720bd77c
Commit
720bd77c
authored
6 years ago
by
a.croix
Browse files
Options
Downloads
Patches
Plain Diff
Add method to store RocCoordinates in CSV file
parent
a46cbaab
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
java-roc.iml
+6
-0
6 additions, 0 deletions
java-roc.iml
pom.xml
+8
-1
8 additions, 1 deletion
pom.xml
src/main/java/be/cylab/java/roc/Utils.java
+25
-0
25 additions, 0 deletions
src/main/java/be/cylab/java/roc/Utils.java
with
39 additions
and
1 deletion
java-roc.iml
+
6
−
0
View file @
720bd77c
...
...
@@ -18,6 +18,12 @@
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.jupiter:junit-jupiter-params:5.3.1"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.jupiter:junit-jupiter-engine:5.3.1"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.junit.platform:junit-platform-engine:1.3.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.opencsv:opencsv:4.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.commons:commons-lang3:3.6"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.commons:commons-text:1.1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: commons-beanutils:commons-beanutils:1.9.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: commons-logging:commons-logging:1.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: commons-collections:commons-collections:3.2.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.owlike:genson:1.4"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: info.debatty:java-aggregation:0.4"
level=
"project"
/>
<orderEntry
type=
"module-library"
>
...
...
This diff is collapsed.
Click to expand it.
pom.xml
+
8
−
1
View file @
720bd77c
...
...
@@ -47,6 +47,13 @@
<version>
5.3.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.opencsv
</groupId>
<artifactId>
opencsv
</artifactId>
<version>
4.1
</version>
</dependency>
<!-- Only for testing the last version of java-wowa-training -->
<dependency>
<groupId>
com.owlike
</groupId>
...
...
@@ -68,7 +75,7 @@
<systemPath>
${project.basedir}/../java-wowa-training/target/java-wowa-training-0.0.4-SNAPSHOT.jar
</systemPath>
</dependency>
</dependencies>
<!-- ________________________________________________________________________________________________________________________>
<!-- ________________________________________________________________________________________________________________________
--
>
<build>
<plugins>
<!-- leave this one first, to be sure we use this recent version -->
...
...
This diff is collapsed.
Click to expand it.
src/main/java/be/cylab/java/roc/Utils.java
+
25
−
0
View file @
720bd77c
package
be.cylab.java.roc
;
import
com.opencsv.CSVWriter
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
Utils
{
...
...
@@ -23,4 +29,23 @@ public class Utils {
}
return
negative_examples
;
}
public
static
void
storeRocCoordinatesInCSVFile
(
List
<
RocCoordinates
>
elements
,
String
filepath
)
{
File
file
=
new
File
(
filepath
);
try
{
FileWriter
outputfile
=
new
FileWriter
(
file
);
CSVWriter
writer
=
new
CSVWriter
(
outputfile
);
List
<
String
[]>
data
=
new
ArrayList
<>();
for
(
RocCoordinates
element
:
elements
)
{
String
[]
el
=
new
String
[]
{
Double
.
toString
(
element
.
getFalseAlarm
()),
Double
.
toString
(
element
.
getTrueDetection
())};
data
.
add
(
el
);
}
writer
.
writeAll
(
data
);
writer
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
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