本文整理汇总了Python中dataset.DataSet.descstats方法的典型用法代码示例。如果您正苦于以下问题:Python DataSet.descstats方法的具体用法?Python DataSet.descstats怎么用?Python DataSet.descstats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dataset.DataSet
的用法示例。
在下文中一共展示了DataSet.descstats方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: exp_quick_load
# 需要导入模块: from dataset import DataSet [as 别名]
# 或者: from dataset.DataSet import descstats [as 别名]
def exp_quick_load(self):
self.output_str("Import.")
global data
data = DataSet()
data.dataimport("D:\Dropbox\St Andrews\IT\IS5189 MSc Thesis\\02 Data\InnoCentive_Challenge_9933493_training_data.csv")
self.loaded = True
self.output_str("Label Encode.")
data.labelencode(columns=self.configLE)
self.output_str("Split (quick = True).")
data.split(target_column_name=self.configCV['target_value'], test_set_size=self.configCV['test_set_size'],
seed=self.configCV['seed'], random_state_is=self.configCV['random_state_is'],quick=True)
self.update_overview(trainrows=len(data.X_train), testrows=len(data.X_test),
ncols=len(data.X_train.columns.values))
self.output_str("Function 'exp_quick_load()' finished running.")
data.descstats(self.configLE,write=True,workdir=self.configGeneral['workdir'])
示例2: load
# 需要导入模块: from dataset import DataSet [as 别名]
# 或者: from dataset.DataSet import descstats [as 别名]
def load(self, path, filename):
global last_path
global last_filename
global data
last_path = path
last_filename = filename[0]
try:
data = DataSet()
data.dataimport(filename[0])
self.loaded = True
except (RuntimeError, TypeError, NameError):
data.dprint("Error: most likely not a csv file.")
self.output_str("Successfully loaded the data set.")
self.feedback("Fileimport completed")
if self.configGeneral['desc_stats_on_load']:
data.descstats(self.configLE)
self.output_str("Descriptive statistics performed.")
ncols = len(data.information())
# Get the filename and cut it to fit the GUI..
# Filename only used to remind the user of which dataset has been loaded.
head, tail = os.path.split(filename[0])
fname = tail[:5]+ "." + tail[-4:]
self.update_overview(fname=fname,ncols=ncols)
self.dismiss_popup()