coniii.mean_field_ising module

coniii.mean_field_ising.FHomogeneous(h, J, N, m)

Use Hubbard-Stratonovich (auxiliary field) to calculate the (free energy?) of a homogeneous system as a function of the field m (m equals the mean field as N -> infinity?).

coniii.mean_field_ising.JfullFromCluster(Jcluster, cluster, N)

NOTE: There is perhaps a faster way of doing this?

coniii.mean_field_ising.JmeanField(coocMat, **kwargs)

See SmeanField for important optional arguments, including noninteracting prior weighting.

coniii.mean_field_ising.SHomogeneous(h, J, N)

Use Hubbard-Stratonovich (auxiliary field) to numerically calculate entropy of a homogeneous system.

coniii.mean_field_ising.SmeanField(cluster, coocMat, meanFieldPriorLmbda=0.0, numSamples=None, indTerm=True, alternateEnt=False, useRegularizedEq=True)

meanFieldPriorLmbda (0.): 3.23.2014 indTerm (True) : As of 2.19.2014, I’m not

sure whether this term should be included, but I think so
alternateEnt (False) : Explicitly calculate entropy
using the full partition function
useRegularizedEq (True) : Use regularized form of equation
even when meanFieldPriorLmbda = 0.
coniii.mean_field_ising.aboveDiagFlat(mat, keepDiag=False, offDiagMult=None)

Return a flattened list of all elements of the matrix above the diagonal.

Use offDiagMult = 2 for symmetric J matrix.

coniii.mean_field_ising.analyticEntropy(J)

In nats.

coniii.mean_field_ising.avgE(h, J, ell, T)
coniii.mean_field_ising.avgmHomogeneous(h, J, N)
coniii.mean_field_ising.avgxHomogeneous(h, J, N)
coniii.mean_field_ising.coocCluster(coocMat, cluster)

Sort coocMat by the cluster indices

coniii.mean_field_ising.coocExpectations(J, hext=0, zeroBelowDiag=True, minSize=0)
coniii.mean_field_ising.coocMatBayesianMean(coocMat, numFights)

Using “Laplace’s method”

coniii.mean_field_ising.coocSampleCovariance(samples, bayesianMean=True, includePrior=True)
includePrior (True) : Include diagonal component corresponding
to ell*(ell-1)/2 prior residuals for interaction parameters
coniii.mean_field_ising.coocStdevsFlat(coocMat, numFights)

Returns a flattened expected standard deviation matrix used to divide deltaCooc to turn it into z scores.

coniii.mean_field_ising.cooccurrence_matrix(samples, keep_diag=True)

Matrix of pairwise correlations. Only upper right triangle is filled.

samples : ndarray keep_diag : bool, True

If True, diagonal is filled with ones. Else zeros.

ndarray

coniii.mean_field_ising.dFdT(h, J, N, m)
coniii.mean_field_ising.diagFlatIndex(i, j, ell)

Should have j>=i…

coniii.mean_field_ising.dmdT(h, J, ell, T)
coniii.mean_field_ising.fightPossibilities(ell, minSize=0)
coniii.mean_field_ising.findJmatrixAnalytic_CoocMat(coocMatData, Jinit=None, bayesianMean=False, numSamples=None, priorLmbda=0.0, minSize=0)
coniii.mean_field_ising.fourthOrderCoocMat(samples, slowMethod=True)
coniii.mean_field_ising.independentEntropyHomogeneous(h, J, N)
coniii.mean_field_ising.independentEntropyHomogeneous2(h, J, N)
coniii.mean_field_ising.isingDeltaCooc(isingSamples, coocMatDesired)
coniii.mean_field_ising.logCosh(x)
coniii.mean_field_ising.m(h, J, ell, T)

Careful if T is small for loss of precision?

coniii.mean_field_ising.meanFieldStability(J, freqs)
coniii.mean_field_ising.multiInfoHomogeneous(h, J, N)
coniii.mean_field_ising.replaceDiag(mat, lst)
coniii.mean_field_ising.seedGenerator(seedStart, deltaSeed)
coniii.mean_field_ising.specificHeat(h, J, ell, T)
coniii.mean_field_ising.susc(h, J, ell, T)
coniii.mean_field_ising.symmetrizeUsingUpper(mat)
coniii.mean_field_ising.unflatten(flatList, ell, symmetrize=False)

Inverse of aboveDiagFlat with keepDiag=True.

coniii.mean_field_ising.unsummedLogZ(J, hext=0, minSize=0)

J should have h on the diagonal.

coniii.mean_field_ising.unsummedZ(J, hext=0, minSize=0)

J should have h on the diagonal.

coniii.mean_field_ising.zeroDiag(mat)