Skip to content

55页:小数定标标准化,j值计算错误 #4

Description

@duguiming111
def DecimalScaling(self):
        arr_ = list()
        j = self.x_max // 10 if self.x_max % 10 == 0 else self.x_max // 10 + 1
        for x in self.arr:
            arr_.append(round(x / math.pow(10, j), 4))
        print("经过Decimal Scaling标准化后的数据为:\n{}".format(arr_))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions