Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(8)  |  Derive(0)  |  Import(5)

src/s/t/StochasticBlockmodel-HEAD/test_sparse.py   StochasticBlockmodel(Download)
 
from Network import Network
from Models import Stationary, StationaryLogistic, NonstationaryLogistic
 
# Parameters
for name, model, use_covs in [('Stationary', Stationary(), False),
                              ('Stationary', StationaryLogistic(), True),
                              ('Nonstationary', NonstationaryLogistic(), False),
                              ('Nonstationary', NonstationaryLogistic(), True)]:
    print name

src/s/t/StochasticBlockmodel-HEAD/test_minimal.py   StochasticBlockmodel(Download)
 
from Network import Network
from Models import NonstationaryLogistic, alpha_unif
from Experiment import RandomSubnetworks
from numpy.random import normal
 
# Initialize the data model; generate covariates and associated coefficients
data_model = NonstationaryLogistic()
data_model.kappa = -7.0
covariates = ['x_1', 'x_2', 'x_3', 'x_4', 'x_5']
 
# Initialize the fit model; specify which covariates it should have terms for
fit_model = NonstationaryLogistic()
for covariate in covariates:
    fit_model.beta[covariate] = None

src/s/t/StochasticBlockmodel-HEAD/test_laplace.py   StochasticBlockmodel(Download)
 
from Network import Network
from Models import StationaryLogistic, NonstationaryLogistic, alpha_unif
from Experiment import RandomSubnetworks
from Utility import draw_confidence
 
# Initialize the data model; generate covariates and associated coefficients
data_model = NonstationaryLogistic()
data_model.kappa = -7.0
covariates = ['x_1', 'x_2'] # , 'x_3', 'x_4', 'x_5']

src/s/t/StochasticBlockmodel-HEAD/test_beta.py   StochasticBlockmodel(Download)
from Network import Network
from Models import IndependentBernoulli
from Models import StationaryLogistic, NonstationaryLogistic
from Experiment import RandomSubnetworks, Results, add_network_stats
from Utility import logit
 
if params['fit_nonstationary']:
    fit_model = NonstationaryLogistic()
else:
    fit_model = StationaryLogistic()

src/s/t/StochasticBlockmodel-HEAD/test.py   StochasticBlockmodel(Download)
 
from Network import Network
from Models import StationaryLogistic, NonstationaryLogistic
from Models import alpha_zero, alpha_norm, alpha_unif, alpha_gamma
from Experiment import RandomSubnetworks, Results, add_network_stats
 
# Generate covariates and associated coefficients
data_model = NonstationaryLogistic()
covariates = []
for b in range(params['B']):
 
if params['fit_nonstationary']:
    fit_model = NonstationaryLogistic()
else:
    fit_model = StationaryLogistic()