站长之家工具查询,携程官网,如何做网络销售平台,已备案域名买卖一、fit()、tansform()、fit_transform()区别
fit(): Method calculates the parameters μ and σ and saves them as internal objects.解释#xff1a;简单来说#xff0c;就是求得训练集X的均值#xff0c;方差#xff0c;最大值#xff0c;最小值,这些训练集X固有的…一、fit()、tansform()、fit_transform()区别
fit(): Method calculates the parameters μ and σ and saves them as internal objects.解释简单来说就是求得训练集X的均值方差最大值最小值,这些训练集X固有的属性。transform(): Method using these calculated parameters apply the transformation to a particular dataset.解释在fit的基础上进行标准化降维归一化等操作看具体用的是哪个工具如PCAStandardScaler等。fit_transform(): joins the fit() and transform() method for transformation of dataset.解释fit_transform是fit和transform的组合既包括了训练又包含了转换。transform()和fit_transform()二者的功能都是对数据进行某种统一处理比如标准化~N(0,1)将数据缩放(映射)到某个固定区间归一化正则化等fit_transform(trainData)对部分数据先拟合fit找到该part的整体指标如均值、方差、最大值最小值等等根据具体转换的目的然后对该trainData进行转换transform从而实现数据的标准化、归一化等等。