Skip to content

issue in python (google colab) #2

@emiksapitri

Description

@emiksapitri

Dear @giorgioroffo,

i use your library as in https://pypi.org/project/PyIFS/#description
but i had an error like this:


NameError Traceback (most recent call last)
in <cell line: 6>()
4
5 inf = PyIFS.InfFS()
----> 6 [RANKED, WEIGHT] = inf.infFS(X_train_EN, y_train_column_vector, alpha=0.5, supervision=1, verbose=1)

/usr/local/lib/python3.10/dist-packages/PyIFS/InfFS.py in infFS(self, x_train, y_train, alpha, supervision, verbose)
113 STDMatrix = self.SubtractMin(STDMatrix)
114 sigma_ij = self.DivideByMax(STDMatrix)
--> 115 for i in range( 0,sigma_ij.shape[0] ):
116 for j in range( 0,sigma_ij.shape[1] ):
117 if( math.isnan(sigma_ij[i,j]) or sigma_ij[i,j] < -1 or sigma_ij[i,j] > 1 ):

NameError: name 'math' is not defined

i try to add "import math" before installing pyIFS but it not solve.
do you have any advice to solve this?

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