MCPcopy
hub / github.com/shenweichen/DeepCTR-Torch / test_MLR

Function test_MLR

tests/models/MLR_test.py:34–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34def test_MLR():
35 model_name = "MLR"
36 region_x, y, region_feature_columns = get_test_data(
37 SAMPLE_SIZE, 3, 3, prefix='region')
38 base_x, y, base_feature_columns = get_test_data(
39 SAMPLE_SIZE, 3, 3, prefix='base')
40 bias_x, y, bias_feature_columns = get_test_data(
41 SAMPLE_SIZE, 3, 3, prefix='bias')
42
43 model = MLR(region_feature_columns, device=get_device())
44 model.compile('adam', 'binary_crossentropy',
45 metrics=['binary_crossentropy'])
46
47 check_model(model, model_name, region_x, y)
48 print(model_name + " test pass!")
49
50
51if __name__ == "__main__":

Callers

nothing calls this directly

Calls 5

MLRClass · 0.90
get_test_dataFunction · 0.85
check_modelFunction · 0.85
compileMethod · 0.80
get_deviceFunction · 0.50

Tested by

no test coverage detected