Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyduan committed Sep 10, 2018
1 parent 41b8a3b commit 7a2ddd3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions experiments/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"naval": lambda: pd.read_csv("data/uci/naval-propulsion.csv", delim_whitespace=True, header=None).iloc[:,:-1],
"power": lambda: pd.read_excel("data/uci/power-plant.xlsx"),
"energy": lambda: pd.read_excel("https://archive.ics.uci.edu/ml/machine-learning-databases/00242/ENB2012_data.xlsx").iloc[:,:-1],
"protein": lambda: pd.read_csv("data/uci/protein.csv")[['F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'RMSD']]],
}

base_name_to_learner = {
Expand Down Expand Up @@ -74,15 +75,15 @@ def save(self):
self.print_results()
time = datetime.datetime.now()
outfile = open("results/regression/logs_%s_%s.pkl" %
(self.name, time.strftime("%Y-%m-%d-%H:%M")), "wb")
(self.name, self.args.score) "wb")
pickle.dump(self, outfile)


if __name__ == "__main__":

argparser = ArgumentParser()
argparser.add_argument("--dataset", type=str, default="housing")
argparser.add_argument("--n_est", type=int, default=250)
argparser.add_argument("--n_est", type=int, default=350)
argparser.add_argument("--lr", type=float, default=0.01)
argparser.add_argument("--score", type=str, default="CRPS")
argparser.add_argument("--base", type=str, default="tree")
Expand All @@ -96,7 +97,6 @@ def save(self):
X, y = data.iloc[:,:-1].values, data.iloc[:,-1].values

# set default minibatch fraction based on dataset size
breakpoint()
if not args.minibatch_frac:
args.minibatch_frac = min(0.5, 5000 / len(X))

Expand Down
9 changes: 9 additions & 0 deletions scripts/run_all_regression_crps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/bash
python3 -m experiments.regression --dataset housing --score=CRPS
python3 -m experiments.regression --dataset concrete --score=CRPS
python3 -m experiments.regression --dataset wine --score=CRPS
python3 -m experiments.regression --dataset kin8nm --score=CRPS
python3 -m experiments.regression --dataset naval --score=CRPS
python3 -m experiments.regression --dataset power --score=CRPS
python3 -m experiments.regression --dataset energy --score=CRPS
python3 -m experiments.regression --dataset protein --score=CRPS
9 changes: 9 additions & 0 deletions scripts/run_all_regression_mle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/bash
python3 -m experiments.regression --dataset housing --score=MLE
python3 -m experiments.regression --dataset concrete --score=MLE
python3 -m experiments.regression --dataset wine --score=MLE
python3 -m experiments.regression --dataset kin8nm --score=MLE
python3 -m experiments.regression --dataset naval --score=MLE
python3 -m experiments.regression --dataset power --score=MLE
python3 -m experiments.regression --dataset energy --score=MLE
python3 -m experiments.regression --dataset protein --score=MLE

0 comments on commit 7a2ddd3

Please sign in to comment.