Skip to content

Instantly share code, notes, and snippets.

View lprowell's full-sized avatar

Laura lprowell

  • Oakland
View GitHub Profile
@lprowell
lprowell / linear_regression
Last active November 9, 2022 16:03
Code for linear regression, cross validation, gridsearch, logistic regression, etc.
# Linear Regression without GridSearch
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score, cross_val_predict
from sklearn import metrics
X = [[Some data frame of predictors]]
y = target.values (series)
//Setup
var contacts = [
{
"firstName": "Akira",
"lastName": "Laine",
"number": "0543236543",
"likes": ["Pizza", "Coding", "Brownie Points"]
},
{