#Utility β = 1 r_threshold = 60 u = ut.LinearPlateauUtility(β, r_threshold) Rf = 0 # In[6]: print(ns) # In[9]: # True market R_true = NormalDistribution(8, 10) X_true = [1 / np.sqrt(2) * StudentTDistribution(ν=4) for _ in range(p)] M_true = synth.GaussianMarket(X_true, R_true) # Discretized market X, R = M_true.sample(n_true) M = synth.MarketDiscreteDistribution(X, R) # In[10]: # Real q∗ value computation p_star = pr.Problem(X, R, λ=0, u=u) p_star.solve() q_star = p_star.q # In[11]:
from model.distrs import E, Var, Std import model.synth_data as synth import model.utility as ut import model.problem as pr from helper.state import saver, loader from helper.plotting import plt l = AttrDict() l.p = 25 l.n_true = 50000 # Continuous market distribution R_true = NormalDistribution(8, 10) X_true = [StudentTDistribution(ν=4) for _ in range(l.p)] # EXᵢ = 0, Var(Xᵢ) = 1 l.M_true = synth.GaussianMarket(X_true, R_true) # constant corr(Xᵢ,R) = 1/p - ε # Discretized sampled distribution in order to have real q⋆ X, R = l.M_true.sample(l.n_true) l.M = synth.MarketDiscreteDistribution(X, R) l.n_experiments = 100 l.λ = 3 l.δ = 0.2 l.ns = np.arange(25, 2025, 25) l.Rf = 0 β = 1
from model.distrs import E,Var,Std import model.synth_data as synth import model.utility as ut import model.problem as pr from helper.state import saver,loader from helper.plotting import plt l = AttrDict() l.p = 25 l.n_true = 50000 # Continuous market distribution R_true = NormalDistribution(8,10) X_true = [StudentTDistribution(ν=4) for _ in range(l.p)] # EXᵢ = 0, Var(Xᵢ) = 1 l.M_true = synth.GaussianMarket(X_true,R_true) # constant corr(Xᵢ,R) = 1/p - ε # Discretized sampled distribution in order to have real q⋆ X,R = l.M_true.sample(l.n_true) l.M = synth.MarketDiscreteDistribution(X,R) l.n_experiments = 100 l.λ = 3 l.δ = 0.2 l.ns = np.arange(25,2025,25) l.Rf = 0 β = 1 r_threshold = 60 l.u = ut.LinearPlateauUtility(β,r_threshold)