0

I am coding a decision tree and a confusion matrix and I added loop counters to determine the run time of my code but it returns me 0.

L = 0
def creatematrixnull(target):
    global L
    uniquetarget =unique(target)
    # we specifie the type to ease the plot
    dataframe=pd.DataFrame(columns=uniquetarget,index=uniquetarget, dtype='int32')
    for i in range(len(uniquetarget)):
        dataframe.iloc[i]=[0]*len(uniquetarget)
        L=L+1
    return dataframe 
    creatematrix=creatematrixnull(targettest)
print(L)

This is an example of what I am talking about

AlexisG
  • 2,476
  • 3
  • 11
  • 25

0 Answers0