<p>What I think is occurring is Terra is the <a href="https://www.broadinstitute.org/videos/access-data-run-analysis-tools-and-collaborate-cloud-terra" rel="nofollow noreferrer">Broad Institute's cloud service</a>. Within that there is a Jupiter notebook and you then just use scikit-learn's (Python) <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html" rel="nofollow noreferrer">LogisticRegression()</a> using multinomial option. Then is simply ....</p>
<pre><code>from sklearn.linear_model import LogisticRegression
import pandas as pd
model = LogisticRegression(multi_class='multinomial', solver='lbfgs')
df = pd.DataFrame ({'colA':[1,2,3], 'colB':[1,2,5] ... etc ...)
X = df[['colA', 'colB', 'colC']]
y = df[['colD']]
model.fit(X, y)
preds = model.predict(X) 
print (preds)
</code></pre>
<p>This sort of operation. Does that make sense?</p>

CC BY-SA 4.0
2023-03-23T01:32:19.980Z
2023-03-23T13:18:51.110Z
2023-03-23T13:18:51.110Z
M__
<p>I need to run multinomial logistic regression on a smaller set of variants e.g. using Trinculo. May I know if there's any existing workflow on Terra that can do this? Thanks.</p>

CC BY-SA 4.0
2023-03-22T22:34:41.313Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
<logistic-regression>
Any existing workflow on Terra that can run multinomial logistic regression?
# Any existing workflow on Terra that can run multinomial logistic regression?

(Asked by: username_0 on 2023-03-22)

I need to run multinomial logistic regression on a smaller set of variants e.g. using Trinculo. May I know if there's any existing workflow on Terra that can do this? Thanks.

**Tags:** logistic-regression
> **Comments:**
> **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  

---

## 1 answers

### Answer by username_2 on 2023-03-23. Score: 1

What I think is occurring is Terra is the Broad Institute's cloud service. Within that there is a Jupiter notebook and you then just use scikit-learn's (Python) LogisticRegression() using multinomial option. Then is simply ....
from sklearn.linear_model import LogisticRegression
import pandas as pd
model = LogisticRegression(multi_class='multinomial', solver='lbfgs')
df = pd.DataFrame ({'colA':[1,2,3], 'colB':[1,2,5] ... etc ...)
X = df[['colA', 'colB', 'colC']]
y = df[['colD']]
model.fit(X, y)
preds = model.predict(X) 
print (preds)

This sort of operation. Does that make sense?


---

