<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to build linear or non linear models with constrained responses (sum of outputs = 1) in JMP? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/917705#M107733</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;A very simple way to perhaps do what you're looking for is to create a nominal response column corresponding to the highest y-value and fit that to the x's using nominal logistic regression (see attached table).&lt;/P&gt;
&lt;P&gt;Does this do what you need, and could you help me understand exactly what the use case is?&amp;nbsp; What does this data represent and what are you trying to learn from it?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Dec 2025 09:42:14 GMT</pubDate>
    <dc:creator>HadleyMyers</dc:creator>
    <dc:date>2025-12-05T09:42:14Z</dc:date>
    <item>
      <title>How to build linear or non linear models with constrained responses (sum of outputs = 1) in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/914132#M107412</link>
      <description>&lt;P&gt;I often need to model continuous response variables that represent proportions across categories, where the responses for each sample must sum to 1 (e.g., P1=10%, P2=25%, P3=35%, P4=30%).&lt;BR /&gt;In Python, I use a softmax output layer to enforce the sum-to-one constraint.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;How can I build such models in JMP—either linear or neural network—while ensuring the sum of the predicted responses equals 1?&lt;/LI&gt;
&lt;LI&gt;Is there a recommended workflow (e.g., Multinomial logistic regression, neural nets with appropriate link functions)?&lt;/LI&gt;
&lt;LI&gt;Finally, can I get a Profiler that displays the predicted proportions for each category (similar to the categorical Profiler showing class probabilities)?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks for any guidance or examples!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Nov 2025 14:10:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/914132#M107412</guid>
      <dc:creator>Florent_M</dc:creator>
      <dc:date>2025-11-19T14:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to build linear or non linear models with constrained responses (sum of outputs = 1) in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/917705#M107733</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;A very simple way to perhaps do what you're looking for is to create a nominal response column corresponding to the highest y-value and fit that to the x's using nominal logistic regression (see attached table).&lt;/P&gt;
&lt;P&gt;Does this do what you need, and could you help me understand exactly what the use case is?&amp;nbsp; What does this data represent and what are you trying to learn from it?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2025 09:42:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/917705#M107733</guid>
      <dc:creator>HadleyMyers</dc:creator>
      <dc:date>2025-12-05T09:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to build linear or non linear models with constrained responses (sum of outputs = 1) in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/918367#M107779</link>
      <description>&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;Hi Hadley,&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;Thanks for your help. Unfortunately, your suggestion doesn't quite address my specific need.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;&lt;STRONG&gt;My Goal:&lt;/STRONG&gt; I need to predict outputs with a constraint where the sum equals 1—this is common when modeling population proportions or mixture formulations based on their properties.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;&lt;STRONG&gt;My Solution:&lt;/STRONG&gt; I've implemented a centered log-ratio (CLR) transformation manually. The workflow is:&lt;/P&gt;
&lt;OL class="[&amp;amp;:not(:last-child)_ul]:pb-1 [&amp;amp;:not(:last-child)_ol]:pb-1 list-decimal space-y-2.5 pl-7"&gt;
&lt;LI class="whitespace-normal break-words"&gt;Transform outputs to centered log space&lt;/LI&gt;
&lt;LI class="whitespace-normal break-words"&gt;Fit the model on transformed variables&lt;/LI&gt;
&lt;LI class="whitespace-normal break-words"&gt;Apply the inverse transformation to ensure the constraint is respected&lt;/LI&gt;
&lt;/OL&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;Here's the code for the transformation:&lt;/P&gt;
&lt;DIV class="relative group/copy bg-bg-000/50 border-0.5 border-border-400 rounded-lg"&gt;
&lt;DIV class="sticky opacity-0 group-hover/copy:opacity-100 top-2 py-2 h-12 w-0 float-right"&gt;
&lt;DIV class="absolute right-0 h-8 px-2 items-center inline-flex z-10"&gt;
&lt;DIV class="relative"&gt;
&lt;DIV class="flex items-center justify-center transition-all opacity-100 scale-100"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="flex items-center justify-center absolute top-0 left-0 transition-all opacity-0 scale-50"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE class="code-block__code !my-0 !rounded-lg !text-sm !leading-relaxed"&gt;&lt;CODE&gt;&lt;SPAN&gt;// Adjust zeros
&lt;/SPAN&gt;&lt;SPAN&gt;epsilon = 0.0000001;
&lt;/SPAN&gt;&lt;SPAN&gt;p1_adj = If(:p1 == 0, epsilon, :p1);
&lt;/SPAN&gt;&lt;SPAN&gt;p2_adj = If(:p2 == 0, epsilon, :p2);
&lt;/SPAN&gt;&lt;SPAN&gt;pk_adj = If(:pk == 0, epsilon, :pk);
&lt;/SPAN&gt;
&lt;SPAN&gt;// Scaling
&lt;/SPAN&gt;&lt;SPAN&gt;sum_adj = p1_adj + p2_adj + ... + pk_adj;
&lt;/SPAN&gt;&lt;SPAN&gt;p1_norm = p1_adj / sum_adj;
&lt;/SPAN&gt;&lt;SPAN&gt;p2_norm = p2_adj / sum_adj;
&lt;/SPAN&gt;&lt;SPAN&gt;pk_norm = pk_adj / sum_adj;
&lt;/SPAN&gt;
&lt;SPAN&gt;// Geometric mean
&lt;/SPAN&gt;&lt;SPAN&gt;geom_mean = (p1_norm * p2_norm * ... * pk_norm)^(1/k);
&lt;/SPAN&gt;
&lt;SPAN&gt;// CLR transformation
&lt;/SPAN&gt;&lt;SPAN&gt;y1_clr = Log(p1_norm / geom_mean);
&lt;/SPAN&gt;&lt;SPAN&gt;y2_clr = Log(p2_norm / geom_mean);
&lt;/SPAN&gt;&lt;SPAN&gt;yk_clr = Log(pk_norm / geom_mean);
&lt;/SPAN&gt;
&lt;SPAN&gt;// Inverse transformation (after prediction)
&lt;/SPAN&gt;&lt;SPAN&gt;sum_exp = Exp(:y1_clr_pred) + Exp(:y2_clr_pred) + ... + Exp(:yk_clr_pred);
&lt;/SPAN&gt;&lt;SPAN&gt;p1_pred = Exp(:y1_clr_pred) / sum_exp;
&lt;/SPAN&gt;&lt;SPAN&gt;p2_pred = Exp(:y2_clr_pred) / sum_exp;
&lt;/SPAN&gt;&lt;SPAN&gt;pk_pred = Exp(:yk_clr_pred) / sum_exp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;&lt;STRONG&gt;Additional Request:&lt;/STRONG&gt; I'd also like to use the Profiler to display stacked proportions for each output—similar to how Nominal Logistic displays stacked probabilities for each label. Your solution addresses the stacking visualization, but it only predicts the probability of the highest category rather than the exact proportion of each output.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;I've attached an example of the manual transformation for reference.&lt;/P&gt;
&lt;P class="font-claude-response-body break-words whitespace-normal "&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 15:10:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-build-linear-or-non-linear-models-with-constrained/m-p/918367#M107779</guid>
      <dc:creator>Florent_M</dc:creator>
      <dc:date>2025-12-08T15:10:31Z</dc:date>
    </item>
  </channel>
</rss>

