<h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">Like in R, can we add an option of offset in sklearn so that we can fix the value of some coefficients for logistic regression?</p>
<p dir="auto">For those who don't know offset, offset is defined as a fixed feature with coefficient being 1. Therefore, if <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="7de3fe2187cbc4e6ac9c23481d0b12a2">$y=g(x\beta + z\alpha)$</math-renderer> and we want to choose some pre-determined value <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="7de3fe2187cbc4e6ac9c23481d0b12a2">$\alpha_0$</math-renderer>, we can just pass <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="7de3fe2187cbc4e6ac9c23481d0b12a2">$z\alpha_0$</math-renderer> to offset.</p>
<h3 dir="auto">Describe your proposed solution</h3>
<p dir="auto">I feel this might be straightforward but, as someone who doesn't know the original code/module that well, it would be great if someone can give any advice on if this is feasible. Also any suggestions on its functionality would be helpful.</p>
<h3 dir="auto">Describe alternatives you've considered, if relevant</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">As described at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1333682254" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/24155" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/24155/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/24155">#24155</a>, GLM should also support the offset option.</p>
<h3 dir="auto">Describe your proposed solution</h3>
<p dir="auto">For example</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn.linear_model import PoissonRegressor

glm = PoissonRegressor(
                        alpha=0,
                        fit_intercept=False, 
                        max_iter=300,
                        offset=A # offset option
                      )
glm.fit(X_train, y_train)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">linear_model</span> <span class="pl-k">import</span> <span class="pl-v">PoissonRegressor</span>

<span class="pl-s1">glm</span> <span class="pl-c1">=</span> <span class="pl-v">PoissonRegressor</span>(
                        <span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">0</span>,
                        <span class="pl-s1">fit_intercept</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, 
                        <span class="pl-s1">max_iter</span><span class="pl-c1">=</span><span class="pl-c1">300</span>,
                        <span class="pl-s1">offset</span><span class="pl-c1">=</span><span class="pl-v">A</span> <span class="pl-c"># offset option</span>
                      )
<span class="pl-s1">glm</span>.<span class="pl-en">fit</span>(<span class="pl-v">X_train</span>, <span class="pl-s1">y_train</span>)</pre></div>
<h3 dir="auto">Describe alternatives you've considered, if relevant</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>