Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Krug
EfficientRuleLearning
Commits
ae69e02e
Commit
ae69e02e
authored
Sep 30, 2016
by
Markus Krug
Browse files
initial upload
*contains 3 Projects, 2 of those are still empty
parents
Changes
27
Hide whitespace changes
Inline
Side-by-side
de.uniwue.ls6.rulelearning/.classpath
0 → 100644
View file @
ae69e02e
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
output=
"target/classes"
path=
"src/main/java"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"target/test-classes"
path=
"src/test/java"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
de.uniwue.ls6.rulelearning/.gitignore
0 → 100644
View file @
ae69e02e
/target/
de.uniwue.ls6.rulelearning/.project
0 → 100644
View file @
ae69e02e
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
de.uniwue.ls6.rulelearning
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.m2e.core.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
</natures>
</projectDescription>
de.uniwue.ls6.rulelearning/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
ae69e02e
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
de.uniwue.ls6.rulelearning/.settings/org.eclipse.m2e.core.prefs
0 → 100644
View file @
ae69e02e
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
de.uniwue.ls6.rulelearning/DataStructure/.classpath
0 → 100644
View file @
ae69e02e
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
de.uniwue.ls6.rulelearning/DataStructure/.project
0 → 100644
View file @
ae69e02e
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
DataStructure
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.m2e.core.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
de.uniwue.ls6.rulelearning/DataStructure/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
ae69e02e
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
de.uniwue.ls6.rulelearning/DataStructure/.settings/org.eclipse.m2e.core.prefs
0 → 100644
View file @
ae69e02e
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
de.uniwue.ls6.rulelearning/DataStructure/pom.xml
0 → 100644
View file @
ae69e02e
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
de.uniwue.ls6.rulelearning
</groupId>
<artifactId>
DataStructure
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<parent>
<groupId>
de.uniwue.ls6.rulelearning
</groupId>
<relativePath>
../
</relativePath>
<artifactId>
ruleLearningParent
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<dependencies>
<dependency>
<groupId>
com.googlecode.matrix-toolkits-java
</groupId>
<artifactId>
mtj
</artifactId>
<version>
1.0.2
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
de.uniwue.ls6.rulelearning/DataStructure/src/de/uniwue/ls6/datastructure/Instance.java
0 → 100644
View file @
ae69e02e
package
de.uniwue.ls6.datastructure
;
public
class
Instance
{
/*
* a datapoint to CLASSIFY
*/
//featureset
private
int
[][]
featureArray
;
private
int
label
;
public
Instance
(
int
nrRows
,
int
nrCols
)
{
super
();
featureArray
=
new
int
[
nrRows
][
nrCols
];
}
public
Instance
(
int
nrRows
,
int
nrCols
,
int
label
)
{
super
();
featureArray
=
new
int
[
nrRows
][
nrCols
];
this
.
label
=
label
;
}
public
int
getLabel
()
{
return
label
;
}
public
void
setLabel
(
int
label
)
{
this
.
label
=
label
;
}
public
int
[][]
getFeatureArray
()
{
return
featureArray
;
}
}
de.uniwue.ls6.rulelearning/DataStructure/src/de/uniwue/ls6/datastructure/LabelAlphabet.java
0 → 100644
View file @
ae69e02e
package
de.uniwue.ls6.datastructure
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
public
class
LabelAlphabet
{
/*
* maps between String and ints
*/
private
static
Map
<
String
,
Integer
>
featureToIdMap
=
new
ConcurrentHashMap
<
String
,
Integer
>();
private
static
Map
<
Integer
,
String
>
idToFeatureMap
=
new
ConcurrentHashMap
<
Integer
,
String
>();
private
LabelAlphabet
()
{
}
public
static
synchronized
int
getIdToFeature
(
String
feature
)
{
Integer
integer
=
featureToIdMap
.
get
(
feature
);
if
(
integer
!=
null
)
{
return
integer
;
}
else
{
int
size
=
featureToIdMap
.
size
();
addToMaps
(
feature
,
size
);
return
size
;
}
// TODO MAX INT OVERFLOW SO BAD!
}
public
static
String
getFeatureToId
(
int
id
)
{
String
feature
=
idToFeatureMap
.
get
(
id
);
if
(
feature
!=
null
)
{
return
feature
;
}
return
null
;
}
private
static
void
addToMaps
(
String
feature
,
int
value
)
{
featureToIdMap
.
put
(
feature
,
value
);
idToFeatureMap
.
put
(
value
,
feature
);
}
}
de.uniwue.ls6.rulelearning/DataStructure/src/de/uniwue/ls6/datastructure/MatrixMcMatrixFace.java
0 → 100644
View file @
ae69e02e
package
de.uniwue.ls6.datastructure
;
import
no.uib.cipr.matrix.sparse.FlexCompColMatrix
;
public
class
MatrixMcMatrixFace
{
/*
* contains obviously (as indicated by the name) exactly 2 matrices
*/
private
FlexCompColMatrix
tpMatrix
;
private
FlexCompColMatrix
fpMatrix
;
private
int
goldLabel
;
public
MatrixMcMatrixFace
(
int
amountFeatures
,
int
windowSize
,
int
goldLabel
)
{
tpMatrix
=
new
FlexCompColMatrix
(
amountFeatures
,
windowSize
);
fpMatrix
=
new
FlexCompColMatrix
(
amountFeatures
,
windowSize
);
this
.
goldLabel
=
goldLabel
;
}
public
void
addInstance
(
Instance
...
instances
)
{
for
(
Instance
i
:
instances
)
{
int
[][]
featureArray
=
i
.
getFeatureArray
();
// for each column, #columns == windowsize
// l2r t2B
for
(
int
col
=
0
;
col
<
featureArray
[
0
].
length
;
col
++)
{
for
(
int
row
=
0
;
row
<
featureArray
.
length
;
row
++)
{
if
(
goldLabel
==
i
.
getLabel
()){
//add to TP matrix
addToMatrix
(
featureArray
[
row
][
col
],
col
,
tpMatrix
);
}
else
{
//add to FP matrix
addToMatrix
(
featureArray
[
row
][
col
],
col
,
fpMatrix
);
}
}
}
}
}
private
void
addToMatrix
(
int
feature
,
int
windowcolumn
,
FlexCompColMatrix
matrix
)
{
matrix
.
add
(
feature
,
windowcolumn
,
1
);
}
/*
* 1. Differenzmatrix ausrechnen => Best Score ist Max(Matrix)
* 2. Setze Werte auf Sparse wenn Summe von TP un FP <=? MaxScore
* 3. Expansion der Matrix (Gruppierung von n+1 Windowelementen) (ber alle Instanzen gehen)
*/
}
de.uniwue.ls6.rulelearning/DataStructure/target/.gitignore
0 → 100644
View file @
ae69e02e
/classes/
de.uniwue.ls6.rulelearning/Evaluation/.classpath
0 → 100644
View file @
ae69e02e
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
path=
"src"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
de.uniwue.ls6.rulelearning/Evaluation/.project
0 → 100644
View file @
ae69e02e
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
Evaluation
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.m2e.core.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
</natures>
</projectDescription>
de.uniwue.ls6.rulelearning/Evaluation/.settings/org.eclipse.jdt.core.prefs
0 → 100644
View file @
ae69e02e
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
de.uniwue.ls6.rulelearning/Evaluation/.settings/org.eclipse.m2e.core.prefs
0 → 100644
View file @
ae69e02e
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
de.uniwue.ls6.rulelearning/Evaluation/pom.xml
0 → 100644
View file @
ae69e02e
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
de.uniwue.ls6.rulelearning
</groupId>
<artifactId>
Evaluation
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<parent>
<groupId>
de.uniwue.ls6.rulelearning
</groupId>
<relativePath>
../
</relativePath>
<artifactId>
ruleLearningParent
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
</project>
\ No newline at end of file
de.uniwue.ls6.rulelearning/Evaluation/target/.gitignore
0 → 100644
View file @
ae69e02e
/classes/
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment