Class Instance<U>
java.lang.Object
es.uam.eps.ir.relison.links.data.letor.Instance<U>
- Type Parameters:
U
- Type of the users of the graph.
public class Instance<U>
extends java.lang.Object
Machine learning individual pattern.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description int
getCategory()
Gets the class of the pattern.U
getDest()
Get the destination node.U
getOrigin()
Get the origin node.double
getValue(int attrId)
Gets the value for a certain attribute.java.util.List<java.lang.Double>
getValues()
Gets the list of values for the different attributes in the pattern.
-
Field Details
-
u
Origin node. -
v
Destination node. -
category
private int categoryCategory. -
values
private final java.util.List<java.lang.Double> valuesList of values. -
ERROR_CLASS
public static final int ERROR_CLASSValue to apply when the class is unknown or undefined.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Instance
Constructor.- Parameters:
u
- origin user.v
- destination user.values
- list that contains the values of the attributes.category
- class which the pattern belongs to.
-
Instance
Constructor.This is useful if you do not want to assign a class to the pattern.- Parameters:
u
- origin user.v
- destination user.values
- list that contains the values of the attributes.
-
-
Method Details
-
getValues
public java.util.List<java.lang.Double> getValues()Gets the list of values for the different attributes in the pattern.- Returns:
- the list of attribute values.
-
getValue
public double getValue(int attrId)Gets the value for a certain attribute.- Parameters:
attrId
- index of the attribute- Returns:
- the value of the attribute.
-
getCategory
public int getCategory()Gets the class of the pattern.- Returns:
- the class of the pattern.
-
getOrigin
Get the origin node.- Returns:
- the origin node.
-
getDest
Get the destination node.- Returns:
- the destination node.
-