donEnno / gamma_delta

1 stars 0 forks source link

ValueError: Bad node degree (-104.0) #4

Closed donEnno closed 3 years ago

donEnno commented 3 years ago

Ich habe community_louvain.best_partition(G) für Patient 2 bekomme ich ValueError: Bad node degree (-104.0). Wenn ich mir dir degrees anschaue sind nur positive Werte dabei. Bei den Gewichten allerdings gibt es genau einen negativen Wert.

degrees = G.degree()
dict(degrees).values
dict_values([1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1066, 1067, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 974, 1067, 1067, 1066, 1066, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1066, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1066, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1066, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1066, 1067, 1066, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1066, 1066, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1066, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1066, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1066, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067, 1067])

degrees = G.degree(weight='weight')
dict(degrees).values())
dict_values([66745.0, 63197.0, 52214.5, 60540.0, 57531.5, 66954.5, 60056.5, 54753.5, 70391.5, 61707.5, 54376.5, 58217.5, 66116.5, 67656.5, 65438.5, 66749.5, 64536.5, 66601.5, 67528.5, 58300.5, 66884.5, 59941.5, 63859.5, 35784.5, 64576.5, 66008.0, 64696.5, 65298.0, 56710.5, 59118.5, 65133.5, 57792.5, 67741.0, 66468.5, 48637.0, 63358.5, 52242.5, 60858.0, 46889.0, 66478.0, 63795.5, 67402.0, 66547.0, 66881.5, 61822.5, 60654.5, 59324.5, 63814.0, 53894.5, 69271.0, 65351.5, 62768.0, 61088.5, 42002.5, 65359.0, 66835.0, 67211.0, 53699.5, 60477.5, 56403.0, 59068.0, 58666.0, 53805.5, 67263.0, 67864.0, 62918.0, 63669.5, 64876.5, 68578.5, 66287.5, 61437.0, 64223.0, 40790.5, 62963.5, 62068.5, 55104.0, 61253.5, 69480.5, 57548.0, 62688.0, 68278.5, 62601.0, 65322.5, 59523.5, 57698.0, 62629.5, 62656.0, 53809.5, 65441.0, 62249.5, 59510.0, 69009.5, 67380.5, 63315.5, 62195.5, 61679.5, 66580.5, 67136.5, 56450.0, 65906.0, 68447.5, 59408.0, 66256.5, 63176.5, 52981.0, 33514.0, 55136.0, 65452.0, 63751.0, 57969.5, 61836.0, 63021.0, 51322.5, 62051.5, 47535.0, 67148.0, 67465.0, 57342.0, 65187.0, 64776.5, 66082.5, 56410.5, 53048.0, 67214.0, 63576.5, 54145.5, 61966.0, 68224.5, 66629.5, 62309.5, 65846.0, 60864.0, 62169.0, 66362.0, 44858.0, 68880.0, 61632.0, 62162.0, 63798.5, 62612.5, 49592.5, 53182.0, 61388.0, 62635.5, 68017.5, 69158.0, 57619.0, 63393.5, 62919.0, 62704.5, 39891.0, 57229.0, 61194.5, 61460.0, 69146.0, 64787.5, 65619.5, 63500.0, 55651.0, 50574.5, 69482.5, 62478.0, 57101.5, 67568.5, 64502.0, 57539.5, 62697.0, 59859.5, 57789.0, 24678.0, 63542.0, 56776.5, 67576.0, 55334.5, 60779.5, 70408.5, 56374.5, 58403.5, 68810.5, 62188.0, 66763.5, 58821.5, 69138.0, 60376.0, 58425.0, 60550.5, 68627.5, 63598.0, 64001.5, 69652.5, 65155.5, 61406.0, 63104.0, 66714.5, 65280.0, 55875.0, 68032.0, 68171.5, 63673.5, 57207.5, 62748.5, 64287.5, 70218.0, 63881.5, 57538.0, 60494.0, 60288.5, 67656.5, 67342.5, 59005.5, 55976.5, 61000.0, 57303.5, 66772.0, 67136.5, 61683.5, 53340.0, 61689.0, 62119.5, 50346.0, 60052.5, 59790.5, 59921.5, 55350.0, 56831.0, 67535.5, 67560.5, 66080.0, 63202.5, 57538.0, 54807.5, 56478.5, 57595.5, 64000.0, 66684.0, 68228.0, 67349.5, 57065.5, 63010.0, 65888.0, 56257.0, -104.0, 58463.0, 63783.5, 60793.5, 68262.5, 68450.5, 66308.0, 61501.5, 59087.0, 58530.5, 63547.0, 65631.5, 61532.5, 54208.5, 56970.5, 55825.0, 63626.5, 63155.0, 66557.5, 65108.0, 66738.5, 68167.0, 59103.0, 65652.5, 61664.5, 60336.0, 53795.0, 57023.0, 58663.5, 62933.5, 66501.0, 62796.0, 67646.5, 67945.0, 56701.5, 57914.0, 58030.0, 64028.5, 41266.5, 65687.0, 56402.0, 58300.5, 56312.5, 64411.0, 64711.0, 62737.0, 55431.0, 67038.5, 59318.0, 61229.0, 68920.5, 63306.5, 38894.0, 65750.5, 53711.5, 51048.5, 65518.5, 66716.5, 59574.0, 51509.0, 58199.0, 57199.0, 56834.5, 68437.5, 66700.5, 64738.0, 44551.0, 40491.0, 36196.5, 58060.5, 64869.5, 58590.5, 48569.0, 66806.0, 68719.0, 61316.5, 66860.0, 59073.5, 57170.5, 66187.0, 68357.5, 65784.0, 67785.0, 68394.0, 60499.5, 53814.5, 49612.5, 59310.5, 65752.5, 67226.0, 57068.0, 54536.5, 58890.5, 62182.5, 60843.0, 61587.0, 60918.0, 69314.0, 66672.5, 54023.5, 66436.0, 65423.5, 56984.5, 47358.0, 64398.0, 52529.0, 57955.0, 66208.5, 51982.0, 62898.0, 62126.5, 65332.0, 60272.0, 40491.5, 55983.0, 62910.0, 61821.0, 58620.5, 63949.0, 66434.0, 67385.0, 55341.5, 67326.0, 65999.5, 62675.0, 65464.0, 66840.0, 61115.0, 58654.5, 60933.0, 56928.0, 61583.0, 63758.5, 36552.5, 61887.0, 63509.5, 65883.5, 67946.5, 60303.5, 64719.0, 51476.5, 64973.5, 61330.0, 55323.0, 48773.0, 64701.5, 54891.5, 68049.5, 61135.0, 65110.5, 41131.0, 66654.5, 61416.5, 52057.5, 57016.5, 58636.5, 62688.0, 55646.0, 57606.0, 68436.5, 55357.5, 67101.0, 61248.5, 60484.5, 46026.0, 65163.0, 65263.5, 66824.0, 60301.5, 60103.5, 57355.5, 66437.0, 58157.0, 65434.0, 68843.5, 68191.0, 64094.5, 59602.0, 59844.5, 49742.0, 55004.0, 62304.5, 60838.5, 63703.0, 65403.5, 66537.5, 64849.0, 66807.5, 64981.5, 61506.0, 59930.5, 61981.5, 57113.5, 62115.5, 50591.5, 44622.0, 67954.5, 66957.0, 59129.5, 64522.5, 58275.0, 62977.5, 66695.5, 66667.5, 57932.0, 64595.0, 65684.5, 64555.0, 63764.0, 61216.5, 56664.5, 57333.0, 56640.0, 61361.5, 53977.0, 59894.5, 61989.5, 55911.5, 65874.5, 57828.0, 68136.0, 61070.0, 63537.0, 59471.5, 30113.5, 66615.0, 64037.0, 66485.5, 66279.5, 61720.0, 61272.0, 57996.5, 57400.0, 57992.5, 57759.0, 49998.0, 63759.5, 67501.5, 61368.5, 59050.0, 64170.0, 56408.5, 57460.0, 49828.0, 61490.5, 45056.5, 67316.5, 53856.5, 57726.5, 64447.5, 59074.5, 64523.5, 61496.0, 60348.5, 44104.0, 63094.5, 66777.5, 55495.5, 62072.5, 67913.5, 64940.5, 69137.0, 67482.5, 66413.5, 61077.5, 56929.5, 64497.5, 65346.5, 65096.0, 37450.5, 41983.5, 36781.0, 51376.5, 62261.5, 61595.0, 55880.0, 66453.5, 66336.0, 62998.0, 48989.0, 65511.5, 61960.0, 60481.0, 66509.5, 66147.5, 61069.0, 53517.5, 63044.5, 55364.5, 63538.0, 53445.5, 28561.0, 53590.5, 54243.0, 67094.0, 55308.5, 56870.0, 48467.0, 68280.5, 60290.5, 66011.5, 63893.0, 53545.0, 48987.5, 62077.5, 63215.5, 56417.5, 62844.5, 68648.5, 31610.5, 63029.5, 65364.5, 58400.0, 65441.0, 54964.0, 61743.5, 68182.5, 59269.0, 65953.0, 64477.0, 69107.0, 58573.0, 64368.5, 65969.5, 62688.5, 63257.5, 65146.5, 56100.5, 61086.5, 53861.0, 27761.5, 57379.5, 43243.5, 51179.0, 58624.0, 63447.0, 62578.5, 58979.0, 48113.0, 67661.0, 70302.0, 56531.5, 57013.5, 63499.5, 65363.0, 66401.5, 68376.0, 67323.5, 68676.5, 61688.5, 63968.5, 62285.5, 66715.5, 66996.5, 66736.5, 60456.0, 66181.0, 27878.5, 66997.5, 55860.5, 57936.0, 57374.5, 65328.0, 65255.5, 54093.0, 59548.0, 63265.0, 47095.5, 52390.0, 67896.5, 56727.5, 66388.0, 67295.0, 66507.0, 60606.5, 62488.5, 68486.5, 69547.0, 64315.5, 65563.5, 63259.0, 56407.5, 41034.5, 50607.5, 67585.0, 50737.5, 65187.0, 66287.0, 62502.5, 58462.0, 57379.0, 63690.5, 59728.0, 67900.5, 68546.0, 69620.5, 67458.5, 61120.5, 59556.5, 57820.0, 66218.0, 60968.0, 62041.0, 58085.0, 64693.0, 62831.5, 63744.0, 61335.5, 60613.5, 60718.5, 66701.0, 56727.0, 58655.5, 58747.0, 55866.5, 58160.0, 57515.0, 64704.5, 68697.5, 61599.0, 62692.5, 68934.5, 69357.0, 60946.0, 57172.0, 37995.0, 61860.0, 51927.5, 66350.5, 63621.5, 55595.0, 59980.5, 58260.5, 56488.0, 66887.5, 52180.0, 55132.0, 60877.5, 65670.0, 59439.5, 60350.0, 68022.5, 56572.5, 60070.5, 59640.5, 52374.0, 62113.5, 62124.0, 70481.0, 68809.5, 68186.5, 66701.0, 67607.0, 64047.0, 69212.5, 59238.0, 60524.0, 42219.0, 58817.0, 31243.0, 60901.5, 64952.0, 53147.0, 65505.5, 63757.0, 55723.0, 68151.0, 64842.0, 57158.5, 53580.0, 62166.0, 61205.5, 64807.5, 65641.0, 68143.5, 60616.5, 55696.0, 67814.0, 65978.0, 66970.5, 68212.0, 62085.5, 62198.5, 55812.0, 37973.5, 62630.0, 63866.0, 49498.0, 53538.0, 58582.0, 54110.5, 59437.5, 64059.5, 68257.5, 58831.0, 45983.0, 64107.0, 58719.5, 57388.0, 57051.0, 54755.0, 65476.5, 51703.0, 65589.0, 59822.5, 63471.0, 46200.0, 60828.5, 66934.0, 67053.0, 59246.0, 66802.0, 60085.5, 55351.5, 61407.5, 57856.0, 64035.0, 62995.0, 40452.5, 61840.5, 27617.0, 52334.0, 65630.5, 63286.0, 58401.5, 65576.5, 63323.0, 62636.0, 65523.0, 66473.0, 48621.0, 55975.0, 66760.5, 64620.0, 68257.5, 61934.0, 69362.5, 68719.5, 58952.0, 61972.5, 68735.5, 59633.0, 60797.5, 68335.5, 56814.5, 42929.5, 38748.5, 37208.5, 65164.0, 53467.0, 63346.5, 61188.0, 64650.0, 66226.0, 57493.0, 59183.0, 60548.5, 67393.0, 67574.0, 63598.5, 56665.0, 61097.0, 61159.0, 60944.0, 64940.0, 65986.5, 68657.0, 60186.0, 58186.0, 59682.0, 57440.0, 55972.0, 66207.5, 58109.0, 69551.5, 61652.0, 67657.0, 56626.5, 67131.5, 57378.0, 59930.5, 40206.0, 37362.5, 65228.0, 52221.5, 60096.0, 65412.5, 52263.0, 57732.5, 65104.0, 63445.0, 56154.5, 61479.0, 57659.0, 56281.0, 55295.0, 55374.5, 67045.5, 68527.5, 64793.0, 63906.5, 67068.5, 67660.0, 54647.0, 67940.5, 63789.5, 61976.5, 67603.5, 68063.0, 53097.0, 62835.0, 66197.0, 57671.5, 58582.0, 39209.5, 55172.0, 63036.0, 61397.0, 67461.0, 64306.5, 66268.5, 65924.0, 63377.5, 65306.0, 58143.5, 55098.0, 67979.0, 70765.0, 65587.5, 60010.5, 66879.0, 65855.0, 66113.5, 63634.5, 66566.0, 56665.0, 63393.5, 59402.0, 56074.5, 60182.5, 61413.0, 60981.0, 63852.5, 62338.5, 47260.0, 39392.0, 57675.5, 29974.0, 26415.5, 54997.0, 41119.5, 51595.5, 58365.5, 53864.5, 57185.5, 63079.5, 62119.0, 62538.0, 56794.5, 67718.5, 65993.0, 52498.0, 62199.5, 60225.0, 62059.5, 65191.0, 57538.0, 56788.0, 59493.5, 65242.5, 60607.0, 66749.0, 71172.0, 64417.5, 68810.0, 62635.5, 63720.0, 54358.0, 36974.5, 35490.0, 41033.0, 33092.5, 66089.5, 58209.5, 54385.5, 58306.5, 65649.5, 56079.5, 58326.0, 63919.0, 61469.0, 62248.0, 62144.5, 62390.5, 59801.0, 63362.5, 56650.5, 63214.5, 69582.5, 65660.0, 56595.5, 66369.5, 58132.5, 41487.5, 38237.5, 48965.5, 43706.0, 23876.5, 39922.0, 43032.5, 41330.5, 59380.0, 63399.0, 59478.5, 60260.0, 66274.5, 59846.0, 60906.0, 60083.5, 64561.0, 66449.5, 64405.0, 59209.5, 67469.0, 55142.5, 61412.0, 64580.0, 63988.5, 68536.0, 66062.5, 66663.0, 66344.5, 69083.5, 66756.5, 58973.5, 59646.5, 54686.5, 59577.0, 63880.5, 66702.0, 60832.5, 56155.0, 62110.0, 60327.5, 68384.0, 65335.5, 64770.0, 58675.0, 61163.5, 40121.0, 36768.0, 41143.0, 41311.5, 28404.5, 60312.5, 59010.5, 65947.5, 65686.5, 62041.0, 62302.5, 65128.0, 58992.0, 53407.5, 54096.5, 63816.0, 52608.5, 49494.0, 57148.5, 54827.0, 67813.5, 53581.0, 68824.0, 65190.0, 59860.5, 63161.0, 66175.5, 53057.5, 56063.0, 68645.0, 55258.5, 55280.5, 62048.0, 61205.0, 58694.0, 68848.5, 54776.5, 52947.5, 59329.0, 44309.5, 28580.5, 40561.0, 53476.0, 63209.5, 63194.0, 65293.0, 64844.0, 66858.5, 56689.5, 48504.0, 58758.0, 60103.0, 65752.0, 59253.0, 58215.0, 60167.0, 62514.5, 70122.0, 60011.0, 66398.5, 63699.0, 58100.5, 64383.0, 66902.5, 58726.0, 67198.0, 61095.5, 65740.0, 68650.0, 58954.0, 41117.5, 27203.5, 41859.5, 40448.5, 40583.0, 40586.0])

Intern werden die degrees mit den weights verrechnet. Inwiefern die Gewichtungen wichtig sind, ist mir nicht klar. Ich bin aber auch nicht so tief in der Theorie zu Louvain drin, sprich ich habe mir ein Videos zum Konzept angesehen.

Ich werde versuchen rauszufinden woher der negative Wert kommt bevor ich die große Distanzmatrix laufen lasse.

Man kann das umgehen, in dem man community_louvain.best_partition(G, weight='None') schreibt, dann sehen die communites aber nicht mehr gut aus.

PS: Der Issue ist keine Anfrage an dich, mehr als Notiz für mich gedacht.

donEnno commented 3 years ago

Nach dem ich mir das ganze nochmal genauer angesehen habe: `G_P2_B45 = netx.from_numpy_array(patient2_B45_data) G_P2_B80 = netx.from_numpy_array(patient2_B80_data) G_P2_G92 = netx.from_numpy_array(patient2_G92_data)

degrees_B45 = G_P2_B45.degree()
degrees_B80 = G_P2_B80.degree()
degrees_G92 = G_P2_G92.degree()

print(dict((k, v) for k, v in degrees_B45 if v <= 0))
print(dict((k, v) for k, v in degrees_B80 if v <= 0))
print(dict((k, v) for k, v in degrees_G92 if v <= 0))

weights_B45 = G_P2_B45.degree(weight='weight')
weights_B80 = G_P2_B80.degree(weight='weight')
weights_G92 = G_P2_G92.degree(weight='weight')

print(dict((k, v) for k, v in weights_B45 if v <= 0))
print(dict((k, v) for k, v in weights_B80 if v <= 0))
print(dict((k, v) for k, v in weights_G92 if v <= 0))`

Hat sich herausgestellt, dass es an Seqenuz 242 lag die so aussieht und dementsprechend unbrauchbar ist. >PATIENT_2_SEQUENCE_242 PSGLIF