Skip to content

Commit

Permalink
black format
Browse files Browse the repository at this point in the history
  • Loading branch information
jyx-su committed Nov 8, 2023
1 parent 36ffc51 commit 428d9e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions examples/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
from ngboost.distns import Normal

if __name__ == "__main__":

#Load Boston housing dataset
# Load Boston housing dataset
data_url = "http://lib.stat.cmu.edu/datasets/boston"
raw_df = pd.read_csv(data_url, sep="\s+", skiprows=22, header=None)
X = np.hstack([raw_df.values[::2, :], raw_df.values[1::2, :2]])
Y = raw_df.values[1::2, 2]

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.2)

ngb = NGBRegressor(Dist=Normal).fit(X_train, Y_train)
Expand Down
5 changes: 2 additions & 3 deletions examples/survival.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
from ngboost.distns import LogNormal

if __name__ == "__main__":

#Load Boston housing dataset
# Load Boston housing dataset
data_url = "http://lib.stat.cmu.edu/datasets/boston"
raw_df = pd.read_csv(data_url, sep="\s+", skiprows=22, header=None)
X = np.hstack([raw_df.values[::2, :], raw_df.values[1::2, :2]])
Y = raw_df.values[1::2, 2]

X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.2)

# introduce administrative censoring
Expand Down

0 comments on commit 428d9e9

Please sign in to comment.