上一页 1 ··· 240 241 242 243 244 245 246 247 248 ··· 385 下一页
摘要: NumPy Ndarray 对象 NumPy 最重要的一个特点是其 N 维数组对象 ndarray,它是一系列同类型数据的集合,以 0 下标为开始进行集合中元素的索引。 ndarray 对象是用于存放同类型元素的多维数组。 ndarray 中的每个元素在内存中都有相同存储大小的区域。 ndarray 阅读全文
posted @ 2021-07-03 10:19 秋华 阅读(351) 评论(0) 推荐(0)
摘要: 1 多项式对数据做了什么 from sklearn.preprocessing import PolynomialFeatures import numpy as np #如果原始数据是一维的 X = np.arange(1,4).reshape(-1,1) X#二次多项式,参数degree控制多项 阅读全文
posted @ 2021-07-03 09:52 秋华 阅读(515) 评论(0) 推荐(0)
摘要: 2 使用分箱处理非线性问题 1. 导入所需要的库 import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.tree import 阅读全文
posted @ 2021-07-03 09:50 秋华 阅读(183) 评论(0) 推荐(0)
摘要: 1 重塑我们心中的“线性”概念 1.1 变量之间的线性关系 1.2 数据的线性与非线性 1.3 线性模型与非线性模型 1. 导入所需要的库 import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model imp 阅读全文
posted @ 2021-07-03 09:12 秋华 阅读(185) 评论(0) 推荐(0)
摘要: 3 Lasso 3.1 Lasso与多重共线性 3.2 Lasso的核心作用:特征选择 import numpy as np import pandas as pd from sklearn.linear_model import Ridge, LinearRegression, Lasso fro 阅读全文
posted @ 2021-07-02 22:40 秋华 阅读(223) 评论(0) 推荐(0)
摘要: 1 最熟悉的陌生人:多重共线性 逆矩阵存在的充分必要条件 行列式不为0的充分必要条件 矩阵满秩的充分必要条件 2 岭回归 2.1 岭回归解决多重共线性问题 2.2 linear_model.Ridge import numpy as np import pandas as pd from sklea 阅读全文
posted @ 2021-07-02 22:33 秋华 阅读(237) 评论(0) 推荐(0)
摘要: 0 简介 1 是否预测了正确的数值 from sklearn.metrics import mean_squared_error as MSE MSE(yhat,Ytest) y.max() y.min() cross_val_score(reg,X,y,cv=10,scoring="mean_sq 阅读全文
posted @ 2021-07-02 21:08 秋华 阅读(269) 评论(0) 推荐(0)
摘要: 1 多元线性回归的基本原理 2 最小二乘法求解多元线性回归的参数 https://en.wikipedia.org/wiki/Matrix_calculus 3 linear_model.LinearRegression class sklearn.linear_model.LinearRegres 阅读全文
posted @ 2021-07-02 20:37 秋华 阅读(422) 评论(0) 推荐(0)
摘要: 1 线性回归大家族 2 sklearn中的线性回归 阅读全文
posted @ 2021-07-02 20:25 秋华 阅读(87) 评论(0) 推荐(0)
摘要: 0 简介 Kaggle下载链接走这里:https://www.kaggle.com/jsphyg/weather-dataset-rattle-package 1 导库导数据,探索特征 导入需要的库 import pandas as pd import numpy as np from sklear 阅读全文
posted @ 2021-07-01 21:16 秋华 阅读(552) 评论(0) 推荐(0)
上一页 1 ··· 240 241 242 243 244 245 246 247 248 ··· 385 下一页