Ejemplo n.º 1
0
 def __init__(self):
     self.feature_vec = [
         features.LinearX1(),
         features.LinearX2(),
         features.SquareX1(),
         features.ExpX2(),
         features.LogX1(),
         features.Identity()
     ]
     self.feature_weights = [1, 2, 1, 0.1, 10, 40]
     self.noise_model = noise.NoiseModel()
     self.max_x1 = 10
     self.max_x2 = 10
     self.saver = saver.DataSaver('data', 'data_samples.pkl')
 lm[part] = model.LinearRegressionModel()
 # TODO use and select the new features
 lm[part].set_feature_vector([
     features.LinearX1(),
     features.LinearX2(),
     features.LinearX3(),
     features.LinearX4(),
     features.SquareX1(),
     features.SquareX2(),
     features.SquareX3(),
     features.SquareX4(),
     features.ExpX1(),
     features.ExpX2(),
     features.ExpX3(),
     features.ExpX4(),
     features.LogX1(),
     features.LogX2(),
     features.LogX3(),
     features.LogX4(),
     features.SinX1(),
     features.SinX2(),
     features.SinX3(),
     features.SinX4(),
     # features.X1Cube(), features.X2Cube(),
     # features.X3Cube(), features.X4Cube(),
     # features.TanX1(), features.TanX2(),
     # features.TanX3(), features.TanX4(),
     # features.X1OverX2(), features.X1OverX3(),
     # features.X1OverX4(), features.X2OverX3(),
     # features.X2OverX4(), features.X3OverX4(),
     features.CrossTermX1X2(),