NORDic DR module

NORDic.NORDic_DR.bandits module

class NORDic.NORDic_DR.bandits.AdaHedge(K)

Bases: Learner

act()
incur(w)
class NORDic.NORDic_DR.bandits.Greedy(K)

Bases: Learner

act()
incur(w)
class NORDic.NORDic_DR.bandits.Learner(K, name='UnimplementedLearner')

Bases: object

act()
incur(w)
class NORDic.NORDic_DR.bandits.LinGapE(method_args)

Bases: Misspecified

apply(problem, greedy_sampling=True, lambda_val=1.0)
greedy(problem, b_t, c_t, Vinv)
optimized(problem, b_t, c_t, Vinv)
stopping_rule()
update(problem, candidates, Vinv, b)
class NORDic.NORDic_DR.bandits.MisLid(method_args)

Bases: Misspecified

apply(problem, precision=1e-07)
best_answer(means)
stopping_rule(quiet=True)
update(problem, candidates, Vinv, b, Vinv_val=None)
class NORDic.NORDic_DR.bandits.Misspecified(method_args)

Bases: object

clear()
run(problem, nsimu, run_id=None, quiet=False)
sample(problem, candidates)
NORDic.NORDic_DR.bandits.gaussian(X, delta, sigma, c)
NORDic.NORDic_DR.bandits.heuristic(X, delta, sigma, c)
NORDic.NORDic_DR.bandits.misspecified(X, delta, sigma, c)
NORDic.NORDic_DR.bandits.subheuristic(X, delta, sigma, c)

NORDic.NORDic_DR.functions module

NORDic.NORDic_DR.functions.adaptive_testing(network_name, signatures, targets, score, states, simu_params={}, bandit_args={}, reward_fname=None, quiet=False)

Perform adaptive testing and recommends most promising treatments (=maximizing score)

Parameters

network_namePython character string

(relative) path to a network .BNET file

signaturesPandas DataFrame

rows/[features] x columns/[drugs to test]

targetsPandas DataFrame

rows/[genes] x columns/[drugs to test] (either 1: active expression, -1: inactive expression, 0: undetermined expression)

scorePython object

scoring of attractors

statesPandas DataFrame

rows/[gene] x columns/[patient samples] (either 1: activatory, -1: inhibitory, 0: no regulation).

simu_params: Python dictionary

[default={}] : arguments to MPBN-SIM

bandit_paramsPython dictionary

[default={}] : arguments to the bandit algorithms

reward_fnamePython character string

[default=None] : path to a reward matrix rows/[patients] x columns/[drugs]

quietPython bool

[default=False] : prints verbose

Returns

empirical_recPandas DataFrame

rows/[drugs to test] x column/[“Frequency”], the percentage of times across all simulations at the end of which the considered drug is recommended

class NORDic.NORDic_DR.functions.testing_problem(signatures, problem_args)

Bases: object

reward(arm)

NORDic.NORDic_DR.utils module

NORDic.NORDic_DR.utils.argmax_m(ls, m)
NORDic.NORDic_DR.utils.barycentric_spanner(X, C=1, quiet=True, precision=1e-06)
NORDic.NORDic_DR.utils.c_kt(direction, problem, na, t, Vinv, M, c, x=None, confidence_width=None, cnorm=None)
NORDic.NORDic_DR.utils.closest_alternative(problem, b, means, theta, eta, w, c, S_t, constraint='L_inf', subsample=False, alternative_arms=[])
NORDic.NORDic_DR.utils.cnorm(x, norm='L_inf')
NORDic.NORDic_DR.utils.lambert(y, approx=False)
NORDic.NORDic_DR.utils.mahalanobis(x, M, power=1)
NORDic.NORDic_DR.utils.optimistic_gradient(problem, Vinv, mu, lambda_, na, t, M, c, gain_type, x=None)
NORDic.NORDic_DR.utils.projection(Vinv, b, x_hat, X, nb_pulls, c)
NORDic.NORDic_DR.utils.quadprog_solve_qp(P, q, G=None, h=None, A=None, b=None)
NORDic.NORDic_DR.utils.randf(ls, m, f)
NORDic.NORDic_DR.utils.sherman_morrison(M, x)
NORDic.NORDic_DR.utils.solve_alternative_quadprog(problem, b, theta_emp, eta_emp, a, i_t, w, epsilon, constraint=None)
NORDic.NORDic_DR.utils.tracking_rule(w, sum_w, na, t, tracking_type, forced_exploration=False)
NORDic.NORDic_DR.utils.update_misspecified(problem, candidates, Vinv, b, c, na, rewards, Vinv_val=None)