Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 从一组列表中访问特定列表_Python 3.x_List_Machine Learning - Fatal编程技术网

Python 3.x 从一组列表中访问特定列表

Python 3.x 从一组列表中访问特定列表,python-3.x,list,machine-learning,Python 3.x,List,Machine Learning,我想从输出中访问各个列表,以便获得所需的输出 [576.1537376237624, 576.1545609827812, 576.155384359385, 576.1562077535746, 576.1570311653502, 576.1578545947123, 576.1586780416611, 576.1595015061973, 576.1603249883211, 576.1611484880332] [576.1537376237624, 576.161971609612,

我想从输出中访问各个列表,以便获得所需的输出

[576.1537376237624, 576.1545609827812, 576.155384359385, 576.1562077535746, 576.1570311653502, 576.1578545947123, 576.1586780416611, 576.1595015061973, 576.1603249883211, 576.1611484880332]
[576.1537376237624, 576.161971609612, 576.1702073541688, 576.1784448578509, 576.1866841210765, 576.1949251442638, 576.2031679278315, 576.2114124721976, 576.219658777781, 576.2279068450003]
[576.1537376237624, 576.2361170484683, 576.3186725320611, 576.4014044933067, 576.48431335199, 576.5673995289181, 576.6506634459224, 576.7341055258611, 576.8177261926215, 576.9015258711238]
[576.1537376237624, 576.9814884918198, 577.8270339789372, 578.6907997611174, 579.5732219342204, 580.4747472702393, 581.3958334798867, 582.3369494816455, 583.2985756774436, 584.281204235115]
[576.1537376237624, 584.826908404254, 595.4739343028948, 608.5938411910076, 624.8145782295895, 644.9264682232412, 669.9243443735022, 701.0606295042115, 739.9121998096105, 788.4646133533605]
[576.1537376237624, 702.4516554203875, 1277.1568412503211, 4042.0736136112046, 17595.436653069664, 84433.45249482371, 414672.7920504886, 2047336.072196413, 10120573.694524828, 50043771.857434966]
然后:


你想访问
lr[1]
lr
的行吗?我想访问lr[1]的行,看看我的答案,让我知道,请分享你想要的输出。它给我输出:576.1537376237624576.1537376237624576.1537376237624576.1537376237624576.1537376237624576.1537376237624576.1537376237624576,这不是我想要的(lr)=您可以上传
lr
文件或发布数据吗?当然可以。我已将代码上载到笔记本中:
[576.1537376237624, 576.1545609827812, 576.155384359385, 576.1562077535746, 576.1570311653502, 576.1578545947123, 576.1586780416611, 576.1595015061973, 576.1603249883211, 576.1611484880332]
[576.1537376237624, 576.161971609612, 576.1702073541688, 576.1784448578509, 576.1866841210765, 576.1949251442638, 576.2031679278315, 576.2114124721976, 576.219658777781, 576.2279068450003]
[576.1537376237624, 576.2361170484683, 576.3186725320611, 576.4014044933067, 576.48431335199, 576.5673995289181, 576.6506634459224, 576.7341055258611, 576.8177261926215, 576.9015258711238]
[576.1537376237624, 576.9814884918198, 577.8270339789372, 578.6907997611174, 579.5732219342204, 580.4747472702393, 581.3958334798867, 582.3369494816455, 583.2985756774436, 584.281204235115]
[576.1537376237624, 584.826908404254, 595.4739343028948, 608.5938411910076, 624.8145782295895, 644.9264682232412, 669.9243443735022, 701.0606295042115, 739.9121998096105, 788.4646133533605]
[576.1537376237624, 702.4516554203875, 1277.1568412503211, 4042.0736136112046, 17595.436653069664, 84433.45249482371, 414672.7920504886, 2047336.072196413, 10120573.694524828, 50043771.857434966]
[576.1537376237624, 576.1545609827812, 576.155384359385, 576.1562077535746, 576.1570311653502, 576.1578545947123, 576.1586780416611, 576.1595015061973, 576.1603249883211, 576.1611484880332]
learning_rates = [1E-6, 1E-5, 1E-4, 1E-3, 1E-2, 1E-1]

all_results=[]
for i in range(len(learning_rates)):
    lr = fit(X_train, y_train,learning_rates[i])
    all_results.append(lr[0])
for i in range(len(all_results)):
    print(all_results[i]) # prints row by row