예제 #1
0
파일: test_meta.py 프로젝트: sarocu/smpc
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)
예제 #2
0
파일: test_meta.py 프로젝트: sarocu/smpc
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')