regressor


Nameregressor JSON
Version 1.0.9 PyPI version JSON
download
home_pagehttps://github.com/jeremymcrae/regressor
SummaryPackage for fast regression
upload_time2023-11-28 00:27:05
maintainer
docs_urlNone
authorJeremy McRae
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### regressor

This is a small library that tries to run simple linear regression quickly on
modern x86 hardware. This uses vectorized operations to speed up calculating dot
products and means. The input numpy arrays need to be 1D with 32-bit floats.

As a result, this is ~20X faster than scipy.stats.linregress, but only runs
on x86-64 hardware with AVX extensions (most desktops and servers as of 2020).

### Install
```sh
pip install regressor
```

### Usage
```py
>>> import numpy as np
>>> from regressor import linregress
>>> x = np.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float32)
>>> y = np.array([5.0, 4.0, 3.0, 2.0, 1.0], dtype=np.float32)
>>> linregress(x, y)
LinregressResult(slope=-1.0, intercept=6.0, rvalue=-1.0, pvalue=1.2e-30, stderr=0.0)
```

### Performance
The graph below compares the times required for simple linear regressions between
this package and scipy.stats.linregress, starting from arrays with 10 elements
up to arrays with 100 million elements. This was run on a 2.6 GHz Skylake CPU.
In general, this package performs simple linear regression in about 1/20th of
the time required by scipy.stats.linregress.

![Performance](/docs/performance.svg)

#### Reliability
The regression results from this package match scipy.stats.linregress to within 
4 decimal places (for the slope, intercept, r-value, p-value and standard error).
The graphs below demonstrate this consistency by comparing betas, r-values and 
p-values from this package vs scipy.stats.linregress. These used randomly 
sampled values with varying correlation between the X and Y arrays to assess 
reliability across a wide range of P-values.

![Reliability](/docs/reliability.svg)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jeremymcrae/regressor",
    "name": "regressor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jeremy McRae",
    "author_email": "jmcrae@illumina.com",
    "download_url": "https://files.pythonhosted.org/packages/b4/ea/c2c9a87bef9925f2ce5c19716b014350aa73bf0202d3f52d4fda2177d3be/regressor-1.0.9.tar.gz",
    "platform": null,
    "description": "### regressor\n\nThis is a small library that tries to run simple linear regression quickly on\nmodern x86 hardware. This uses vectorized operations to speed up calculating dot\nproducts and means. The input numpy arrays need to be 1D with 32-bit floats.\n\nAs a result, this is ~20X faster than scipy.stats.linregress, but only runs\non x86-64 hardware with AVX extensions (most desktops and servers as of 2020).\n\n### Install\n```sh\npip install regressor\n```\n\n### Usage\n```py\n>>> import numpy as np\n>>> from regressor import linregress\n>>> x = np.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float32)\n>>> y = np.array([5.0, 4.0, 3.0, 2.0, 1.0], dtype=np.float32)\n>>> linregress(x, y)\nLinregressResult(slope=-1.0, intercept=6.0, rvalue=-1.0, pvalue=1.2e-30, stderr=0.0)\n```\n\n### Performance\nThe graph below compares the times required for simple linear regressions between\nthis package and scipy.stats.linregress, starting from arrays with 10 elements\nup to arrays with 100 million elements. This was run on a 2.6 GHz Skylake CPU.\nIn general, this package performs simple linear regression in about 1/20th of\nthe time required by scipy.stats.linregress.\n\n![Performance](/docs/performance.svg)\n\n#### Reliability\nThe regression results from this package match scipy.stats.linregress to within \n4 decimal places (for the slope, intercept, r-value, p-value and standard error).\nThe graphs below demonstrate this consistency by comparing betas, r-values and \np-values from this package vs scipy.stats.linregress. These used randomly \nsampled values with varying correlation between the X and Y arrays to assess \nreliability across a wide range of P-values.\n\n![Reliability](/docs/reliability.svg)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package for fast regression",
    "version": "1.0.9",
    "project_urls": {
        "Homepage": "https://github.com/jeremymcrae/regressor"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49b9b1e34c7e93212e50183c0235e8c52cf77f10c4d49033d0fbae57524e30c8",
                "md5": "659c715d419ba83b095cdd16952df589",
                "sha256": "1a54d5ac25f54c82deaf526f1451c1e070ddbf873b3625ec9c11158e110940c2"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "659c715d419ba83b095cdd16952df589",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 121741,
            "upload_time": "2023-11-28T00:26:39",
            "upload_time_iso_8601": "2023-11-28T00:26:39.641811Z",
            "url": "https://files.pythonhosted.org/packages/49/b9/b1e34c7e93212e50183c0235e8c52cf77f10c4d49033d0fbae57524e30c8/regressor-1.0.9-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e60e3a05be15723c7cf75388a7e3da7b0cb5ce6a49fda17d0e2e351c987dbd5",
                "md5": "b6e871f391f19bf55bf729db92bb9424",
                "sha256": "d0fccb6e9672310253713e2683ca02a97765b5edee1bc926034ff4208634eeb2"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "b6e871f391f19bf55bf729db92bb9424",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 578710,
            "upload_time": "2023-11-28T00:26:41",
            "upload_time_iso_8601": "2023-11-28T00:26:41.615028Z",
            "url": "https://files.pythonhosted.org/packages/7e/60/e3a05be15723c7cf75388a7e3da7b0cb5ce6a49fda17d0e2e351c987dbd5/regressor-1.0.9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "69eb57f260a85f3d00709cfa588cfc2b79eecc904cfdfec755970e2fd7fa0bd8",
                "md5": "f1c30d2e0b11e320fac2745b01eeb8cf",
                "sha256": "1f4d9310c0573ca37dd0ec988ae000cb731af51a36ca47e8b67a8461c0abc23a"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f1c30d2e0b11e320fac2745b01eeb8cf",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 102179,
            "upload_time": "2023-11-28T00:26:43",
            "upload_time_iso_8601": "2023-11-28T00:26:43.477692Z",
            "url": "https://files.pythonhosted.org/packages/69/eb/57f260a85f3d00709cfa588cfc2b79eecc904cfdfec755970e2fd7fa0bd8/regressor-1.0.9-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abceb7643791dea23008f81ee82b971790821834e8346b6bb39dd9d09b88cb27",
                "md5": "10870746f16346207a04f6c2744404b2",
                "sha256": "67de2eb8d4174911956bc071077a7f65062ec0c41829d4a95849c564a458c026"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp311-cp311-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "10870746f16346207a04f6c2744404b2",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 121721,
            "upload_time": "2023-11-28T00:26:44",
            "upload_time_iso_8601": "2023-11-28T00:26:44.652580Z",
            "url": "https://files.pythonhosted.org/packages/ab/ce/b7643791dea23008f81ee82b971790821834e8346b6bb39dd9d09b88cb27/regressor-1.0.9-cp311-cp311-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e950c8d633760441408ea760699a92e2c35f1b0636bd7e4a51ed8b56a3e8eb1",
                "md5": "419c543298baf536342fd1eab78a9a81",
                "sha256": "70cda3cfbb9303fde92d4d83381304fd13e0b99839e2328bee63845108d98049"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "419c543298baf536342fd1eab78a9a81",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 614166,
            "upload_time": "2023-11-28T00:26:46",
            "upload_time_iso_8601": "2023-11-28T00:26:46.318671Z",
            "url": "https://files.pythonhosted.org/packages/7e/95/0c8d633760441408ea760699a92e2c35f1b0636bd7e4a51ed8b56a3e8eb1/regressor-1.0.9-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8b30ca7bc275a35cdbdc1ed0670ea333ab36a2cc9aa165d6612700ae86f7849",
                "md5": "e7e4a757c7fa76eee438fae4aa40da58",
                "sha256": "821770b3a7ea562f2db2f0336b755d3167d5cbeebfd25a4d2e36dbc69bb4beda"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "e7e4a757c7fa76eee438fae4aa40da58",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 102249,
            "upload_time": "2023-11-28T00:26:47",
            "upload_time_iso_8601": "2023-11-28T00:26:47.509217Z",
            "url": "https://files.pythonhosted.org/packages/a8/b3/0ca7bc275a35cdbdc1ed0670ea333ab36a2cc9aa165d6612700ae86f7849/regressor-1.0.9-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44395b2bbdc489915cb0f00659204fcbfe3fdc257593aaf90be1d6ca552e9213",
                "md5": "5d1dc1ec5916b80fa2b5b58ba881f99e",
                "sha256": "4e0baee6fd611ae937b9de7b18cd517ff5a11c458c454cfead5b596f81a51775"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp312-cp312-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5d1dc1ec5916b80fa2b5b58ba881f99e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 120018,
            "upload_time": "2023-11-28T00:26:49",
            "upload_time_iso_8601": "2023-11-28T00:26:49.306237Z",
            "url": "https://files.pythonhosted.org/packages/44/39/5b2bbdc489915cb0f00659204fcbfe3fdc257593aaf90be1d6ca552e9213/regressor-1.0.9-cp312-cp312-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c121503fb81057c98485e7c8d8e54df244bf7ba6526424c45b1547b9566b20a0",
                "md5": "fd43c728f73b8bb9843a2c6de2a2432f",
                "sha256": "772194f324b9c495f6fed9e34126fcf1ad62a502dca30207619b58dc849e8c29"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fd43c728f73b8bb9843a2c6de2a2432f",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 653925,
            "upload_time": "2023-11-28T00:26:51",
            "upload_time_iso_8601": "2023-11-28T00:26:51.111687Z",
            "url": "https://files.pythonhosted.org/packages/c1/21/503fb81057c98485e7c8d8e54df244bf7ba6526424c45b1547b9566b20a0/regressor-1.0.9-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d444c307046870a39bf3d43cb2d5d9bac27493ce436c7b903a731ab7e44bf511",
                "md5": "153d537b41b3aed027eee09966cd9f6a",
                "sha256": "9e3af9eb41484f0d351ff3f907f1325f557bb2f2357ca284e6e169a4c9118d0e"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "153d537b41b3aed027eee09966cd9f6a",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 99882,
            "upload_time": "2023-11-28T00:26:52",
            "upload_time_iso_8601": "2023-11-28T00:26:52.417185Z",
            "url": "https://files.pythonhosted.org/packages/d4/44/c307046870a39bf3d43cb2d5d9bac27493ce436c7b903a731ab7e44bf511/regressor-1.0.9-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0b22ded9b4ea6b2003bbbdf8327049352b4a347aba72e8a395b71dddba38d997",
                "md5": "f808c02151e6a6b0bacd20dd29243c31",
                "sha256": "75a18a17acaa5fd8bc8756a346923f7d7d3ed075605821990c1111c8b7a108c1"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp38-cp38-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f808c02151e6a6b0bacd20dd29243c31",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 121624,
            "upload_time": "2023-11-28T00:26:53",
            "upload_time_iso_8601": "2023-11-28T00:26:53.464086Z",
            "url": "https://files.pythonhosted.org/packages/0b/22/ded9b4ea6b2003bbbdf8327049352b4a347aba72e8a395b71dddba38d997/regressor-1.0.9-cp38-cp38-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "459e9beebc3beaca512deaacd811c41146739c68ed5ca2025a2f5e6df283fa0e",
                "md5": "545affeaeb1634cd6f11493431878245",
                "sha256": "83379a1634bd8f362ff6d7cea66f35984b472d8e518083056c2fae7ff4b9229e"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "545affeaeb1634cd6f11493431878245",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 594329,
            "upload_time": "2023-11-28T00:26:56",
            "upload_time_iso_8601": "2023-11-28T00:26:56.156728Z",
            "url": "https://files.pythonhosted.org/packages/45/9e/9beebc3beaca512deaacd811c41146739c68ed5ca2025a2f5e6df283fa0e/regressor-1.0.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d06b1a74f54b4f6d4c85d023b41371cee65dcf3b6ea4035abc8c3c6eb244b61",
                "md5": "e7d2e7e5be920427a19094d173229fec",
                "sha256": "2dc72be4b36f1913b135cdf465c5e364882d63bf5f1dd19e708b91d6b44fbecf"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "e7d2e7e5be920427a19094d173229fec",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 102416,
            "upload_time": "2023-11-28T00:26:58",
            "upload_time_iso_8601": "2023-11-28T00:26:58.436771Z",
            "url": "https://files.pythonhosted.org/packages/6d/06/b1a74f54b4f6d4c85d023b41371cee65dcf3b6ea4035abc8c3c6eb244b61/regressor-1.0.9-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59b94c16cb810005b2eb8a8d7ae55793381b18bcc9a4086cded0114fb1581be4",
                "md5": "8e957b28e8c851ead80dd9d8a84c5090",
                "sha256": "9dcbfe96a26dd361aa96966c2a4642c297b908651f70fe4d332cb2d219ac8cee"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp39-cp39-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "8e957b28e8c851ead80dd9d8a84c5090",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 122104,
            "upload_time": "2023-11-28T00:26:59",
            "upload_time_iso_8601": "2023-11-28T00:26:59.546358Z",
            "url": "https://files.pythonhosted.org/packages/59/b9/4c16cb810005b2eb8a8d7ae55793381b18bcc9a4086cded0114fb1581be4/regressor-1.0.9-cp39-cp39-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "422b009200d379ca781284ae1abca71a026173d76d6abc5c5341303df54d0664",
                "md5": "a51b4491cc5d5617e18c3dec9c27236e",
                "sha256": "b8e19196efb2febf1188cdd16a3117664fc7543ef88bc4b385fe50ecfeb7a2d6"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a51b4491cc5d5617e18c3dec9c27236e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 578787,
            "upload_time": "2023-11-28T00:27:01",
            "upload_time_iso_8601": "2023-11-28T00:27:01.499463Z",
            "url": "https://files.pythonhosted.org/packages/42/2b/009200d379ca781284ae1abca71a026173d76d6abc5c5341303df54d0664/regressor-1.0.9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ef7b7ee78e0be1bc229d1c040ee2a09d61418644457bb0e5b2b4c4a24b2460a",
                "md5": "813ceeb6b383a15d2e46ed7c4b21cfd3",
                "sha256": "68dc3de38e7ed93a0975a12fe9d47e1ae41eb19179cd7c176825813d23ce5c87"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "813ceeb6b383a15d2e46ed7c4b21cfd3",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 102264,
            "upload_time": "2023-11-28T00:27:03",
            "upload_time_iso_8601": "2023-11-28T00:27:03.134464Z",
            "url": "https://files.pythonhosted.org/packages/0e/f7/b7ee78e0be1bc229d1c040ee2a09d61418644457bb0e5b2b4c4a24b2460a/regressor-1.0.9-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4eac2c9a87bef9925f2ce5c19716b014350aa73bf0202d3f52d4fda2177d3be",
                "md5": "fe5f47c85f64060efe8cbd8b995cbe6a",
                "sha256": "bd4d13f20ecb1c8d489ff017d0d339c905f36d9da612cfd663eb88e094f6efa1"
            },
            "downloads": -1,
            "filename": "regressor-1.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "fe5f47c85f64060efe8cbd8b995cbe6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 181597,
            "upload_time": "2023-11-28T00:27:05",
            "upload_time_iso_8601": "2023-11-28T00:27:05.060808Z",
            "url": "https://files.pythonhosted.org/packages/b4/ea/c2c9a87bef9925f2ce5c19716b014350aa73bf0202d3f52d4fda2177d3be/regressor-1.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-28 00:27:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jeremymcrae",
    "github_project": "regressor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "regressor"
}
        
Elapsed time: 0.40702s