Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
python 将 pandas 数据帧、参数和函数传递给 scipy.optimize.minimize
我正在尝试使用 SciPy 的 scipy optimize minimize 函数来最小化我创建的函数 然而 我试图优化的函数本身是由其他函数构建的 这些函数基于 pandas DataFrame 执行计算 据我所知 SciPy 的最小化
python
pandas
scipy
scipy.sparse.coo_matrix 如何快速找到全零列,填充 1 并标准化
对于矩阵 我想找到全为零的列并用 1 填充 然后按列对矩阵进行归一化 我知道如何使用 np arrays 做到这一点 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 V 0 1 0 0 0
python
NumPy
scipy
linearalgebra
sparsematrix
为 scipy.optimize.fmin (和其他)设置收敛标准
我正在开展一项优化任务 其中成本函数评估非常昂贵 并且可以容忍一些错误 我正在使用 scipy optimize 中的一些预先打包的 scipy 方法来开始 我合作的第一个是fmin 它实现了 nelder mead 单纯形算法 该函数有两
python
NumPy
Optimization
scipy
scipy.minimize——获取成本函数与迭代?
有没有办法使用 scipy minimize 在每次迭代的基础上访问成本函数 而不使用回调并重新执行成本函数 options disp似乎打算这样做 但只会导致优化器打印终止消息 将其打印到标准输出并使用就可以了contextlib red
python
Optimization
scipy
如何从文本文件中读取微分方程组并使用 scipy.odeint 求解该方程组?
我有一个大型 gt 2000 个方程 ODE 系统 我想用 python scipy 的 odeint 来求解 我有三个问题想要解决 也许我需要问 3 个不同的问题 为了简单起见 我将在这里用一个玩具模型来解释它们 但请记住我的系统很大 假
python
NumPy
scipy
sympy
differentialequations
将正态分布拟合到加权列表
我有一堆数据点 我想对数据进行正态分布 我看到 scipy 有stats norm fit方法 但这需要一个数据点列表 就像是 data 1 1 1 1 2 2 2 3 3 3 3 3 3 4 5 5 5 而我的数据包含在两个列表中 类似
python
scipy
使用 scipy.io savemat 将多个 Python 字典转换为 MATLAB 结构体数组
这是一个简单的问题 但我似乎无法理解这个问题 我正在使用scipy io用于将 Python 字典保存为 Matlab 结构的库 现在文档 of the scipy io库向我们展示了如何将单个 Python 字典转换为单个 Matlab
python
MATLAB
NumPy
scipy
如何使用 scipy 稀疏矩阵对 numpy 数组进行列堆叠?
我有以下矩阵 A toarray array 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dtype int64 type A scipy
python
python27
python3x
NumPy
scipy
关于 np.all 与 axis 的使用
我尝试测试使用np all 测试数组a is a array 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 255 255 0 0 0 255 0 0 b 255 0 255 c np all a b axis 1
python
python3x
NumPy
scipy
ImportError:从 sklearn 导入 TfidfVectorizer 时无法导入名称 __check_build
我正在使用 Python 2 7 10 并使用 pip 安装了 scikit 0 15 2 并且我已经安装了 numpy 1 1 10 和 scipy 0 16 0 并且它工作正常 但是当我尝试从 sklearn 导入 TfidfVecto
python
NumPy
scipy
scikitlearn
如何使用 scipy.integrate 设置固定步长?
我正在寻找一种方法来设置固定步长 以通过 Python 中的 Runge Kutta 方法解决我的初始值问题 因此 我如何才能告诉scipy integrate RK45保持其积分过程的不断更新 步长 非常感谢 Scipy integrat
python
scipy
integrate
rungekutta
scipy curve_fit 不喜欢数学模块
在尝试创建一个示例时scipy optimize curve fit我发现scipy似乎与Python的不兼容math模块 而函数f1工作正常 f2抛出错误消息 from scipy optimize import curve fit fr
python
python3x
NumPy
scipy
curvefitting
从一组不规则的点开始,在 3D 表面中插入 Z 值 [关闭]
Closed 这个问题需要多问focused 目前不接受答案 我有一个类似于图 A 的表面 想象一下这是俯视图 该表面已计算 Z 值 Now I need to find all Z values in new points like fi
python
NumPy
scipy
interpolation
使用 python scipy 正确插值 3D 矢量场
GOAL 我的目标是使用 python 插值 3D 矢量场 CODE 原始向量场 import numpy as np import matplotlib pyplot as plt For interpolation from scipy
python
vector
scipy
3d
interpolation
griddata 运行时错误 - Python / SciPy(插值)
我使用 scipy griddata function 进行插值 python 执行 griddata 函数时出现以下错误消息意味着什么 File C Python25 lib site packages scipy interpolate
python
scipy
interpolation
一次性对 scipy 的“curve_fit”进行多次迭代
考虑以下 MWE import numpy as np from scipy optimize import curve fit X np arange 1 10 1 Y abs X np random randn 15 9 def lin
python
NumPy
scipy
Python 3D 多项式曲面拟合,阶数相关
我目前正在处理天文数据 其中有彗星图像 由于拍摄时间 黄昏 我想删除这些图像中的背景天空渐变 我为此开发的第一个程序从 Matplotlib 的 ginput x y 中获取用户选择的点 提取每个坐标 z 的数据 然后使用 SciPy 的
python
scipy
geometrysurface
想知道为什么 scipy.spatial.distance.sqeuclidean 比 numpy.sum((y1-y2)**2) 慢两倍
这是我的代码 import numpy as np import time from scipy spatial import distance y1 np array 0 0 0 0 1 0 0 0 0 0 y2 np array 0 0
python
performance
NumPy
scipy
matrixmultiplication
使用 Cython 中的 Scipy cython_blas 接口不适用于向量 Mx1 1xN
这必须处理类似的问题 使用 SciPy 接口和 Cython 直接调用 BLAS LAPACK但有所不同 因为我在这里使用 SciPy 示例中的实际代码 test dgemm https github com scipy scipy blo
scipy
Cython
blas
在 pandas 中有效地创建稀疏数据透视表?
我正在将具有两列 A 和 B 的记录列表转换为矩阵表示形式 我一直在pandas中使用pivot函数 但结果最终相当大 pandas 是否支持转换为稀疏格式 我知道我可以旋转它 然后将其转换为某种稀疏表示 但并不像我想要的那么优雅 我的最终
python
pandas
scipy
scikitlearn
sparsematrix
«
1 ...
37
38
39
40
41
42
43
...55
»