Esempio n. 1
0
def test_ridge(data):
    model = MetaModel().readCSV(data)
    model.setResponse("Electricity:Facility [J](Hourly)")
    model.addPredictor("Environment:Site Outdoor Air Drybulb Temperature [C](Hourly)")
    model.addPredictor("Environment:Site Outdoor Air Humidity Ratio [kgWater/kgDryAir](Hourly)")

    model.bayesRidge().getScores()
    print(model.scores)
Esempio n. 2
0
def test_persist(data):
    model = MetaModel().readCSV(data)
    model.setResponse("Electricity:Facility [J](Hourly)")
    model.addPredictor("Environment:Site Outdoor Air Drybulb Temperature [C](Hourly)")
    model.addPredictor("Environment:Site Outdoor Air Humidity Ratio [kgWater/kgDryAir](Hourly)")

    model.fitSVR(cost=10, epsilon=0.2).getScores()

    model.persistMeta('testPickle.p')
    newModel = pickle.load(open('testPickle.p', 'rb'))
    print(newModel.scores)
Esempio n. 3
0
def test_all(data):
    model = MetaModel().readCSV(data)
    model.setResponse("Electricity:Facility [J](Hourly)")
    model.addPredictor("Environment:Site Outdoor Air Drybulb Temperature [C](Hourly)")
    model.addPredictor("Environment:Site Outdoor Air Humidity Ratio [kgWater/kgDryAir](Hourly)")
    model.addPredictor("BASEMENT:Zone Thermostat Heating Setpoint Temperature [C](Hourly)")
    model.addPredictor("CORE_MID:Zone Thermostat Heating Setpoint Temperature [C](Hourly)")
    model.addPredictor("CORE_TOP:Zone Thermostat Cooling Setpoint Temperature [C](Hourly)")

    model.bayesRidge().fitSVR(cost=10, epsilon=0.2).trees(numberOfTrees=300).getScores()
    print(model.scores)
    model.fit(model.SVR)
    model.persistMeta('../../data/demoMeta.p')
Esempio n. 4
0
def test_setResponse():
    model = MetaModel()
    model.setResponse("energy")
    print (model.response)