共 48 篇文章 |
|
def h(x,theta): return np.matmul(x, theta)def test(theta, x): x[0] = (x[0] - mu[0])/std[0] x[1] = (x[1] - mu[1])/std[1] y = theta[0] + theta[1]*x[0] + theta[2]*x[1] print(''''''''Price of house:'''''''', y)T@(h(x, theta)-y))/(2*y.shape[0])def gradient_des... 阅108 转2 评0 公众公开 21-02-09 13:54 |
12 意大利疫情import geopandasimport pandas as pdimport pandas_aliveimport contextilyimport matplotlib.pyplot as plt.cases_df = italy_df.iloc[:,:3]cases_df[''''''''Date''''''''] = cases_df.indexpivoted = cases_df.pivot(values=''''''... 阅895 转10 评0 公众公开 21-01-04 00:28 |
# 计算数据集 X 每列的标准差def calculate_std_dev(X): std_dev = np.sqrt(calculate_variance(X)) return std_dev.MDS 降维算法展示详细内容可参见《MDS 算法》https://blog.csdn.net/zhangweiguo_717/article/details/69663452代码地址:https://github.com/heucoder/dimensionality_reduction_alo_codes/tree/master/codes/MDSISOMAPIs... 阅119 转0 评0 公众公开 20-11-24 00:53 |
这几个数据源网站你都知道吗!?其中的“中国经济数据库”收编了300,000多条时间序列数据,数据内容涵盖宏观经济数据、行业经济数据和地区经济数据。- 199IT大数据导航 -http://hao.199it.com/- 数据分析网导航 -http://www.afenxi.com/hao- 大数据人导航 -http://hao.bigdata.ren/在互联网高度发达的今天,数据资源异常的丰富和庞大,如... 阅951 转3 评0 公众公开 20-11-14 20:31 |
01 动态条形图变动态柱状图。# 设置数值的最大值,固定数值轴bcr.bar_chart_race(df, ''''''''covid19_horiz.gif'''''''', fixed_max=True)# bar_label_size-柱状图标签文字大小# tick_label_size-坐标轴标签文字大小# title_size-标题标签文字大小bcr.bar_chart_race(df, ... 阅15 转0 评0 公众公开 20-11-12 08:50 |
整理一套pandas详细教程,希望对你有帮助!第四到第六行(左闭右开)的数据子集pandas 的基本函数逻辑运算data[data[ column_1 ]== french ]data[(data[ column_1 ]== french ) & (data[ year_born ]==1990)]data[(data[ column_1 ]== french ) & (data[ year_born ]==1990) & ~(data[ city ]== London )]我本可以展示更多有趣的 p... 阅8 转0 评0 公众公开 20-09-25 23:37 |
plt.scatter(x, y, c=colors, alpha=0.5)plt.title(''''''''Scatter plot'''''''')plt.xlabel(''''''''HP'''''''')plt.ylabel(''''''''Attack'''''... 阅116 转1 评0 公众公开 20-09-16 15:36 |
df = pd.read_csv(''''''''exam_result.csv'''''''')# write of way2df.to_csv(''''''''exam_result.csv'''''''', encoding=''''''''utf-8-sig'''''&... 阅71 转0 评0 公众公开 20-06-22 13:19 |
plt.figure(figsize=(14,16), dpi= 80)plt.hlines(y=df.index, xmin=0, xmax=df.mpg_z, color=df.colors, alpha=0.4, linewidth=1)plt.scatter(df.mpg_z, df.index, color=df.colors, s=[600 if x == ''''''''Fiat X1-9'''''''' else 300 for x in df.cars], alpha=0.6)plt.y... 阅37 转0 评0 公众公开 20-05-21 21:50 |
Numpy可以说是Python中最基础也是最重要的工具库了,要用Python做机器学习,玩转各种框架,Numpy是必须要会的。import numpy as nparr = np.zeros((10, 10))大概也有几种办法,首先,既然numpy中的ndarray可以转换成Python原生的list,同样Python中原生的list也可以转换成numpy中的ndarray。Numpy可以认为是Python进行机器学习的基础,当然除了... 阅60 转0 评0 公众公开 20-05-12 18:00 |