ошибка в алгоритм на пайтон
обработка даных с помощью первой части создаю список со списками и данными
CATEGORIES = ["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","R","S","T","U","V","W","X","Y","Z"] KR8877J = [[0.002,0.006,0.004,0.045,0.002,0.017,0.006,0.077,0.001,0.035,0.042,0.005,0.004,0.039,0.001,0.002,0.001,0.008,0.058,0.352,0.002,0.007,0.017,0.004,0.007,0.007,0.007,0.004,0.005,0.009,0.089,0.036,0.053,0.041,0.004], [0.003,0.007,0.005,0.075,0.001,0.020,0.006,0.044,0.002,0.035,0.026,0.004,0.004,0.033,0.001,0.001,0.003,0.008,0.049,0.360,0.002,0.007,0.021,0.005,0.009,0.003,0.008,0.007,0.003,0.014,0.092,0.048,0.058,0.031,0.004], [0.002,0.000,0.025,0.012,0.006,0.002,0.001,0.627,0.006,0.021,0.022,0.008,0.004,0.006,0.004,0.033,0.000,0.006,0.011,0.009,0.002,0.002,0.009,0.000,0.002,0.040,0.007,0.005,0.015,0.000,0.035,0.001,0.008,0.015,0.053], [0.056,0.008,0.023,0.038,0.015,0.007,0.050,0.006,0.412,0.004,0.005,0.027,0.011,0.005,0.021,0.007,0.073,0.024,0.012,0.005,0.013,0.005,0.027,0.003,0.015,0.001,0.005,0.074,0.002,0.022,0.005,0.011,0.002,0.001,0.006], [0.025,0.011,0.025,0.034,0.018,0.027,0.090,0.008,0.258,0.006,0.007,0.026,0.016,0.008,0.026,0.011,0.079,0.030,0.026,0.008,0.018,0.011,0.033,0.003,0.016,0.001,0.003,0.106,0.004,0.021,0.012,0.013,0.003,0.005,0.014], [0.048,0.027,0.019,0.002,0.028,0.002,0.008,0.017,0.041,0.014,0.012,0.022,0.031,0.005,0.045,0.100,0.004,0.031,0.033,0.002,0.029,0.006,0.021,0.032,0.008,0.038,0.317,0.007,0.017,0.004,0.018,0.005,0.003,0.004,0.002], [0.013,0.002,0.002,0.000,0.164,0.001,0.060,0.004,0.006,0.002,0.018,0.003,0.035,0.002,0.008,0.008,0.001,0.008,0.028,0.005,0.383,0.013,0.063,0.010,0.004,0.002,0.014,0.016,0.002,0.005,0.048,0.011,0.028,0.017,0.012]] KR8877J_1 = [[0.004,0.007,0.005,0.042,0.002,0.014,0.011,0.054,0.002,0.032,0.051,0.005,0.005,0.044,0.001,0.002,0.002,0.008,0.056,0.389,0.003,0.008,0.023,0.005,0.009,0.005,0.009,0.006,0.004,0.010,0.070,0.029,0.049,0.031,0.005], [0.005,0.005,0.005,0.034,0.002,0.006,0.005,0.083,0.002,0.062,0.053,0.004,0.006,0.039,0.001,0.002,0.001,0.008,0.055,0.348,0.002,0.005,0.020,0.005,0.011,0.011,0.018,0.004,0.005,0.008,0.086,0.018,0.055,0.020,0.004], [0.001,0.001,0.024,0.009,0.013,0.003,0.002,0.499,0.006,0.011,0.022,0.011,0.007,0.006,0.006,0.048,0.000,0.008,0.013,0.009,0.004,0.002,0.007,0.000,0.002,0.053,0.009,0.007,0.030,0.000,0.030,0.001,0.009,0.021,0.123], [0.039,0.008,0.029,0.041,0.013,0.008,0.054,0.005,0.369,0.004,0.005,0.023,0.011,0.005,0.020,0.005,0.100,0.022,0.012,0.005,0.012,0.007,0.028,0.002,0.015,0.000,0.003,0.102,0.001,0.021,0.006,0.012,0.002,0.002,0.007], [0.031,0.007,0.018,0.032,0.015,0.017,0.075,0.008,0.365,0.005,0.005,0.028,0.015,0.005,0.022,0.011,0.075,0.027,0.014,0.005,0.020,0.006,0.025,0.002,0.014,0.001,0.004,0.099,0.003,0.016,0.008,0.009,0.002,0.002,0.010], [0.046,0.022,0.022,0.002,0.031,0.003,0.008,0.022,0.047,0.011,0.010,0.039,0.035,0.005,0.048,0.110,0.002,0.028,0.031,0.003,0.029,0.006,0.016,0.022,0.007,0.059,0.289,0.005,0.016,0.003,0.013,0.004,0.002,0.004,0.003], [0.019,0.004,0.002,0.000,0.134,0.004,0.088,0.006,0.004,0.003,0.016,0.007,0.037,0.004,0.016,0.014,0.002,0.014,0.026,0.005,0.342,0.019,0.049,0.024,0.004,0.003,0.021,0.009,0.005,0.009,0.049,0.012,0.017,0.026,0.006]] KR8877J_2 = [[0.002,0.005,0.005,0.046,0.002,0.014,0.008,0.073,0.002,0.023,0.042,0.004,0.007,0.027,0.001,0.003,0.001,0.006,0.047,0.384,0.005,0.006,0.015,0.003,0.006,0.004,0.011,0.006,0.006,0.005,0.088,0.027,0.066,0.040,0.010], [0.002,0.005,0.005,0.039,0.002,0.009,0.005,0.089,0.001,0.036,0.043,0.004,0.006,0.026,0.001,0.002,0.001,0.006,0.051,0.387,0.003,0.005,0.014,0.003,0.007,0.007,0.014,0.004,0.007,0.005,0.090,0.022,0.064,0.030,0.006], [0.002,0.001,0.014,0.011,0.020,0.005,0.004,0.282,0.005,0.012,0.022,0.011,0.009,0.010,0.008,0.041,0.000,0.017,0.030,0.019,0.009,0.003,0.009,0.000,0.004,0.053,0.010,0.016,0.049,0.000,0.043,0.002,0.017,0.037,0.224], [0.028,0.015,0.029,0.039,0.023,0.020,0.097,0.008,0.239,0.004,0.009,0.021,0.019,0.008,0.017,0.008,0.082,0.023,0.025,0.012,0.020,0.010,0.037,0.003,0.016,0.001,0.003,0.110,0.003,0.019,0.012,0.014,0.004,0.005,0.015], [0.037,0.013,0.035,0.053,0.025,0.022,0.057,0.017,0.250,0.005,0.009,0.037,0.025,0.008,0.029,0.013,0.057,0.029,0.029,0.009,0.015,0.009,0.027,0.002,0.020,0.002,0.006,0.092,0.006,0.012,0.011,0.011,0.003,0.004,0.021], [0.036,0.022,0.024,0.003,0.022,0.004,0.011,0.019,0.069,0.014,0.011,0.035,0.045,0.006,0.057,0.096,0.004,0.037,0.030,0.004,0.039,0.007,0.021,0.018,0.010,0.031,0.256,0.013,0.018,0.003,0.018,0.005,0.004,0.006,0.004], [0.015,0.003,0.002,0.000,0.174,0.004,0.085,0.008,0.005,0.002,0.015,0.008,0.028,0.003,0.013,0.016,0.001,0.015,0.029,0.004,0.357,0.013,0.043,0.017,0.003,0.003,0.017,0.010,0.004,0.007,0.037,0.013,0.015,0.020,0.010]] KR8877J_3 = [[0.005,0.006,0.006,0.055,0.002,0.017,0.009,0.076,0.003,0.035,0.032,0.007,0.005,0.050,0.001,0.002,0.002,0.011,0.050,0.391,0.002,0.005,0.018,0.003,0.012,0.009,0.009,0.005,0.005,0.012,0.068,0.032,0.032,0.017,0.006], [0.009,0.005,0.007,0.064,0.002,0.022,0.009,0.040,0.003,0.030,0.026,0.010,0.006,0.069,0.001,0.001,0.004,0.011,0.040,0.379,0.002,0.009,0.021,0.005,0.017,0.007,0.009,0.005,0.003,0.034,0.063,0.035,0.029,0.017,0.006], [0.001,0.001,0.014,0.011,0.011,0.004,0.003,0.458,0.004,0.012,0.023,0.010,0.007,0.009,0.006,0.039,0.000,0.012,0.016,0.014,0.005,0.003,0.007,0.000,0.002,0.052,0.008,0.009,0.039,0.000,0.036,0.001,0.013,0.032,0.139], [0.042,0.012,0.023,0.029,0.043,0.015,0.111,0.010,0.235,0.004,0.009,0.036,0.023,0.010,0.018,0.010,0.039,0.029,0.024,0.012,0.025,0.009,0.041,0.003,0.019,0.002,0.005,0.084,0.004,0.018,0.013,0.012,0.004,0.005,0.023], [0.030,0.008,0.017,0.033,0.011,0.020,0.103,0.009,0.289,0.004,0.006,0.030,0.022,0.007,0.021,0.011,0.108,0.031,0.013,0.008,0.020,0.006,0.023,0.002,0.018,0.001,0.004,0.102,0.005,0.012,0.007,0.007,0.002,0.003,0.009], [0.034,0.024,0.018,0.003,0.025,0.005,0.008,0.025,0.053,0.010,0.008,0.045,0.036,0.006,0.050,0.119,0.002,0.035,0.028,0.003,0.029,0.005,0.014,0.017,0.007,0.060,0.275,0.006,0.019,0.002,0.013,0.004,0.003,0.006,0.005], [0.016,0.004,0.002,0.000,0.130,0.003,0.080,0.005,0.004,0.003,0.017,0.005,0.038,0.002,0.015,0.014,0.002,0.011,0.027,0.004,0.378,0.016,0.051,0.019,0.004,0.002,0.020,0.012,0.004,0.006,0.040,0.013,0.023,0.020,0.008]] KR8877J_4 = [[0.006,0.004,0.007,0.052,0.002,0.012,0.005,0.066,0.002,0.043,0.036,0.007,0.007,0.051,0.001,0.001,0.002,0.008,0.037,0.401,0.002,0.008,0.017,0.004,0.013,0.010,0.014,0.004,0.004,0.016,0.077,0.021,0.038,0.018,0.006], [0.001,0.001,0.012,0.008,0.013,0.004,0.002,0.462,0.004,0.011,0.022,0.008,0.006,0.006,0.006,0.052,0.000,0.012,0.018,0.012,0.005,0.002,0.007,0.000,0.002,0.046,0.009,0.009,0.040,0.000,0.039,0.002,0.012,0.031,0.136], [0.004,0.003,0.007,0.042,0.001,0.008,0.005,0.060,0.002,0.062,0.050,0.005,0.004,0.053,0.000,0.001,0.002,0.006,0.033,0.422,0.001,0.008,0.017,0.004,0.011,0.007,0.010,0.003,0.002,0.013,0.065,0.024,0.045,0.017,0.003], [0.029,0.015,0.032,0.058,0.018,0.013,0.067,0.012,0.287,0.006,0.010,0.025,0.016,0.007,0.017,0.009,0.059,0.023,0.026,0.011,0.016,0.006,0.033,0.003,0.017,0.001,0.006,0.118,0.004,0.014,0.009,0.012,0.004,0.003,0.012], [0.056,0.011,0.024,0.034,0.027,0.015,0.065,0.013,0.271,0.006,0.007,0.062,0.028,0.013,0.026,0.014,0.030,0.039,0.027,0.011,0.019,0.006,0.031,0.003,0.027,0.005,0.009,0.061,0.006,0.014,0.011,0.006,0.002,0.004,0.016], [0.041,0.020,0.022,0.002,0.019,0.004,0.007,0.024,0.046,0.016,0.008,0.051,0.036,0.006,0.051,0.109,0.002,0.030,0.027,0.003,0.024,0.005,0.015,0.017,0.008,0.067,0.286,0.005,0.015,0.003,0.014,0.003,0.002,0.005,0.003], [0.014,0.003,0.002,0.000,0.106,0.007,0.079,0.007,0.004,0.003,0.014,0.010,0.041,0.004,0.013,0.011,0.001,0.014,0.031,0.007,0.377,0.022,0.049,0.017,0.004,0.003,0.014,0.009,0.004,0.009,0.050,0.013,0.016,0.034,0.008]] KR8877J_5 = [[0.008,0.004,0.008,0.064,0.001,0.018,0.009,0.041,0.003,0.043,0.035,0.008,0.005,0.076,0.001,0.001,0.004,0.009,0.037,0.382,0.001,0.011,0.024,0.005,0.015,0.006,0.007,0.005,0.002,0.030,0.057,0.031,0.029,0.017,0.004], [0.002,0.004,0.004,0.044,0.001,0.012,0.005,0.068,0.001,0.043,0.052,0.003,0.005,0.030,0.001,0.002,0.001,0.007,0.041,0.350,0.003,0.007,0.019,0.005,0.007,0.004,0.011,0.005,0.003,0.007,0.099,0.035,0.076,0.038,0.004], [0.001,0.001,0.015,0.011,0.009,0.004,0.002,0.517,0.004,0.012,0.028,0.007,0.005,0.007,0.005,0.035,0.000,0.011,0.014,0.012,0.005,0.003,0.010,0.000,0.002,0.030,0.006,0.009,0.029,0.000,0.039,0.002,0.016,0.034,0.114], [0.026,0.010,0.036,0.064,0.011,0.009,0.052,0.010,0.360,0.004,0.007,0.022,0.015,0.005,0.017,0.006,0.067,0.019,0.017,0.008,0.013,0.006,0.026,0.002,0.015,0.001,0.004,0.121,0.003,0.011,0.006,0.010,0.003,0.002,0.011], [0.044,0.017,0.027,0.037,0.024,0.016,0.079,0.010,0.259,0.006,0.009,0.032,0.023,0.009,0.022,0.012,0.064,0.031,0.026,0.010,0.019,0.007,0.034,0.004,0.021,0.002,0.007,0.086,0.005,0.018,0.011,0.011,0.003,0.003,0.011], [0.033,0.013,0.021,0.002,0.014,0.003,0.006,0.023,0.033,0.015,0.009,0.048,0.040,0.007,0.056,0.098,0.002,0.032,0.023,0.003,0.023,0.006,0.013,0.015,0.009,0.069,0.331,0.005,0.018,0.002,0.012,0.003,0.002,0.005,0.003], [0.017,0.004,0.002,0.000,0.096,0.008,0.095,0.007,0.004,0.003,0.013,0.012,0.045,0.006,0.017,0.013,0.002,0.016,0.029,0.007,0.360,0.023,0.045,0.023,0.005,0.004,0.018,0.008,0.005,0.010,0.042,0.011,0.013,0.032,0.007]] KR8877J_6 = [[0.007,0.004,0.007,0.082,0.002,0.023,0.009,0.029,0.003,0.024,0.024,0.008,0.006,0.062,0.001,0.001,0.005,0.009,0.032,0.391,0.002,0.012,0.020,0.005,0.016,0.004,0.006,0.006,0.002,0.037,0.061,0.041,0.033,0.019,0.006], [0.004,0.004,0.008,0.078,0.001,0.013,0.005,0.059,0.002,0.044,0.041,0.006,0.005,0.052,0.001,0.001,0.002,0.008,0.036,0.366,0.001,0.010,0.015,0.003,0.011,0.008,0.008,0.005,0.004,0.015,0.074,0.035,0.045,0.023,0.007], [0.001,0.001,0.013,0.010,0.015,0.006,0.004,0.299,0.004,0.011,0.021,0.011,0.009,0.010,0.009,0.044,0.000,0.021,0.023,0.017,0.008,0.004,0.007,0.000,0.003,0.056,0.008,0.014,0.056,0.000,0.040,0.002,0.016,0.039,0.217], [0.021,0.011,0.022,0.060,0.018,0.026,0.090,0.014,0.234,0.005,0.011,0.025,0.016,0.009,0.015,0.011,0.052,0.030,0.029,0.015,0.019,0.007,0.030,0.003,0.016,0.001,0.003,0.134,0.006,0.013,0.011,0.014,0.004,0.005,0.020], [0.031,0.012,0.027,0.036,0.023,0.020,0.053,0.018,0.269,0.006,0.008,0.029,0.036,0.007,0.029,0.021,0.046,0.030,0.028,0.009,0.023,0.007,0.027,0.003,0.020,0.002,0.010,0.098,0.010,0.009,0.016,0.009,0.004,0.005,0.018], [0.036,0.019,0.017,0.002,0.027,0.004,0.009,0.027,0.063,0.012,0.008,0.045,0.035,0.006,0.050,0.140,0.002,0.036,0.030,0.003,0.031,0.004,0.017,0.016,0.007,0.055,0.239,0.007,0.018,0.002,0.014,0.004,0.003,0.006,0.004], [0.018,0.004,0.002,0.000,0.186,0.004,0.107,0.005,0.005,0.003,0.010,0.008,0.041,0.004,0.017,0.018,0.001,0.012,0.034,0.004,0.300,0.014,0.036,0.018,0.004,0.004,0.020,0.010,0.005,0.008,0.049,0.009,0.011,0.020,0.008]] KR508WW_1 = [[0.006,0.022,0.004,0.041,0.023,0.045,0.008,0.062,0.008,0.005,0.019,0.008,0.003,0.005,0.004,0.021,0.002,0.055,0.037,0.029,0.019,0.004,0.025,0.022,0.003,0.005,0.017,0.014,0.007,0.012,0.038,0.303,0.078,0.030,0.018],[0.007,0.043,0.002,0.003,0.034,0.016,0.018,0.005,0.003,0.005,0.018,0.002,0.007,0.002,0.012,0.016,0.005,0.046,0.046,0.008,0.108,0.013,0.055,0.121,0.002,0.001,0.022,0.016,0.003,0.013,0.040,0.198,0.057,0.050,0.004],[0.037,0.016,0.016,0.006,0.056,0.013,0.073,0.014,0.030,0.016,0.027,0.009,0.034,0.011,0.029,0.015,0.018,0.033,0.059,0.018,0.080,0.030,0.057,0.021,0.019,0.004,0.017,0.045,0.009,0.020,0.043,0.045,0.039,0.020,0.021],[0.001,0.004,0.004,0.045,0.001,0.505,0.058,0.008,0.006,0.002,0.002,0.022,0.011,0.022,0.052,0.009,0.020,0.018,0.028,0.022,0.009,0.007,0.002,0.001,0.005,0.001,0.001,0.055,0.017,0.002,0.007,0.006,0.002,0.029,0.013],[0.031,0.023,0.019,0.004,0.011,0.006,0.011,0.020,0.041,0.016,0.016,0.030,0.045,0.006,0.043,0.063,0.006,0.033,0.025,0.007,0.048,0.007,0.019,0.039,0.008,0.015,0.341,0.012,0.011,0.003,0.015,0.009,0.007,0.006,0.003],[0.004,0.031,0.002,0.004,0.089,0.008,0.033,0.009,0.002,0.004,0.021,0.003,0.018,0.003,0.006,0.011,0.001,0.013,0.088,0.025,0.153,0.015,0.032,0.017,0.005,0.002,0.019,0.024,0.020,0.003,0.073,0.057,0.103,0.082,0.019]] KR508WW_2 = [[0.024,0.037,0.003,0.003,0.114,0.036,0.056,0.010,0.014,0.005,0.017,0.025,0.005,0.010,0.010,0.028,0.004,0.123,0.088,0.011,0.021,0.011,0.032,0.049,0.004,0.009,0.011,0.013,0.006,0.052,0.027,0.117,0.007,0.009,0.008],[0.020,0.005,0.020,0.037,0.010,0.019,0.068,0.010,0.346,0.006,0.005,0.025,0.016,0.006,0.023,0.014,0.061,0.028,0.019,0.009,0.018,0.006,0.027,0.002,0.014,0.001,0.004,0.129,0.004,0.013,0.009,0.009,0.002,0.003,0.013],[0.024,0.023,0.007,0.008,0.081,0.018,0.070,0.007,0.008,0.007,0.016,0.031,0.017,0.063,0.004,0.003,0.003,0.053,0.084,0.104,0.019,0.026,0.056,0.005,0.056,0.018,0.006,0.015,0.014,0.028,0.046,0.012,0.013,0.035,0.020],[0.001,0.005,0.003,0.038,0.002,0.527,0.075,0.007,0.007,0.003,0.002,0.031,0.009,0.025,0.032,0.007,0.021,0.019,0.024,0.028,0.008,0.007,0.003,0.002,0.006,0.001,0.001,0.044,0.010,0.003,0.007,0.007,0.002,0.022,0.011],[0.031,0.013,0.018,0.002,0.012,0.003,0.007,0.028,0.022,0.021,0.019,0.035,0.036,0.009,0.044,0.086,0.002,0.034,0.029,0.005,0.028,0.007,0.015,0.026,0.008,0.066,0.338,0.005,0.019,0.002,0.014,0.004,0.004,0.006,0.002],[0.008,0.002,0.002,0.001,0.090,0.002,0.036,0.007,0.003,0.002,0.024,0.003,0.036,0.003,0.006,0.009,0.001,0.011,0.031,0.011,0.448,0.010,0.054,0.008,0.004,0.002,0.018,0.015,0.004,0.003,0.049,0.011,0.046,0.031,0.014]] KR508WW_3 = [[0.012,0.059,0.002,0.007,0.019,0.034,0.011,0.007,0.006,0.004,0.009,0.008,0.003,0.003,0.006,0.013,0.004,0.072,0.032,0.013,0.015,0.007,0.012,0.102,0.002,0.004,0.025,0.006,0.003,0.029,0.013,0.427,0.020,0.007,0.004],[0.009,0.072,0.003,0.007,0.035,0.035,0.007,0.015,0.011,0.005,0.006,0.007,0.007,0.002,0.013,0.061,0.003,0.081,0.074,0.007,0.020,0.005,0.016,0.051,0.002,0.008,0.053,0.012,0.010,0.016,0.048,0.254,0.018,0.018,0.010],[0.024,0.006,0.023,0.039,0.014,0.031,0.098,0.011,0.270,0.005,0.007,0.028,0.020,0.008,0.023,0.013,0.071,0.027,0.023,0.010,0.019,0.009,0.026,0.002,0.016,0.001,0.003,0.112,0.005,0.015,0.009,0.010,0.002,0.004,0.016],[0.279,0.011,0.042,0.008,0.009,0.002,0.024,0.005,0.046,0.028,0.012,0.013,0.063,0.017,0.015,0.004,0.106,0.013,0.019,0.012,0.006,0.015,0.037,0.011,0.086,0.008,0.030,0.010,0.003,0.049,0.010,0.003,0.002,0.001,0.002],[0.001,0.004,0.003,0.085,0.001,0.557,0.023,0.007,0.004,0.004,0.002,0.017,0.005,0.032,0.029,0.005,0.025,0.022,0.028,0.028,0.003,0.006,0.002,0.002,0.005,0.001,0.001,0.037,0.009,0.003,0.009,0.011,0.003,0.022,0.006],[0.044,0.025,0.023,0.002,0.025,0.004,0.006,0.024,0.056,0.014,0.008,0.045,0.029,0.006,0.053,0.116,0.003,0.036,0.025,0.002,0.022,0.005,0.019,0.019,0.007,0.062,0.270,0.005,0.013,0.003,0.013,0.004,0.002,0.005,0.003],[0.014,0.001,0.003,0.000,0.086,0.002,0.052,0.009,0.007,0.003,0.020,0.006,0.039,0.004,0.009,0.010,0.001,0.014,0.022,0.009,0.430,0.015,0.059,0.007,0.005,0.003,0.015,0.015,0.003,0.005,0.049,0.011,0.027,0.022,0.021]] KR508WW_4 = [[0.005,0.060,0.001,0.009,0.015,0.060,0.006,0.010,0.005,0.003,0.005,0.005,0.003,0.002,0.005,0.025,0.003,0.059,0.042,0.008,0.011,0.004,0.007,0.056,0.001,0.003,0.019,0.007,0.004,0.020,0.021,0.486,0.017,0.009,0.006],[0.016,0.069,0.004,0.004,0.089,0.021,0.017,0.011,0.016,0.005,0.008,0.009,0.011,0.002,0.018,0.070,0.003,0.069,0.067,0.005,0.048,0.006,0.030,0.065,0.002,0.008,0.053,0.013,0.008,0.020,0.040,0.151,0.016,0.017,0.010],[0.041,0.006,0.028,0.030,0.015,0.008,0.070,0.007,0.399,0.004,0.006,0.027,0.015,0.006,0.018,0.007,0.068,0.024,0.013,0.005,0.013,0.006,0.033,0.002,0.015,0.001,0.003,0.085,0.002,0.017,0.005,0.008,0.001,0.002,0.008],[0.315,0.009,0.027,0.008,0.009,0.002,0.011,0.004,0.032,0.039,0.006,0.010,0.063,0.022,0.010,0.003,0.058,0.012,0.024,0.016,0.005,0.010,0.022,0.008,0.137,0.017,0.043,0.008,0.004,0.047,0.012,0.002,0.002,0.001,0.002],[0.001,0.010,0.003,0.105,0.001,0.457,0.016,0.020,0.003,0.011,0.005,0.016,0.005,0.036,0.015,0.009,0.013,0.020,0.062,0.048,0.003,0.006,0.002,0.004,0.006,0.003,0.003,0.020,0.016,0.004,0.020,0.019,0.006,0.027,0.005],[0.034,0.016,0.018,0.002,0.016,0.004,0.006,0.028,0.034,0.014,0.009,0.049,0.033,0.007,0.051,0.115,0.002,0.035,0.024,0.003,0.023,0.005,0.013,0.019,0.007,0.072,0.312,0.004,0.016,0.002,0.011,0.003,0.002,0.005,0.003],[0.011,0.002,0.003,0.001,0.103,0.002,0.048,0.006,0.006,0.003,0.024,0.003,0.036,0.003,0.008,0.008,0.001,0.010,0.028,0.008,0.421,0.014,0.063,0.008,0.004,0.002,0.014,0.020,0.003,0.004,0.048,0.011,0.038,0.023,0.015]] KR508WW_5 = [[0.003,0.029,0.001,0.009,0.008,0.048,0.005,0.007,0.004,0.002,0.003,0.003,0.002,0.001,0.003,0.017,0.002,0.043,0.033,0.010,0.007,0.003,0.004,0.029,0.001,0.002,0.011,0.006,0.003,0.019,0.020,0.635,0.015,0.006,0.007],[0.012,0.091,0.002,0.005,0.052,0.037,0.010,0.009,0.007,0.004,0.006,0.008,0.008,0.003,0.010,0.041,0.002,0.064,0.073,0.009,0.024,0.006,0.017,0.076,0.002,0.008,0.052,0.007,0.006,0.027,0.043,0.239,0.016,0.016,0.008],[0.029,0.011,0.031,0.043,0.018,0.019,0.090,0.008,0.236,0.004,0.010,0.026,0.025,0.011,0.022,0.007,0.065,0.026,0.030,0.012,0.017,0.014,0.032,0.002,0.022,0.001,0.003,0.117,0.005,0.015,0.011,0.010,0.003,0.005,0.019],[0.330,0.006,0.020,0.009,0.007,0.002,0.015,0.004,0.031,0.030,0.009,0.012,0.047,0.029,0.008,0.002,0.058,0.014,0.016,0.019,0.005,0.011,0.024,0.008,0.183,0.012,0.024,0.008,0.003,0.043,0.007,0.002,0.002,0.001,0.002],[0.001,0.004,0.002,0.067,0.001,0.644,0.015,0.007,0.002,0.005,0.002,0.020,0.003,0.031,0.017,0.006,0.009,0.018,0.030,0.027,0.002,0.006,0.001,0.002,0.003,0.001,0.001,0.015,0.005,0.004,0.010,0.014,0.002,0.020,0.004],[0.032,0.022,0.024,0.002,0.018,0.006,0.010,0.027,0.038,0.016,0.012,0.046,0.037,0.007,0.058,0.110,0.003,0.041,0.026,0.005,0.037,0.007,0.019,0.024,0.008,0.046,0.257,0.006,0.017,0.002,0.013,0.006,0.004,0.008,0.004],[0.014,0.003,0.002,0.000,0.087,0.005,0.097,0.007,0.004,0.003,0.017,0.007,0.041,0.004,0.015,0.013,0.002,0.013,0.024,0.006,0.413,0.018,0.046,0.017,0.004,0.002,0.016,0.011,0.005,0.006,0.038,0.010,0.018,0.023,0.008]] KR508WW_6 = [[0.008,0.069,0.002,0.006,0.029,0.041,0.010,0.008,0.006,0.003,0.006,0.007,0.004,0.002,0.008,0.036,0.002,0.060,0.052,0.009,0.017,0.004,0.010,0.081,0.001,0.006,0.030,0.006,0.005,0.025,0.021,0.397,0.016,0.009,0.007],[0.010,0.087,0.002,0.008,0.019,0.041,0.008,0.006,0.005,0.004,0.006,0.006,0.004,0.003,0.010,0.025,0.004,0.057,0.047,0.010,0.017,0.006,0.010,0.100,0.002,0.005,0.041,0.008,0.006,0.027,0.024,0.357,0.019,0.011,0.004],[0.032,0.009,0.039,0.034,0.019,0.017,0.078,0.014,0.252,0.008,0.010,0.029,0.031,0.011,0.024,0.013,0.052,0.025,0.032,0.012,0.016,0.011,0.041,0.002,0.023,0.002,0.005,0.091,0.006,0.014,0.014,0.008,0.003,0.005,0.018],[0.368,0.005,0.019,0.009,0.010,0.002,0.025,0.004,0.059,0.019,0.007,0.017,0.038,0.025,0.011,0.002,0.068,0.016,0.013,0.012,0.006,0.010,0.029,0.008,0.116,0.010,0.018,0.009,0.002,0.051,0.005,0.003,0.002,0.001,0.002],[0.001,0.004,0.002,0.055,0.001,0.660,0.017,0.005,0.003,0.004,0.001,0.022,0.003,0.025,0.024,0.007,0.011,0.020,0.026,0.020,0.003,0.005,0.001,0.002,0.003,0.001,0.001,0.022,0.006,0.003,0.008,0.011,0.002,0.020,0.005],[0.039,0.015,0.019,0.001,0.027,0.004,0.009,0.028,0.057,0.012,0.007,0.062,0.041,0.006,0.054,0.141,0.002,0.029,0.029,0.003,0.026,0.005,0.015,0.012,0.007,0.082,0.221,0.004,0.016,0.002,0.013,0.002,0.002,0.005,0.005],[0.019,0.003,0.002,0.000,0.203,0.003,0.075,0.007,0.004,0.003,0.017,0.007,0.033,0.003,0.010,0.010,0.001,0.011,0.028,0.004,0.331,0.019,0.050,0.015,0.004,0.003,0.016,0.009,0.003,0.008,0.045,0.011,0.015,0.020,0.009]] KR508WW_7 = [[0.006,0.080,0.002,0.009,0.017,0.070,0.009,0.011,0.004,0.004,0.006,0.009,0.003,0.003,0.007,0.032,0.002,0.064,0.053,0.013,0.012,0.005,0.007,0.074,0.002,0.010,0.026,0.004,0.007,0.022,0.021,0.368,0.017,0.015,0.006],[0.009,0.081,0.003,0.005,0.035,0.041,0.019,0.008,0.011,0.005,0.006,0.008,0.009,0.003,0.019,0.043,0.004,0.068,0.069,0.009,0.040,0.008,0.020,0.073,0.002,0.005,0.038,0.016,0.008,0.019,0.037,0.227,0.019,0.023,0.009],[0.041,0.007,0.025,0.017,0.026,0.016,0.109,0.009,0.280,0.005,0.007,0.050,0.032,0.010,0.026,0.014,0.035,0.029,0.024,0.010,0.023,0.010,0.034,0.002,0.019,0.003,0.005,0.066,0.004,0.016,0.011,0.008,0.002,0.004,0.018],[0.372,0.008,0.019,0.008,0.010,0.002,0.019,0.004,0.047,0.031,0.006,0.016,0.037,0.025,0.010,0.003,0.053,0.017,0.018,0.013,0.006,0.008,0.029,0.010,0.110,0.013,0.024,0.007,0.002,0.060,0.007,0.003,0.002,0.001,0.002],[0.001,0.006,0.002,0.054,0.001,0.599,0.029,0.008,0.003,0.005,0.003,0.025,0.004,0.031,0.023,0.007,0.011,0.018,0.029,0.029,0.004,0.007,0.002,0.002,0.003,0.001,0.001,0.020,0.007,0.003,0.010,0.011,0.003,0.033,0.005],[0.049,0.016,0.042,0.002,0.017,0.002,0.009,0.019,0.048,0.024,0.015,0.045,0.048,0.008,0.054,0.062,0.003,0.025,0.028,0.005,0.027,0.010,0.021,0.017,0.015,0.055,0.281,0.007,0.014,0.003,0.015,0.003,0.004,0.005,0.003],[0.015,0.002,0.003,0.001,0.109,0.002,0.063,0.007,0.008,0.004,0.021,0.005,0.048,0.004,0.011,0.010,0.002,0.010,0.029,0.008,0.362,0.019,0.065,0.008,0.007,0.002,0.015,0.018,0.005,0.006,0.061,0.008,0.026,0.023,0.013]] KR508WW_8 = [[0.006,0.070,0.001,0.011,0.013,0.053,0.004,0.010,0.003,0.003,0.005,0.005,0.002,0.002,0.003,0.019,0.001,0.054,0.042,0.014,0.007,0.003,0.006,0.062,0.001,0.006,0.028,0.004,0.004,0.020,0.019,0.484,0.021,0.008,0.005],[0.008,0.057,0.003,0.005,0.143,0.022,0.017,0.020,0.007,0.004,0.017,0.010,0.006,0.003,0.011,0.052,0.001,0.073,0.094,0.008,0.055,0.007,0.034,0.047,0.002,0.009,0.025,0.012,0.012,0.010,0.041,0.098,0.028,0.046,0.015],[0.017,0.012,0.023,0.079,0.011,0.036,0.066,0.023,0.124,0.011,0.010,0.035,0.024,0.021,0.019,0.010,0.033,0.042,0.035,0.039,0.019,0.008,0.033,0.002,0.040,0.003,0.005,0.115,0.015,0.008,0.020,0.009,0.007,0.016,0.028],[0.277,0.007,0.025,0.012,0.007,0.003,0.022,0.004,0.042,0.037,0.009,0.019,0.058,0.034,0.013,0.002,0.052,0.013,0.023,0.024,0.008,0.013,0.026,0.011,0.139,0.011,0.033,0.011,0.003,0.046,0.008,0.003,0.003,0.001,0.002],[0.073,0.013,0.063,0.005,0.048,0.001,0.012,0.040,0.124,0.008,0.022,0.084,0.037,0.008,0.028,0.053,0.002,0.035,0.022,0.005,0.017,0.005,0.024,0.005,0.017,0.064,0.126,0.010,0.021,0.002,0.009,0.002,0.002,0.003,0.008],[0.015,0.002,0.001,0.000,0.361,0.001,0.046,0.015,0.002,0.002,0.025,0.010,0.026,0.004,0.003,0.016,0.000,0.012,0.031,0.007,0.233,0.005,0.043,0.005,0.003,0.011,0.020,0.004,0.006,0.002,0.037,0.005,0.010,0.017,0.017]] KR8R544_1 = [[0.016,0.012,0.001,0.000,0.722,0.000,0.020,0.004,0.001,0.002,0.011,0.003,0.003,0.002,0.001,0.003,0.000,0.005,0.031,0.006,0.033,0.001,0.031,0.008,0.002,0.005,0.012,0.003,0.001,0.005,0.022,0.007,0.013,0.006,0.007],[0.001,0.004,0.002,0.057,0.001,0.573,0.029,0.005,0.005,0.002,0.002,0.013,0.008,0.014,0.032,0.008,0.032,0.021,0.023,0.021,0.006,0.005,0.002,0.001,0.004,0.000,0.001,0.063,0.012,0.003,0.009,0.013,0.003,0.017,0.008],[0.051,0.023,0.027,0.003,0.052,0.002,0.010,0.018,0.088,0.006,0.014,0.034,0.044,0.004,0.033,0.075,0.003,0.032,0.030,0.004,0.047,0.005,0.019,0.018,0.009,0.029,0.264,0.010,0.014,0.003,0.014,0.005,0.004,0.003,0.005],[0.052,0.009,0.034,0.032,0.025,0.007,0.066,0.009,0.377,0.003,0.009,0.034,0.018,0.006,0.020,0.007,0.048,0.025,0.013,0.006,0.016,0.007,0.034,0.003,0.015,0.001,0.005,0.074,0.003,0.015,0.006,0.009,0.002,0.002,0.011],[0.038,0.021,0.011,0.002,0.017,0.005,0.011,0.017,0.048,0.009,0.007,0.039,0.037,0.005,0.051,0.135,0.004,0.037,0.027,0.003,0.031,0.005,0.014,0.028,0.006,0.034,0.305,0.008,0.016,0.003,0.014,0.005,0.002,0.004,0.002],[0.018,0.003,0.002,0.000,0.154,0.003,0.086,0.006,0.005,0.003,0.015,0.007,0.037,0.004,0.014,0.011,0.001,0.011,0.031,0.005,0.337,0.019,0.050,0.017,0.004,0.003,0.017,0.011,0.004,0.009,0.052,0.011,0.018,0.024,0.008]] KR8R544_2 = [[0.032,0.019,0.001,0.000,0.627,0.000,0.030,0.004,0.002,0.004,0.015,0.004,0.003,0.004,0.001,0.002,0.000,0.011,0.034,0.009,0.025,0.002,0.049,0.016,0.004,0.010,0.014,0.004,0.001,0.012,0.020,0.010,0.017,0.007,0.005],[0.021,0.025,0.001,0.000,0.612,0.000,0.054,0.004,0.002,0.003,0.014,0.004,0.003,0.004,0.001,0.003,0.000,0.009,0.034,0.009,0.035,0.002,0.046,0.016,0.003,0.005,0.010,0.005,0.001,0.011,0.022,0.014,0.016,0.009,0.005],[0.001,0.008,0.003,0.054,0.001,0.525,0.032,0.009,0.006,0.003,0.002,0.018,0.011,0.020,0.035,0.010,0.028,0.020,0.033,0.028,0.006,0.004,0.002,0.002,0.006,0.001,0.002,0.054,0.019,0.002,0.011,0.011,0.003,0.021,0.007],[0.058,0.022,0.039,0.002,0.046,0.002,0.013,0.016,0.087,0.014,0.019,0.031,0.052,0.005,0.036,0.054,0.004,0.026,0.034,0.004,0.052,0.007,0.031,0.020,0.010,0.020,0.233,0.012,0.010,0.004,0.019,0.004,0.005,0.004,0.004],[0.025,0.012,0.031,0.048,0.013,0.013,0.055,0.012,0.321,0.006,0.008,0.022,0.019,0.006,0.024,0.012,0.056,0.023,0.025,0.009,0.019,0.005,0.029,0.003,0.014,0.001,0.008,0.126,0.005,0.011,0.010,0.011,0.004,0.003,0.011],[0.037,0.032,0.020,0.003,0.029,0.006,0.012,0.021,0.055,0.011,0.010,0.037,0.040,0.007,0.060,0.113,0.004,0.039,0.034,0.003,0.035,0.007,0.019,0.023,0.008,0.040,0.225,0.010,0.022,0.003,0.016,0.006,0.004,0.007,0.004],[0.012,0.002,0.002,0.000,0.110,0.003,0.072,0.005,0.006,0.003,0.018,0.005,0.038,0.003,0.011,0.009,0.001,0.010,0.028,0.006,0.407,0.019,0.056,0.012,0.004,0.002,0.012,0.016,0.003,0.006,0.050,0.011,0.024,0.025,0.010]] KR8R544_3 = [[0.019,0.019,0.001,0.000,0.720,0.000,0.026,0.003,0.001,0.002,0.011,0.003,0.003,0.002,0.001,0.002,0.000,0.005,0.031,0.007,0.030,0.001,0.025,0.012,0.002,0.007,0.014,0.002,0.001,0.005,0.016,0.005,0.013,0.006,0.004],[0.018,0.026,0.001,0.000,0.623,0.000,0.051,0.004,0.002,0.002,0.011,0.004,0.004,0.003,0.001,0.004,0.000,0.006,0.035,0.010,0.049,0.001,0.033,0.014,0.002,0.006,0.015,0.003,0.002,0.007,0.023,0.010,0.014,0.007,0.007],[0.001,0.003,0.002,0.033,0.001,0.694,0.026,0.005,0.004,0.001,0.001,0.017,0.005,0.013,0.026,0.009,0.017,0.016,0.015,0.015,0.004,0.003,0.001,0.001,0.003,0.001,0.000,0.036,0.010,0.002,0.006,0.007,0.001,0.016,0.006],[0.044,0.021,0.029,0.002,0.039,0.003,0.011,0.025,0.078,0.019,0.012,0.040,0.042,0.007,0.050,0.101,0.002,0.031,0.046,0.004,0.035,0.006,0.027,0.016,0.007,0.044,0.197,0.009,0.014,0.003,0.019,0.003,0.003,0.006,0.005],[0.053,0.021,0.022,0.027,0.043,0.021,0.119,0.016,0.157,0.005,0.014,0.048,0.030,0.015,0.019,0.014,0.034,0.039,0.032,0.017,0.027,0.007,0.043,0.006,0.023,0.004,0.010,0.058,0.007,0.018,0.014,0.010,0.004,0.006,0.015],[0.042,0.024,0.019,0.002,0.023,0.005,0.011,0.022,0.051,0.013,0.010,0.044,0.040,0.006,0.052,0.118,0.003,0.035,0.029,0.003,0.033,0.006,0.019,0.028,0.007,0.041,0.262,0.006,0.015,0.003,0.013,0.004,0.002,0.005,0.003],[0.015,0.002,0.002,0.000,0.105,0.003,0.077,0.006,0.005,0.003,0.019,0.006,0.037,0.004,0.012,0.010,0.002,0.012,0.025,0.006,0.402,0.017,0.054,0.016,0.004,0.002,0.016,0.013,0.004,0.007,0.046,0.011,0.023,0.023,0.009]] KR8R544_4 = [[0.021,0.018,0.001,0.000,0.646,0.000,0.055,0.003,0.001,0.002,0.014,0.003,0.004,0.002,0.001,0.004,0.000,0.006,0.033,0.006,0.047,0.002,0.036,0.015,0.002,0.005,0.014,0.003,0.001,0.006,0.019,0.007,0.012,0.005,0.004],[0.015,0.020,0.001,0.000,0.574,0.000,0.043,0.005,0.002,0.002,0.013,0.003,0.006,0.002,0.001,0.006,0.000,0.005,0.050,0.010,0.068,0.002,0.042,0.012,0.002,0.005,0.019,0.004,0.002,0.006,0.035,0.010,0.017,0.009,0.009],[0.001,0.006,0.003,0.064,0.001,0.562,0.029,0.010,0.005,0.003,0.003,0.018,0.006,0.021,0.027,0.009,0.021,0.022,0.028,0.027,0.005,0.005,0.002,0.002,0.005,0.001,0.001,0.041,0.013,0.003,0.010,0.012,0.003,0.024,0.007],[0.042,0.020,0.021,0.003,0.017,0.004,0.012,0.020,0.074,0.016,0.010,0.045,0.049,0.007,0.051,0.082,0.004,0.033,0.030,0.005,0.038,0.005,0.018,0.020,0.009,0.030,0.274,0.012,0.014,0.003,0.016,0.004,0.003,0.005,0.004],[0.025,0.006,0.010,0.034,0.011,0.039,0.105,0.014,0.259,0.008,0.005,0.038,0.019,0.012,0.022,0.019,0.056,0.039,0.018,0.013,0.027,0.005,0.032,0.003,0.020,0.002,0.004,0.094,0.007,0.013,0.012,0.006,0.003,0.006,0.012],[0.037,0.027,0.014,0.002,0.027,0.005,0.011,0.018,0.053,0.008,0.008,0.031,0.047,0.005,0.044,0.111,0.004,0.032,0.028,0.003,0.040,0.005,0.014,0.027,0.007,0.032,0.293,0.009,0.019,0.003,0.018,0.006,0.003,0.006,0.003],[0.016,0.002,0.003,0.000,0.144,0.002,0.074,0.006,0.008,0.003,0.015,0.006,0.048,0.003,0.011,0.011,0.001,0.010,0.026,0.006,0.364,0.020,0.051,0.009,0.005,0.002,0.013,0.014,0.003,0.007,0.055,0.010,0.017,0.018,0.015]] KR8R544_5 = [[0.029,0.023,0.001,0.000,0.651,0.000,0.040,0.006,0.001,0.003,0.016,0.004,0.003,0.003,0.001,0.005,0.000,0.009,0.031,0.006,0.024,0.001,0.045,0.014,0.002,0.013,0.016,0.002,0.002,0.007,0.018,0.006,0.008,0.005,0.003],[0.023,0.017,0.001,0.000,0.704,0.000,0.029,0.003,0.002,0.002,0.010,0.004,0.002,0.003,0.001,0.003,0.000,0.010,0.029,0.006,0.022,0.001,0.029,0.012,0.003,0.009,0.012,0.003,0.002,0.009,0.017,0.008,0.011,0.006,0.005],[0.001,0.002,0.002,0.025,0.001,0.603,0.078,0.005,0.007,0.001,0.001,0.025,0.008,0.015,0.030,0.008,0.019,0.017,0.015,0.016,0.008,0.006,0.002,0.001,0.004,0.000,0.000,0.047,0.009,0.002,0.004,0.005,0.001,0.016,0.013],[0.060,0.024,0.018,0.002,0.028,0.003,0.009,0.013,0.069,0.014,0.006,0.032,0.035,0.005,0.043,0.095,0.004,0.027,0.026,0.003,0.028,0.005,0.020,0.030,0.010,0.039,0.295,0.006,0.011,0.006,0.020,0.005,0.002,0.004,0.002],[0.058,0.010,0.022,0.022,0.042,0.012,0.071,0.016,0.243,0.005,0.009,0.041,0.044,0.013,0.023,0.013,0.028,0.036,0.022,0.012,0.035,0.007,0.032,0.004,0.029,0.005,0.013,0.063,0.008,0.012,0.013,0.006,0.005,0.006,0.020],[0.034,0.023,0.027,0.003,0.021,0.003,0.011,0.016,0.067,0.013,0.008,0.037,0.070,0.006,0.051,0.067,0.004,0.027,0.031,0.006,0.040,0.006,0.016,0.012,0.015,0.032,0.273,0.016,0.021,0.002,0.022,0.004,0.004,0.007,0.005],[0.018,0.003,0.001,0.000,0.500,0.001,0.051,0.004,0.002,0.001,0.013,0.006,0.024,0.002,0.006,0.012,0.000,0.009,0.035,0.003,0.151,0.011,0.035,0.007,0.003,0.004,0.013,0.005,0.003,0.006,0.040,0.006,0.006,0.011,0.007]] seq = (KR8877J, KR8877J_1, KR8877J_2, KR8877J_3, KR8877J_4, KR8877J_5, KR8877J_6) seq2 = (KR8R544_1, KR8R544_2, KR8R544_3, KR8R544_4, KR8R544_5) seq3 = (KR508WW_1, KR508WW_2, KR508WW_3, KR508WW_4, KR508WW_5, KR508WW_6, KR508WW_7, KR508WW_8) #if __name__ == "__main__": def __init__(self, max_index, threshld=0.05, parentt=None): super().__init__() self.max_index = 0 max_list_from_all_plates = [] threshold = 0.05 #textUpdateRequested = seq self.textUpdateRequested = (str) for single_lp in seq: self.maximum_plate_prob = [] self.possible_plate_prob = [] max_list = [] for sign in single_lp: high_indexes = [] for prob_id in range(0,len(sign)): if threshold<sign[prob_id]: high_indexes.append([sign[prob_id], prob_id, CATEGORIES[prob_id]]) max_list.append(high_indexes) max_list_from_all_plates.append(max_list) print(max_list_from_all_plates) #lista = [] #updateMax()
работает и делает вывод
[[[[0.077, 7, '7'], [0.058, 18, 'I'], [0.352, 19, 'J'], [0.089, 30, 'V'], [0.053, 32, 'X']], [[0.075, 3, '3'], [0.36, 19, 'J'], [0.092, 30, 'V'], [0.058, 32, 'X']], [[0.627, 7, '7'], [0.053, 34, 'Z']], [[0.056, 0, '0'], [0.412, 8, '8'], [0.073, 16, 'G'], [0.074, 27, 'S']], [[0.09, 6, '6'], [0.258, 8, '8'], [0.079, 16, 'G'], [0.106, 27, 'S']], [[0.1, 15, 'F'], [0.317, 26, 'R']], [[0.164, 4, '4'], [0.06, 6, '6'], [0.383, 20, 'K'], [0.063, 22, 'M']]]]
[[[[0.077, 7, '7'], [0.058, 18, 'I'], [0.352, 19, 'J'], [0.089, 30, 'V'], [0.053, 32, 'X']], [[0.075, 3, '3'], [0.36, 19, 'J'], [0.092, 30, 'V'], [0.058, 32, 'X']], [[0.627, 7, '7'], [0.053, 34, 'Z']], [[0.056, 0, '0'], [0.412, 8, '8'], [0.073, 16, 'G'], [0.074, 27, 'S']], [[0.09, 6, '6'], [0.258, 8, '8'], [0.079, 16, 'G'], [0.106, 27, 'S']], [[0.1, 15, 'F'], [0.317, 26, 'R']], [[0.164, 4, '4'], [0.06, 6, '6'], [0.383, 20, 'K'], [0.063, 22, 'M']]], [[[0.054, 7, '7'], [0.051, 10, 'A'], [0.056, 18, 'I'], [0.389, 19, 'J'], [0.07, 30, 'V']], [[0.083, 7, '7'], [0.062, 9, '9'], [0.053, 10, 'A'], [0.055, 18, 'I'], [0.348, 19, 'J'], [0.086, 30, 'V'], [0.055, 32, 'X']], [[0.499, 7, '7'], [0.053, 25, 'P'], [0.123, 34, 'Z']], [[0.054, 6, '6'], [0.369, 8, '8'], [0.1, 16, 'G'], [0.102, 27, 'S']], [[0.075, 6, '6'], [0.365, 8, '8'], [0.075, 16, 'G'], [0.099, 27, 'S']], [[0.11, 15, 'F'], [0.059, 25, 'P'], [0.289, 26, 'R']], [[0.134, 4, '4'], [0.088, 6, '6'], [0.342, 20, 'K']]]]
[[[[0.077, 7, '7'], [0.058, 18, 'I'], [0.352, 19, 'J'], [0.089, 30, 'V'], [0.053, 32, 'X']], [[0.075, 3, '3'], [0.36, 19, 'J'], [0.092, 30, 'V'], [0.058, 32, 'X']], [[0.627, 7, '7'], [0.053, 34, 'Z']], [[0.056, 0, '0'], [0.412, 8, '8'], [0.073, 16, 'G'], [0.074, 27, 'S']], [[0.09, 6, '6'], [0.258, 8, '8'], [0.079, 16, 'G'], [0.106, 27, 'S']], [[0.1, 15, 'F'], [0.317, 26, 'R']], [[0.164, 4, '4'], [0.06, 6, '6'], [0.383, 20, 'K'], [0.063, 22, 'M']]], [[[0.054, 7, '7'], [0.051, 10, 'A'], [0.056, 18, 'I'], [0.389, 19, 'J'], [0.07, 30, 'V']], [[0.083, 7, '7'], [0.062, 9, '9'], [0.053, 10, 'A'], [0.055, 18, 'I'], [0.348, 19, 'J'], [0.086, 30, 'V'], [0.055, 32, 'X']], [[0.499, 7, '7'], [0.053, 25, 'P'], [0.123, 34, 'Z']], [[0.054, 6, '6'], [0.369, 8, '8'], [0.1, 16, 'G'], [0.102, 27, 'S']], [[0.075, 6, '6'], [0.365, 8, '8'], [0.075, 16, 'G'], [0.099, 27, 'S']], [[0.11, 15, 'F'], [0.059, 25, 'P'], [0.289, 26, 'R']], [[0.134, 4, '4'], [0.088, 6, '6'], [0.342, 20, 'K']]], [[[0.073, 7, '7'], [0.384, 19, 'J'], [0.088, 30, 'V'], [0.066, 32, 'X']], [[0.089, 7, '7'], [0.051, 18, 'I'], [0.387, 19, 'J'], [0.09, 30, 'V'], [0.064, 32, 'X']], [[0.282, 7, '7'], [0.053, 25, 'P'], [0.224, 34, 'Z']], [[0.097, 6, '6'], [0.239, 8, '8'], [0.082, 16, 'G'], [0.11, 27, 'S']], [[0.053, 3, '3'], [0.057, 6, '6'], [0.25, 8, '8'], [0.057, 16, 'G'], [0.092, 27, 'S']], [[0.069, 8, '8'], [0.057, 14, 'E'], [0.096, 15, 'F'], [0.256, 26, 'R']], [[0.174, 4, '4'], [0.085, 6, '6'], [0.357, 20, 'K']]]]
как я понимаю проблема во второй части
def updateMax(self): self.maxProbIds = [] self.currentMaxIDs = [] for letterProbability in self.max_list: ids = [] maxValID = 0 for probabilityId in range(0, len(letterProbability)): if(letterProbability[probabilityId]>letterProbability[maxValID]): maxValID = probabilityId if(letterProbability[probabilityId]>self.threshold): ids.append(probabilityId) if(len(ids)==0): ids.append(maxValID) accuracy += letterProbability[maxValID] self.maxProbIds.append(ids) self.currentMaxIDs.append(maxValID) accuracy /= float(len(self.max_list)) #currentText = "" predictionShow = "" for i in range(len(self.currentMaxIDs)): predictionShow += CATEGORIES[self.currentMaxIDs[i]] + ": " + str(self.max_list[i][self.currentMaxIDs[i]]) + " " print("print", predictionShow)
Рекомендуем хостинг TIMEWEB
Стабильный хостинг, на котором располагается социальная сеть EVILEG. Для проектов на Django рекомендуем VDS хостинг.Вам это нравится? Поделитесь в социальных сетях!
Комментарии
Пожалуйста, авторизуйтесь или зарегистрируйтесь
- Akiv Doros
- 11 ноября 2024 г. 20:58
C++ - Тест 004. Указатели, Массивы и Циклы
- Результат:50баллов,
- Очки рейтинга-4
- molni99
- 26 октября 2024 г. 7:37
C++ - Тест 004. Указатели, Массивы и Циклы
- Результат:80баллов,
- Очки рейтинга4
- molni99
- 26 октября 2024 г. 7:29
C++ - Тест 004. Указатели, Массивы и Циклы
- Результат:20баллов,
- Очки рейтинга-10