public abstract class Fingrams
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
fileLocation
File location.
|
protected double[][] |
matrixFiringDegreesRulesXExamples
Matrix that stores the firing degrees examples by rules.
|
protected byte[][] |
matrixRulesXExamples
Matrix that stores the examples that fire the rules.
|
protected java.util.List<java.lang.Integer> |
numberAntecedents
Number of antecedents of the rules.
|
protected int |
numberExamples
Number of examples managed.
|
protected int |
numberRules
Number of rules of the system.
|
protected int |
numberUncoveredExamples
Variables to control the number of uncovered examples.
|
protected java.util.List<java.lang.String> |
possibleLabelConclusions
Set of label conclusions that can appear.
|
protected int |
relation
Relation.
|
protected boolean |
relationDirected
Type of relation.
|
protected java.util.List<java.lang.String> |
rulesIdentifiers
Rule identifier.
|
protected boolean |
ruleUncoveredExamples
Variables to control the uncovered examples.
|
protected java.util.List<java.util.List<java.lang.Double>> |
scaledSocialNetwork
Matrix that stores the scaled social network
|
protected java.util.List<java.util.List<java.lang.Double>> |
socialNetwork
Matrix that stores the complete social network
|
protected java.util.List<java.lang.String> |
textRules
Matrix that stores the text of the rules.
|
protected java.util.List<java.lang.Double> |
totalFiringDegrees
Vector that contains the total firing degrees of rules.
|
protected java.util.List<java.lang.Integer> |
uncoveredExamples
Uncovered examples.
|
Constructor and Description |
---|
Fingrams()
Default Constructor.
|
Fingrams(int relation,
java.lang.String fileLocation)
Parameter Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
buildConfGraphDotFile(java.lang.String file) |
protected abstract InfoNode |
calculateInfoNode(int n)
Constructs and returns an
InfoNode of the node with the given id. |
abstract java.lang.String |
createNodeUncoveredExamples() |
protected int |
elementsInCommon(byte[] rulei,
byte[] rulej) |
protected abstract void |
generateDirectedMatrix()
Generates the complete directed social network matrix with the list of examples covered by each rule.
|
void |
generateFingramImages(java.lang.String nameFile,
java.lang.String output,
java.lang.String drawing) |
void |
generateMatrix()
Generates the complete social network matrix
with the list of examples covered by each rule.
|
void |
generateScaledNetwork(java.lang.String origFile,
java.lang.String destFile,
int q) |
abstract void |
generateScienceMapFile(double MaxThr) |
protected void |
generateUndirectedMatrix()
Generates the complete undirected social network matrix with the list of examples covered by each rule.
|
java.lang.String |
getFileLocation()
Returns the files directory where every file will be stored.
|
byte[][] |
getMatrixRulesXExamples()
Returns the matrix that stores the examples that fire the rules.
|
java.util.List<java.lang.Integer> |
getNumberAntecedents()
Returns the number of antecedents of the rules.
|
int |
getNumberExamples()
Returns the number of examples managed.
|
int |
getNumberRules()
Returns the number of rules of the system.
|
java.util.List<java.lang.String> |
getPossibleLabelConclusions()
Returns the Set of label conclusions that can appear.
|
java.util.List<java.lang.String> |
getRulesIdentifiers()
Returns the Rules identifiers
|
java.util.List<java.util.List<java.lang.Double>> |
getScaledSocialNetwork()
Returns the matrix that stores the scaled social network
|
java.util.List<java.util.List<java.lang.Double>> |
getSocialNetwork()
Returns the matrix that stores the complete social network.
|
java.util.List<java.lang.String> |
getTextRules()
Returns the matrix that stores the text of all the rules.
|
java.util.List<java.lang.Double> |
getTotalFiringDegrees()
Returns the Vector that contains the total firing degrees of rules.
|
int |
getTypeRelation()
Returns the Relation value.
|
abstract boolean |
hasRuleUncoveredExamples() |
protected boolean |
isCoveringExamples(byte[] rule) |
abstract int |
loadInfoFromFS()
Loads all the information needed for the Fingrams object, setting all its variables,
from a .fs file located on fileLocation.
|
abstract void |
printFingramsLegend() |
void |
writeToFileNetwork(java.util.List<java.util.List<java.lang.Double>> parameterSocialNetwork,
java.lang.String nameFile,
java.lang.String nameFileAux) |
protected java.util.List<java.lang.String> textRules
protected java.util.List<java.util.List<java.lang.Double>> socialNetwork
protected java.util.List<java.util.List<java.lang.Double>> scaledSocialNetwork
protected byte[][] matrixRulesXExamples
protected double[][] matrixFiringDegreesRulesXExamples
protected java.util.List<java.lang.Double> totalFiringDegrees
protected int numberRules
protected int numberExamples
protected java.util.List<java.lang.Integer> numberAntecedents
protected java.util.List<java.lang.String> possibleLabelConclusions
protected java.util.List<java.lang.String> rulesIdentifiers
protected int relation
protected boolean relationDirected
protected java.lang.String fileLocation
protected boolean ruleUncoveredExamples
protected int numberUncoveredExamples
protected java.util.List<java.lang.Integer> uncoveredExamples
public Fingrams()
public Fingrams(int relation, java.lang.String fileLocation)
relation
- given relation value.fileLocation
- directory where to store every resultant file.public java.util.List<java.lang.String> getTextRules()
public java.util.List<java.util.List<java.lang.Double>> getSocialNetwork()
public java.util.List<java.util.List<java.lang.Double>> getScaledSocialNetwork()
public byte[][] getMatrixRulesXExamples()
public int getNumberRules()
public int getNumberExamples()
public java.util.List<java.lang.Integer> getNumberAntecedents()
public java.util.List<java.lang.String> getPossibleLabelConclusions()
public java.util.List<java.lang.String> getRulesIdentifiers()
public int getTypeRelation()
public java.util.List<java.lang.Double> getTotalFiringDegrees()
public java.lang.String getFileLocation()
protected abstract InfoNode calculateInfoNode(int n)
InfoNode
of the node with the given id.
This InfoNode object stores graphical information of a node used when the Figrams are displayed.n
- given id of the node.public abstract int loadInfoFromFS()
public void generateMatrix()
public java.lang.String buildConfGraphDotFile(java.lang.String file)
public void generateScaledNetwork(java.lang.String origFile, java.lang.String destFile, int q)
public void generateFingramImages(java.lang.String nameFile, java.lang.String output, java.lang.String drawing)
public void writeToFileNetwork(java.util.List<java.util.List<java.lang.Double>> parameterSocialNetwork, java.lang.String nameFile, java.lang.String nameFileAux)
protected void generateUndirectedMatrix()
protected abstract void generateDirectedMatrix()
protected int elementsInCommon(byte[] rulei, byte[] rulej)
protected boolean isCoveringExamples(byte[] rule)
public abstract void generateScienceMapFile(double MaxThr)
public abstract java.lang.String createNodeUncoveredExamples()
public abstract boolean hasRuleUncoveredExamples()
public abstract void printFingramsLegend()