本文整理汇总了Python中dataset.DataSet.dprint方法的典型用法代码示例。如果您正苦于以下问题:Python DataSet.dprint方法的具体用法?Python DataSet.dprint怎么用?Python DataSet.dprint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dataset.DataSet
的用法示例。
在下文中一共展示了DataSet.dprint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load
# 需要导入模块: from dataset import DataSet [as 别名]
# 或者: from dataset.DataSet import dprint [as 别名]
def load():
data = DataSet()
data.dprint("Import data.")
data.dataimport("D:\Dropbox\St Andrews\IT\IS5189 MSc Thesis\\02 Data\InnoCentive_Challenge_9933493_training_data.csv")
data.dprint("Label Encode.")
data.labelencode(columns=categorical_columns)
data.dprint("Split data. Test set size: " + str(test_set_size))
data.split(target_column_name=target_value, test_set_size=test_set_size,random_state_is=True)
return data
示例2: load
# 需要导入模块: from dataset import DataSet [as 别名]
# 或者: from dataset.DataSet import dprint [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()