2023.07.11 07:51 PM
Anyone have (or know of) an implementation of constrained curve fitting in KDB?
Similar to this scipy.optimize.curve_fit — SciPy v1.11.1 Manual in python.
2023.07.12 03:57 AM - edited 2023.07.12 04:11 AM
Hi @jattwick,
This looks similar to Polynomial fitting - lsq – least-squares matrix equation solution |Reference | kdb+ and q documentation - Kdb+ and q docu...
Or another option is to use embedPy (or the PyKX version PyKX under Q) to import a Python library and use it directly. Running PyKX under q - PyKX
Let me know if this helps!
2023.07.12 03:57 AM - edited 2023.07.12 04:11 AM
Hi @jattwick,
This looks similar to Polynomial fitting - lsq – least-squares matrix equation solution |Reference | kdb+ and q documentation - Kdb+ and q docu...
Or another option is to use embedPy (or the PyKX version PyKX under Q) to import a Python library and use it directly. Running PyKX under q - PyKX
Let me know if this helps!
2023.07.12 08:30 AM
Thank you @megan_mcp ! the lsq won't fit our use case since we want the coefficients to be strictly greater than zero.
We'll have a look at embedPy - was just hoping somebody had possibly written a native kdb implementation already.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.