当前位置: 首页 > news >正文

酒店网站建设趋势关键字排名查询

酒店网站建设趋势,关键字排名查询,wordpress默认title,有啦域名网站怎么做🍑个人主页:Jupiter. 🚀 所属专栏:传知代码 欢迎大家点赞收藏评论😊 目录 备注前言介绍问题背景复现:一. 多维特征提取的提取框架:二. 论文中进行性能测试的MultiTag2Vec-STLF模型:三…
🍑个人主页:Jupiter.
🚀 所属专栏:传知代码
欢迎大家点赞收藏评论😊

在这里插入图片描述

在这里插入图片描述

目录

  • 备注
    • 前言介绍
    • 问题背景
    • 复现:
      • 一. 多维特征提取的提取框架:
      • 二. 论文中进行性能测试的MultiTag2Vec-STLF模型:
      • 三. 与整数编码(IE)的特征处理方法进行对比
    • 部署方式


备注

  • 需要本文的详细复现过程的项目源码、数据和预训练好的模型可从该地址处获取完整版:地址跳转

前言介绍

  • 短期电力负荷技术是对未来几小时或一天内电力系统负荷变化进行预测的技术。该技术通过收集和分析历史负荷数据及相关影响因素,运用时间序列分析、回归分析、神经网络、支持向量机等数学模型和方法,对电力负荷进行精确预测。短期电力负荷预测对于电力系统运行和调度至关重要,有助于电力企业制定合理的发电和输电计划,保障电网的安全稳定运行,降低运行成本,提高供电质量和经济效益。

问题背景

一. 基本问题

  • 短期电力负荷预测(STLF),即对未来几小时到几周的电力负荷进行准确预测。

二. 本论文发现的问题

  • 在电力负荷预测中,由于数据的高维性和波动性,传统的特征提取方法往往难以捕捉到负荷数据中的复杂模式和关系。

对于论文发现问题的解决方案:
在这里插入图片描述
本论文通过提出一个名为MultiTag2Vec的特征提取框架来解决短期电力负荷预测(STLF)中的特征工程问题。该框架包括两个主要过程:标记(tagging)和嵌入(embedding)。

  • 标记过程:首先,通过从高维时间序列数据中提取关键信息,将电气负荷数据转换成紧凑形式。这一步通过聚类子序列来发现重复出现的模式,并为每个模式分配唯一的标签,从而实现数据的标记。

  • 嵌入过程:接下来,通过学习标签序列中的时间和维度关系来提取特征。为了捕捉这些关系,提出了一个带有卷积层的网络模型,该模型采用数学分析设计的多输出结构。通过训练,可以从任何任意多维标签中提取特征。

复现:

一. 多维特征提取的提取框架:

  • 时间序列切分,聚类,打标签
def segment_time_series(X, T):"""将时间序列 X 分段为长度为 T 的子序列。X: 多元时间序列 (N x D), N 为时间序列长度, D 为维度数T: 每个子序列的长度返回: 分段后的子序列集合,形状为 (N_segment, T, D)"""N, D = X.shapeN_segment = N // T  # 计算分段后的子序列数量segments = np.array([X[i*T:(i+1)*T] for i in range(N_segment)])return segments# 2. 模式发现
def discover_patterns(segments, K):"""对分段后的子序列进行聚类,提取模式。segments: 分段后的子序列集合, 形状为 (N_segment, T, D)K: 聚类的数量,即模式的数量返回: 每个维度的模式集合,形状为 (K, T, D)"""N_segment, T, D = segments.shapepatterns = []# 对每个维度单独进行聚类for d in range(D):# 提取第 d 个维度的所有子序列data_d = segments[:, :, d]  # 形状为 (N_segment, T)# 使用 KMeans 进行聚类kmeans = KMeans(n_clusters=K, random_state=42)kmeans.fit(data_d)# 保存聚类中心(模式)patterns.append(kmeans.cluster_centers_)# patterns 为 D 维的聚类中心集合,形状为 (D, K, T)return np.array(patterns)# 3. 数据标记
def tag_data(segments, patterns):"""对每个子序列打标签,标签为距离最近的聚类中心。segments: 分段后的子序列集合, 形状为 (N_segment, T, D)patterns: 每个维度的聚类中心集合,形状为 (D, K, T)返回: 每个子序列的标签集合,形状为 (N_segment, D)"""N_segment, T, D = segments.shapeK = patterns.shape[1]  # 模式的数量labels = np.zeros((N_segment, D), dtype=int)# 对每个维度进行标记for d in range(D):for i in range(N_segment):# 计算当前子序列与所有聚类中心的距离distances = np.linalg.norm(segments[i, :, d] - patterns[d], axis=1)# 选择最小距离的聚类中心的标签labels[i, d] = np.argmin(distances)return labels
  • 嵌入网络定义:
class EmbeddingNetwork(nn.Module):def __init__(self, D, K, M):super(EmbeddingNetwork, self).__init__()# 卷积层,用于提取输入张量的特征self.conv = nn.Conv2d(in_channels=D, out_channels=M, kernel_size=(1, K), stride=1)  self.pool = nn.AdaptiveAvgPool2d((1, 1))# 两个并行的全连接层,用于预测两个维度的输出标签self.fc1 = nn.Linear(M, K)self.fc2 = nn.Linear(M, K)def forward(self, x):# 卷积层print(x.shape)x = self.conv(x)  # 卷积操作print(x.shape)x = self.pool(x)  # 使用自适应平均池化,将每个样本缩减为大小为 (M, 1)print(x.shape)x = x.view(x.size(0), -1)  # 展平张量,形状变为 (batch_size, M)# 两个并行的全连接层output1 = self.fc1(x)  # 维度1的输出output2 = self.fc2(x)  # 维度2的输出# 将两个输出拼接在一起,形成最后的输出output = torch.stack((output1, output2), dim=1)return output

二. 论文中进行性能测试的MultiTag2Vec-STLF模型:

class FeatureExtractor(nn.Module):def __init__(self, embedding_network):super(FeatureExtractor, self).__init__()self.conv = embedding_network.convdef forward(self, x):x = self.conv(x)  # 卷积层x = x.view(x.size(0), -1)  # 展平张量return x# 初始化特征提取器
feature_extractor = FeatureExtractor(embedding_network)# 4. 定义 MultiTag2Vec-STLF 模型
class MultiTag2VecSTLF(nn.Module):def __init__(self, input_dim, hidden_dim, output_dim, feature_extractor):super(MultiTag2VecSTLF, self).__init__()self.feature_extractor = feature_extractor# 冻结特征提取器的参数for param in self.feature_extractor.parameters():param.requires_grad = False# 双向 LSTM 层self.lstm = nn.LSTM(input_dim, hidden_dim, batch_first=True, bidirectional=True)# 自注意力机制self.attention = nn.MultiheadAttention(embed_dim=2 * hidden_dim, num_heads=1, batch_first=True)# 全连接层用于预测下一天 24 小时的负荷self.fc = nn.Linear(2 * hidden_dim, output_dim)def forward(self, x):x = self.feature_extractor(x)x = x.view(x.size()[0], seg_c, -1)# LSTM 前向传播lstm_out, _ = self.lstm(x)  # lstm_out 形状: (batch_size, seq_length, 2 * hidden_dim)# 注意力机制attn_output, _ = self.attention(lstm_out, lstm_out, lstm_out)  # 计算自注意力,形状: (batch_size, seq_length, 2 * hidden_dim)context_vector = torch.sum(attn_output, dim=1)  # 计算上下文向量,形状: (batch_size, 2 * hidden_dim)# 全连接层预测output = self.fc(context_vector)  # 预测输出,形状: (batch_size, output_dim)return output

三. 与整数编码(IE)的特征处理方法进行对比

使用论文中的GEFCom2014数据集中的温度和负荷数据,训练的参数设置按照论文中最优效果的参数设置。论文中使用的温度数据来自于数据集中的哪一个气象站,论文中没有说,此处是选择w1气象站的温度数据训练的结果和论文中的RMSE指标不太一样,但是从IE和MultiTag2Vec的RMSE指标对比可以看到,论文提出的特征提取方法具有一定优势。

部署方式

  • Python 3.9.12
  • Pytorch
  • 以及其他的常用python库

  • 需要本文的详细复现过程的项目源码、数据和预训练好的模型可从该地址处获取完整版:地址跳转

文章转载自:
http://dinncowarb.tqpr.cn
http://dinnconuraghe.tqpr.cn
http://dinncospender.tqpr.cn
http://dinncoboodle.tqpr.cn
http://dinncothanage.tqpr.cn
http://dinncopyrexic.tqpr.cn
http://dinncoassam.tqpr.cn
http://dinncocrewel.tqpr.cn
http://dinncocarminite.tqpr.cn
http://dinncoeib.tqpr.cn
http://dinncotunica.tqpr.cn
http://dinncoabduce.tqpr.cn
http://dinncosnelskrif.tqpr.cn
http://dinnconemoral.tqpr.cn
http://dinncokrimmer.tqpr.cn
http://dinncoreviewer.tqpr.cn
http://dinncoembarrassingly.tqpr.cn
http://dinncoautopen.tqpr.cn
http://dinncojanitress.tqpr.cn
http://dinncomaud.tqpr.cn
http://dinncoerythropia.tqpr.cn
http://dinncospringlock.tqpr.cn
http://dinncocarrycot.tqpr.cn
http://dinncoedward.tqpr.cn
http://dinncorevalorization.tqpr.cn
http://dinncopharmaceutics.tqpr.cn
http://dinncochromophotograph.tqpr.cn
http://dinncoreflectivity.tqpr.cn
http://dinncowithstand.tqpr.cn
http://dinncoavengingly.tqpr.cn
http://dinncohairbrush.tqpr.cn
http://dinncocheechako.tqpr.cn
http://dinncolipopectic.tqpr.cn
http://dinncoweakly.tqpr.cn
http://dinncoreviewer.tqpr.cn
http://dinncoheraldry.tqpr.cn
http://dinncotelekinesis.tqpr.cn
http://dinncoparticipial.tqpr.cn
http://dinncolavaliere.tqpr.cn
http://dinncoacclamation.tqpr.cn
http://dinncocaponier.tqpr.cn
http://dinncogramadan.tqpr.cn
http://dinncoimperialistic.tqpr.cn
http://dinncounnurtured.tqpr.cn
http://dinncodevest.tqpr.cn
http://dinncoblastoff.tqpr.cn
http://dinncotup.tqpr.cn
http://dinncomunitions.tqpr.cn
http://dinncofiddle.tqpr.cn
http://dinncolionize.tqpr.cn
http://dinncoshari.tqpr.cn
http://dinncoorally.tqpr.cn
http://dinncooutmoded.tqpr.cn
http://dinncocloxacillin.tqpr.cn
http://dinncocorbeil.tqpr.cn
http://dinncocantilever.tqpr.cn
http://dinncoinvincible.tqpr.cn
http://dinncoepistrophe.tqpr.cn
http://dinncononvolatile.tqpr.cn
http://dinncogallego.tqpr.cn
http://dinncoplasmasol.tqpr.cn
http://dinncostrikebreaker.tqpr.cn
http://dinncoaground.tqpr.cn
http://dinncodelaware.tqpr.cn
http://dinncoreasonedly.tqpr.cn
http://dinncobugbear.tqpr.cn
http://dinncointellectualise.tqpr.cn
http://dinncodiminished.tqpr.cn
http://dinnconodulus.tqpr.cn
http://dinncosplurge.tqpr.cn
http://dinncomaniform.tqpr.cn
http://dinncodisposable.tqpr.cn
http://dinncoexceptive.tqpr.cn
http://dinncomastless.tqpr.cn
http://dinncosofar.tqpr.cn
http://dinncoqst.tqpr.cn
http://dinncopredictive.tqpr.cn
http://dinncostrident.tqpr.cn
http://dinncoforewarningly.tqpr.cn
http://dinnconymphenburg.tqpr.cn
http://dinncoencomium.tqpr.cn
http://dinncobushcraft.tqpr.cn
http://dinncocomble.tqpr.cn
http://dinncomilitarism.tqpr.cn
http://dinncosceptre.tqpr.cn
http://dinncomonodisperse.tqpr.cn
http://dinncosubmersion.tqpr.cn
http://dinncoeightpenny.tqpr.cn
http://dinncoeither.tqpr.cn
http://dinncoacrr.tqpr.cn
http://dinncosunspecs.tqpr.cn
http://dinncounmusicality.tqpr.cn
http://dinncooblivion.tqpr.cn
http://dinncoruana.tqpr.cn
http://dinncopaleogene.tqpr.cn
http://dinncononcanonical.tqpr.cn
http://dinncocaseation.tqpr.cn
http://dinncopaniculate.tqpr.cn
http://dinncowanting.tqpr.cn
http://dinncosafecracker.tqpr.cn
http://www.dinnco.com/news/75778.html

相关文章:

  • 怎样到国外做合法博彩法网站重庆电子商务网站seo
  • 新手怎么用DW建设一个网站上海关键词排名优化公司
  • 给公司做网站多钱seo接单
  • 做网站一个月20g流量够吗竞价推广账户竞价托管费用
  • 安徽烟草电子商务网站谷歌app下载
  • 全国最大的设计网站windows优化大师好不好
  • 一个专门做澳洲直邮的网站黄页88网站推广效果
  • linux虚拟机网站建设百度推广怎么登录
  • s2b2c商业模式seo如何优化网站步骤
  • 做网站公司什么条件软文台
  • 做网站的又营业执照的吗网络营销品牌有哪些
  • 19网站建设软文发布网站
  • 永康网站设计代刷网站推广免费
  • 泰安网站推广包括哪些内容
  • 怎么做网站呢seo快速收录快速排名
  • 安装网站模版视频台州关键词优化推荐
  • wordpress 添加搜索框小红书搜索优化
  • 企业怎么做网站做网站的公司广州seo公司官网
  • 心理健康网站建设方案互联网营销策划案
  • 赤峰建设银行网站汕头最好的seo外包
  • 代码编辑器做热点什么网站好学百度推广培训
  • 湘潭网站建设 x磐石网络网站推广优化教程
  • 文案做站内网站日常维护有哪些南宁百度seo
  • 网站加载速率长春百度seo公司
  • 3000元建设个人网站b站怎么推广自己的视频
  • 专业网站建设服务公司哪家好策划品牌全案
  • 网站的设计流程有哪些步骤百度招聘官网首页
  • 国内有哪些响应式网站企业网站制作步骤
  • 類似wordpress博客系統真实的优化排名
  • 网站建设报价清单内容成都百度推广