Closed s3alfisc closed 4 months ago
Good idea; I think using a solver that 'adapts' to the structure of the data would be useful.
Candidates for linear
LinearRegression
]For poisson
Hi @saidamir, could you comment in the issue? Else I cannot "officially" assign it to you. And thanks for taking a crack at it! =)
Commenting.
Hi @s3alfisc still struggling to set up my local environment (I am following your onboarding instruction from Contributing section), as there are quite a few errors when I install the just and r packages. Also is there a requirements.txt file to import all required libraries? Thanks!
Hi @saidamir - we use poetry for package management. I should update the contributing.md with details on how to set it up. Will do so later today!
I tried installing the packages locally using poetry, however there was an error in the processor compatibility.
Hm, that's strange, can you post the error message?
There's no requirements.txt
. Is there an advantage of having one over poetry? I.e. that one can install dependencies without poetry? We could add poetry export -f requirements.txt --output requirements.txt
to the CI to automatically create a setup.py file based on the poetry.toml.
Could you list all the errors you get when trying to install just
and the R dependencies? Note that they are not strictly needed for development - they're used only for unit tests, which you can also run on github actions when pushing to a fork / opening a PR.
I imported libraries from using the poetry file as the requirements, however when I tried to run a jupyter notebook on my vscode, I had the errors that I didn't have numpy etc. I started imported them, however got the following error. So finally, what I did, is I started from the beginning, created a new folders, new venv and imported the libraries but didn't use the poetry file. So far it is working ok. Here is the error: ImportError: dlopen(/Users/kamasam/Documents/pyfixest/pythonProject1/venv/lib/python3.11/site-packages/pandas/_libs/pandas_parser.cpython-311-darwin.so, 0x0002): tried: '/Users/kamasam/Documents/pyfixest/pythonProject1/venv/lib/python3.11/site-packages/pandas/_libs/pandas_parser.cpython-311-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/kamasam/Documents/pyfixest/pythonProject1/venv/lib/python3.11/site-packages/pandas/_libs/pandas_parser.cpython-311-darwin.so' (no such file), '/Users/kamasam/Documents/pyfixest/pythonProject1/venv/lib/python3.11/site-packages/pandas/_libs/pandas_parser.cpython-311-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
I imported libraries from using the poetry file as the requirements, however when I tried to run a jupyter notebook on my vscode, I had the errors that I didn't have numpy etc. I started imported them, however got the following error. So finally, what I did, is I started from the beginning, created a new folders, new venv and imported the libraries but didn't use the poetry file. So far it is working ok. Here is the error:
Sounds like a pragmatic solution! Not really sure how to help with your error - my trusted LLM adviser says this:
If you are using a Mac with an M1 or M2 chip, you need to ensure that your Python environment is built for arm64. Verify that your Python version is build for the right architecture by running python -c "import platform; print(platform.architecture())".
You can install all r packages from the justfile by running just install-r
- I just merged a PR that fixes a typo in the command. And note that if you're using the justfile from a mac, you need to delete the first line which tells just to use the powershell:
set shell := ["powershell.exe", "-c"]
Thanks. My architecture is arm64. So far, I am able to work on this package, as I created a new folder and avoided using poetry file.
Hi I just pushed a pr for one class feols. I would like to see if it is accepted and if yes, continue working on other classes and methods on this ticket.
Context
Currently, all fit methods solve the OLS normal equation.
E.g. for OLS, we have https://github.com/py-econometrics/pyfixest/blob/d922bfc8dbd70f4a91e866a4a6e444ab510dd0db/pyfixest/estimation/feols_.py#L310, for IV we have https://github.com/py-econometrics/pyfixest/blob/d922bfc8dbd70f4a91e866a4a6e444ab510dd0db/pyfixest/estimation/feiv_.py#L145, and for Fepois we have https://github.com/py-econometrics/pyfixest/blob/d922bfc8dbd70f4a91e866a4a6e444ab510dd0db/pyfixest/estimation/fepois_.py#L218.
It would be cool to allow users to specify different solvers, e.g.
np.linalg.lstsq
.To do
solver
toFeols
,Feiv
,Fepois
,feols()
andfepois
.normal
(the current default) and np.linalg.lstsq@apoorvalal , any other solvers you'd like to see supported?