自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 资源 (2)
  • 收藏
  • 关注

原创 智能变电站SCD文件解析&虚端子软压板&增加描述信息

python解析智能变电站SCD文件,获取虚端子和软压板信息。from lxml import etreeimport xlwtimport osimport timeimport sysdef gainNS(filename): # 首先获取xml文件的命名空间 currentDir = os.getcwd() ns = '' absDir = currentDir + '\\' + filename with open(absDir, 'r', enc

2021-11-11 22:53:14 3535

原创 傅里叶变换并把结果保存在excel文件中

import osimport numpy as npfrom scipy.fftpack import fft,ifftimport matplotlib.pyplot as pltimport xlwtdef fft0_7(x,y):#傅里叶变换 #采样点选择1400个,因为设置的信号频率分量最高为600Hz,根据采样定理知采样频率要大于信号频率2倍,所以这里设置采样频率为1400Hz(即一秒内有1400个采样点) # x=np.linspace(0,1,401) #

2020-06-12 10:06:26 1084

原创 WPF 绑定到数组

绑定到对象:以上都是绑定的对象的属性,更常见的是绑定到对象。A more common situation, however, is that you will want to bind the controls to one object at a time from a collection of objects.Figure 8-18 shows an example. This program is similar to the example in the previous section,

2020-05-25 11:48:10 4298

原创 wpf 数据绑定

It would be even better if you could just associate the two controls, without having to write any additional code. This is the goal of data binding.Data binding is the association of two objects, such that one of the objects is always kept up-to-date with

2020-05-24 22:11:15 183

原创 python 批量修改文件名

import ospath="C:\\Users\\HJJ\\Desktop\\BEC\\高级\\第3辑"dirs=os.listdir(path)for file in dirs: os.rename(path+'\\'+file,path+'\\'+"第3辑-"+file)

2020-05-21 20:58:59 163

原创 使用xlwt将数据保存到excel文件中,python

import xlwta=[1,2,3,4,5]wb=xlwt.Workbook()table=wb.add_sheet('工作表1',cell_overwrite_ok=True)i=0table.write(i, 0, '表头')for j in a: i+=1 table.write(i,0,j)wb.save('test.xls')

2020-05-04 13:34:21 2210

原创 二维list翻转

a=[[1,2,3],[4,5,6]]b=[[row[i] for row in a] for i in range(len(a[0]))]print(b)输出:[[1, 4], [2, 5], [3, 6]]

2020-05-04 13:23:27 183

原创 python读取excel文件并保存成array

要使用xlrd包。import numpy as npimport xlrd #读取excel的库resArray=[] #先声明一个空listdata = xlrd.open_workbook("demo.xlsx") #读取文件table = data.sheet_by_index(0) #按索引获取工作表,0就是工作表1for i in range(table.nrows): #...

2020-05-04 13:18:21 16476 6

原创 剑指offer部分题目及答案 python完成

1、 在一个二维数组中(每个一维数组的长度相同),每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。答:class Solution: # array 二维列表 def Find(self, target, array): # write code here ...

2020-04-27 17:13:06 221

原创 根据前序遍历和中序遍历的结果重建二叉树

题目:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。为便于理解,重建出的二叉树如下:python代码如下:class TreeNode: def __init__(self, x): ...

2020-04-24 21:20:39 185

原创 cap7 集成学习和随机森林

集成学习:聚合一组预测器的预测结果,比最好的单个预测器要好。随机森林:训练一组决策树分类器,每一棵树都基于训练集不同的随机子集进行训练,将所有预测树的结果中最多的类别作为预测结果。硬投票分类器:聚合每个分类器的预测,将得票最多的结果作为预测类别。集成学习的效果好于单个弱分类器的原因:大数定理。假设创建了一个包含1000个分类器的集成,每个分类器都只有51%的几率是正确的(弱分类器),如果你...

2019-08-19 19:56:01 265

原创 cap6 决策树

决策树可以实现分类或者回归,也是随机森林的基本预测器。决策树训练和可视化在鸢尾花数据集上训练一个决策树:from sklearn.datasets import load_irisfrom sklearn.tree import DecisionTreeClassifieriris=load_iris()x=iris.data[:,2:] y=iris.targettree_cl...

2019-08-14 20:42:01 286

原创 cap5 支持向量机SVM

线性SVM分类非线性SVM分类SVM回归

2019-08-06 16:09:54 130

原创 cap4 训练模型

两种不同的训练模型的方法:通过“闭式”方程——直接计算出最适合训练集的模型参数(也就是使得训练集上的成本函数最小化的模型参数)使用迭代优化的方法,即梯度下降法(GD),逐渐调整模型参数直至训练集上的成本函数至最低,最终趋同于第一种方法计算出来的模型参数。本章从最简单的线性回归模型开始,然后训练稍微复杂的多项式回归。因为多项式模型参数较多,容易造成对训练数据过度拟合,我们使用学习曲...

2019-08-01 20:05:26 922

原创 自定义交叉验证

sklearn中有cross_val_score()交叉验证函数,也可以自定义此函数:from sklearn.model_selection import StratifiedKFoldfrom sklearn.base import cloneskfolds=StratifiedKFold(n_splits=3,random_state=42)for train_index,test_...

2019-07-04 10:04:47 919

原创 np.random.permutation()

打乱数组的顺序import numpy as npa=np.arange(5,10)b=np.random.permutation(5)print(a)print(b)print(a[b])输出:[5 6 7 8 9][2 1 3 4 0][7 6 8 9 5]

2019-07-03 22:10:07 689

转载 cap 2 加州房价预测

https://www.cnblogs.com/zhhy236400/p/11111180.html

2019-07-03 20:47:10 239

SCD文件解析&虚端子软压板提取.rar

智能变电站SCD文件解析,获取虚端子和软压板详细信息。

2021-11-11

ATPDraw 7.0 英文版用户手册

最新版ATPDraw用户手册,英文版本。 ATPDraw is a graphical, mouse-driven preprocessor to the ATP version of the Electromagnetic Transients Program (EMTP) on the MS-Windows platform. In ATPDraw the user can construct an electrical circuit using the mouse and selecting components from menus, then ATPDraw generates the ATP input file in the appropriate format based on "what you see is what you get". The simulation program ATP and plotting programs can be integrated with ATPDraw. A license is required to use the solver ATP.

2020-05-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除