Commits

Amela Rakanovic  committed 3825323

Refactored functions - OWIndContiniousQt.py.

  • Participants
  • Parent commits 0dd4cf7
  • Branches widgets-statistics

Comments (0)

Files changed (1)

File Orange/OrangeWidgets/Statistics/OWIndContiniousQt.py

             self.linregression_dirty = 1
             self.linear_array_slope = []
             self.linear_array_intersect = []
-            self.linear_array_slope, self.linear_array_intersect = fun_lin_regression(self.ddataset, self.attributes, stats.linregress)
+            self.linear_array_slope, self.linear_array_intersect = fun_statistics(self.ddataset, self.attributes, stats.linregress)
         
         if self.test_select == 0:
             if self.pearson_dirty == 0:
                 print 'Running Pearson'
                 self.pearson_array = []
                 
-                self.pearson_array = fun_lin_regression(self.ddataset, self.attributes, stats.pearsonr)[0]
+                self.pearson_array = fun_statistics(self.ddataset, self.attributes, stats.pearsonr)[0]
                 self.correlation_np = np.array(self.pearson_array)
 
                 self.set_table()
                 self.spearman_dirty = 1
                 print 'Running Spearman'
                 self.spearman_array = []
-                self.spearman_array = fun_lin_regression(self.ddataset, self.attributes, stats.spearmanr)[0]
-                    #tab = fun_lin_regression(self.ddataset, self.attributes, i[0], stats.spearmanr)[1]
+                self.spearman_array = fun_statistics(self.ddataset, self.attributes, stats.spearmanr)[0]
+                    #tab = fun_statistics(self.ddataset, self.attributes, i[0], stats.spearmanr)[1]
                     #print tab
                     
                 self.correlation_np = np.array(self.spearman_array)
 
 # Statistics function  -----------------------------------------------------------
 
-def fun_lin_regression(dataset,  attributes, alpha):
+def fun_statistics(dataset,  attributes, alpha):
     """Regular function for statistics
     :param dataset:     orange dataset - non filtered
     :parm attributes:   continuous attributes