上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 329 下一页
摘要: opencv show image opencv Python展示一张图片 答案如下 cv.imshow("window_name", somaBackground), cv.waitKey(0) 阅读全文
posted @ 2022-05-20 17:24 bH1pJ 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 结论: 目前对louvain社群划分的方法,用的比较多: code如下 import collections import random import networkx as nx import matplotlib.pyplot as plt def load_graph(path): G = c 阅读全文
posted @ 2022-05-20 14:52 bH1pJ 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 坑 非线性动力学常见的分析方法包括 1、相平面法; 2、振荡; 3、奇异摄动; 4、分岔分析; 阅读全文
posted @ 2022-05-20 11:06 bH1pJ 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Python如何设置对数log坐标系的range fig, ax = plt.subplots() sns.lineplot(data=df, x="k", y="pk") ax.set_xscale("log") ax.set_yscale("log") ax.set_xlim(3, 1e2) a 阅读全文
posted @ 2022-05-19 17:58 bH1pJ 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 问题抽象:Python如何绘制曲线的阴影图? 建议的方案: flights = sns.load_dataset("flights") flights.head() sns.lineplot(data=flights, x="year", y="passengers") plt.show() 效果如 阅读全文
posted @ 2022-05-19 17:08 bH1pJ 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 使用networkx构建随机网络 有两种方法: 也可以直接调用库函数来生成这两种网络 n, m, p = 20,40,0.2 #节点数、边数、连边概率; g1 = nx.gnm_random_graph(n, m) #根据连边数,确定随机网络 g2 = nx.gnp_random_graph(n, 阅读全文
posted @ 2022-05-19 14:19 bH1pJ 阅读(89) 评论(0) 推荐(0) 编辑
摘要: from scipy import optimize import numpy as np #定义需要拟合的函数 def fit_line(x, a, b): return a*x + b k, pk = get_dgreeDistr(BA) kmin = np.min(k) kmax = np.m 阅读全文
posted @ 2022-05-19 11:59 bH1pJ 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 自己手把手写一个计算度分布的函数:基本思路,两层for循环,定义 def get_dgreeDistr(G): all_k = [G.degree(i) for i in G.nodes()] #获取每个节点的度值; k = list(set(all_k)) N = len(G.nodes()) P 阅读全文
posted @ 2022-05-19 11:20 bH1pJ 阅读(22) 评论(0) 推荐(0) 编辑
摘要: python使用使用对数坐标系 newX = [] newY = [] for i in range(len(x)): if y[i] != 0 : newX.append(x[i]) newY.append(y[i]) fig, ax = plt.subplots() ax.plot(newX,n 阅读全文
posted @ 2022-05-19 10:59 bH1pJ 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 参考资料 背景:遇到了挑战,随着网络深度的增加,模型的预测结果并没有编号。按道理,如果深度为20的网络已经达到不错的效果的话,深度增加到30层,后10层什么都不做,也能达到和20层一样的效果才对。但是实际上,随着深度的增加,效果反而变差了。 1、原因在于, 随着网络深度的增加,通过链式求导法则得到的 阅读全文
posted @ 2022-05-18 23:58 bH1pJ 阅读(19) 评论(0) 推荐(0) 编辑
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 329 下一页