コード例 #1
0
 def myLDA(self,component_num):
     dre=api.DimensionReduction(components=component_num,
                                input_data=self.sample_data_output,
                                dred_data=self.dred_data)
     print("Generate "+str(self.dred_data)+".")
     dre.Lda()
     #生成串行文件
     csvp.create_csv_copy(self.dred_data,self.sample_data_output)
     return 0
コード例 #2
0
 def myPCA(
     self,
     component_num,
 ):
     #拷贝一份降维前的数据,以便于在需要对数据进行预测时,再次协同进行降维
     csvp.create_csv_copy(self.sample_data_output,
                          self.sample_data_before_dre)
     #开始降维
     dre = api.DimensionReduction(components=component_num,
                                  input_data=self.sample_data_output,
                                  dred_data=self.dred_data)
     print("Generate " + str(self.dred_data) + ".")
     ret_value = dre.Pca()
     #生成串行文件
     csvp.create_csv_copy(self.dred_data, self.sample_data_output)
     return ret_value