-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maint: update templates to render out of the box (#229)
* update templates to ptd palm * remove API url iframe- will not work on palm
- Loading branch information
1 parent
949e349
commit c6b33de
Showing
5 changed files
with
49 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pins | ||
|
||
from dotenv import load_dotenv | ||
from sklearn.linear_model import LinearRegression | ||
from sklearn.preprocessing import OneHotEncoder | ||
from sklearn.pipeline import Pipeline | ||
from vetiver.data import sacramento | ||
from vetiver import VetiverModel, vetiver_pin_write | ||
|
||
load_dotenv() | ||
|
||
x = sacramento.drop(columns="price") | ||
y = sacramento["price"] | ||
|
||
ohe = OneHotEncoder().fit(x) | ||
lm = LinearRegression().fit(ohe.transform(x), y) | ||
pipeline = Pipeline([("ohe", ohe), ("linear_model", lm)]) | ||
v = VetiverModel(pipeline, "isabel.zimmerman/sacramento", x) | ||
board = pins.board_connect(allow_pickle_read=True) | ||
vetiver_pin_write(board=board, model=v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters