@@ -22,9 +22,7 @@ First, import some useful libraries
2222``` python tags=[]
2323import warnings
2424# warnings.filterwarnings('error')
25- ```
2625
27- ``` python tags=[]
2826% reload_ext autoreload
2927% autoreload 2
3028
@@ -33,21 +31,21 @@ from IPython.display import Image
3331import pandas as pd
3432from datetime import datetime
3533import numpy as np
36- import hyperopt as ho
34+ from skopt.space import Real, Integer, Categorical
3735np.random.seed(1234 )
3836from matplotlib import pyplot as plt
3937import matplotlib.ticker as plticker
4038
4139tab10 = plt.get_cmap(" tab10" )
4240plt.rcParams.update({' font.size' : 18 })
4341
44-
4542from sklearn.linear_model import LinearRegression
4643
4744from qolmat.benchmark import comparator, missing_patterns
4845from qolmat.imputations import imputers
4946from qolmat.utils import data, utils, plot
5047
48+
5149```
5250
5351### ** I. Load data**
@@ -124,15 +122,15 @@ imputer_residuals = imputers.ImputerResiduals(groups=("station",), period=365, m
124122imputer_rpca = imputers.ImputerRpcaNoisy(groups = (" station" ,), columnwise = False , max_iterations = 500 , tau = .01 , lam = 5 , rank = 1 )
125123imputer_rpca_opti = imputers.ImputerRpcaNoisy(groups = (" station" ,), columnwise = False , max_iterations = 256 )
126124dict_config_opti[" RPCA_opti" ] = {
127- " tau" : ho.hp.uniform( " tau " , low = .5 , high = 5 ),
128- " lam" : ho.hp.uniform( " lam " , low = .1 , high = 1 ),
125+ " tau" : Real( 0.5 , 5.0 , name = " tau " ),
126+ " lam" : Real( 0.1 , 1.0 , name = " lam " ),
129127}
130128imputer_rpca_opticw = imputers.ImputerRpcaNoisy(groups = (" station" ,), columnwise = False , max_iterations = 256 )
131129dict_config_opti[" RPCA_opticw" ] = {
132- " tau/TEMP" : ho.hp.uniform( " tau/TEMP " , low = .5 , high = 5 ),
133- " tau/PRES" : ho.hp.uniform( " tau/PRES " , low = .5 , high = 5 ),
134- " lam/TEMP" : ho.hp.uniform( " lam/TEMP " , low = .1 , high = 1 ),
135- " lam/PRES" : ho.hp.uniform( " lam/PRES " , low = .1 , high = 1 ),
130+ " tau/TEMP" : Real( 0.5 , 5.0 , name = " tau/TEMP " ),
131+ " tau/PRES" : Real( 0.5 , 5.0 , name = " tau/PRES " ),
132+ " lam/TEMP" : Real( 0.1 , 1.0 , name = " lam/TEMP " ),
133+ " lam/PRES" : Real( 0.1 , 1.0 , name = " lam/PRES " ),
136134}
137135
138136imputer_normal_sample = imputers.ImputerEM(groups = (" station" ,), model = " multinormal" , method = " sample" , max_iter_em = 8 , n_iter_ou = 128 , dt = 4e-2 )
0 commit comments