# -*- coding: utf-8 -*-
"""
Created on Wed May 27 18:01:54 2020
#主成分分析 降维
@author: hean
"""
import pandas as pd
import numpy as np
inputfile = 'C:/Users/Admin/Desktop/课程资料/金融机构风险管理/期末论文/2019.xlsx'#原始数据
outputfile = 'C:/Users/Admin/Desktop/课程资料/金融机构风险管理/期末论文/finish2019.xlsx' #降维后的数据
data = pd.read_excel(inputfile, header =
对excel数据主成分分析的python实现
本文介绍如何使用Python进行主成分分析(PCA),处理来自Excel的数据,以实现有效的数据降维。通过导入pandas和sklearn库,加载Excel文件并执行PCA,简化复杂数据集的同时保留关键信息。

最低0.47元/天 解锁文章





