Skip to content

Errors noticed #11

@eyo11

Description

@eyo11

For the truncated Gaussians notebook, the line for target_expectations seems wrong. You are using:
target_expectations = [f0(mv).mean(), f1(mv).mean()]

when you only want the second constraint to be 1, not the mean. The next question is the one that asks for the second constraint to be the mean. So, this should be used for target_expectations.
target_expectations = [f0(mv).mean(),1]

In the Loaded die notebook, this is used:
model = maxentropy.Model(samplespace)

When Model requires more than 1 argument and therefore gives an error in the notebook. Should be:
model = maxentropy.Model(f,samplespace)

In the same notebook, this is used:
model.fit(f, K)
Which gives an error, and should be just:
model.fit(K)

Also, I don't understand why the Model class has "if self.priorlogprobs is not None" i.e it's checking for priorlogprobs, when it doesn't even accept priorlogprobs in its parameter list.
Do the Model and BigModel class have any use? It seems the MinDivergenceModel and MCMinDivergenceModel rely only on BaseModel. Can Model and BigModel be deleted, without affecting the code?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions