【发布时间】:2020-04-18 00:20:07
【问题描述】:
我想使用 scipy nnls 函数,但是,它不支持添加数据加权。
import numpy as np
from scipy.optimize import nnls
A = np.array([[60, 90, 120],
[30, 120, 90]])
b = np.array([67.5, 60])
W = np.array([2, 3])
所以我想知道如何将这个 W 矩阵添加到非负最小二乘中?
【问题讨论】:
标签: python numpy scipy mathematical-optimization least-squares