0
"net_worths"、 "predictions"は2つのnumpy配列で、2つのエラー、つまり "errors"を見つけるために使用され、パラメータは新しい変数cleaned_dataで圧縮されます。リストの制限の使用
cleaned_data = []
### code goes here
errors = (net_worths - predictions)**2
cleaned_data = zip(ages, net_worths, errors)
cleaned_data = sorted(cleaned_data, key=lambda x: x[2], reverse=True)
limit = int(len(ages) * 0.1
return list(cleaned_data[limit:])
私は次の3行を理解するのが難しいですが、誰でも助けてください。
cleaned_data = sorted(cleaned_data, key=lambda x: x[2], reverse=True)
limit = int(len(ages) * 0.1
return list(cleaned_data[limit:])