Skip to content

Commit

Permalink
Benchmark regression 2 with larger dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesYang007 committed May 14, 2020
1 parent b42d684 commit 1f74394
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if (NOT CMAKE_BUILD_TYPE)
# if binary directory ends with "release", use release mode
if (${PROJECT_BINARY_DIR} MATCHES "release$")
set(CMAKE_BUILD_TYPE RELEASE)
add_compile_options(-march=native -O3)
# otherwise, use debug mode
else()
set(CMAKE_BUILD_TYPE DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/regression_autoppl_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace ppl {

static void BM_Regression(benchmark::State& state) {
constexpr size_t num_samples = 1000;
constexpr size_t n_data = 10000;
constexpr size_t n_data = 30000;

std::array<std::string, 4> headers = {"b", "x1", "x2", "x3"};

Expand Down
2 changes: 1 addition & 1 deletion benchmark/regression_stan_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pandas as pd
import numpy as np

N = 10000
N = 30000
X = np.random.normal(loc=[-1, 0, 1], scale=1.4, size=(N, 3))
w_true = np.array([1.4, 2., 0.32])
y = X.dot(w_true) + np.random.normal(loc=0., scale=1.0, size=N)
Expand Down

0 comments on commit 1f74394

Please sign in to comment.