|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlio.probdistributions.bitchain.BinaryProbDistribution
lio.probdistributions.bitchain.MarginalProbabilityVector
public class MarginalProbabilityVector
This class implements a probability distribution for binary elements assuming that all variables are independents. Thus, it uses a vector to store the marginal probabilities. *
Field Summary |
---|
Fields inherited from class lio.probdistributions.bitchain.BinaryProbDistribution |
---|
data, laplace, size |
Constructor Summary | |
---|---|
MarginalProbabilityVector()
|
Method Summary | |
---|---|
void |
convexCombination(double[] nMarginals,
double alpha)
Updates the probability vector by doing the convex combination with the one recevied a parameter. |
void |
convexCombination(MarginalProbabilityVector model,
double alpha)
Updates the probability vector by doing the convex combination with the one recevied a parameter. |
LiOResourceDefinition |
getDefinition()
Return a LiOResDescription object with the information of each object. |
double[] |
getMarginals()
Getter for property proVector. |
void |
learn(Individual[] individuals)
Learns a probability distribution from a set of data |
static void |
main(java.lang.String[] args)
Main method to test the task. |
static Individual[] |
sample(double[] pMarginals,
int nIndividuals)
Samples a population from a vector of marginal probabilities |
Individual[] |
sample(int nIndividuals)
Samples some individuals from a probability distribution |
Methods inherited from class lio.probdistributions.bitchain.BinaryProbDistribution |
---|
isLaplace, setLaplace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MarginalProbabilityVector()
Method Detail |
---|
public void learn(Individual[] individuals)
individuals
- Set of individiduals from which de distribution
is estimated.public Individual[] sample(int nIndividuals)
nIndividuals:
- Number of individuals that must be sampled.
public static Individual[] sample(double[] pMarginals, int nIndividuals)
public void convexCombination(double[] nMarginals, double alpha)
newProbVector
- New probability vector.alpha
- Learning Rate.public void convexCombination(MarginalProbabilityVector model, double alpha)
model
- Marginal Probabilty Vector used to update the current one.alpha
- Learning Rate.public LiOResourceDefinition getDefinition()
public static void main(java.lang.String[] args)
public double[] getMarginals()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |