Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-03-23T01:32:19.980Z
Answers.LastActivityDate: 2023-03-23T13:18:51.110Z
Answers.LastEditDate: 2023-03-23T13:18:51.110Z
Answers.UserDisplayName: M__
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-03-22T22:34:41.313Z
Comments.Text: 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.
Comments.UserDisplayName: Community
Tags: <logistic-regression>
Title: Any existing workflow on Terra that can run multinomial logistic regression?
ThreadText: # 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](https://www.broadinstitute.org/videos/access-data-run-analysis-tools-and-collaborate-cloud-terra). Within that there is a Jupiter notebook and you then just use scikit-learn's (Python) [LogisticRegression()](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) 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?
  
  
  ---
  
  