Source/Systems

PartitionedRegression.NativeHost

systems/partitioned-regression/src/PartitionedRegression/NativeHost.alpha

1,091 lines64 declarations48.0 KiBSHA-256 08cad7dc687e

def · lines 137–162

peerHostContribution

Full file
The combiner has sample x=1, y=0, gradient w. The worker has x=1 and x=2, hence numerator w*1*1 + w*2*2. Its mass is carried as an integer, not a mean. Divide by the total sample mass, then apply w - (1/4)*g. No gradient or learning-rate byte pattern is pasted into the program.
137def peerHostContribution =
138  (lambda unrestricted worker : Nat .
139    (lambda unrestricted weight : Nat .
140      (lambda unrestricted numerator : Nat .
141        (lambda unrestricted work : Nat .
142          (lambda unrestricted tail : (family NativePhysicalCommands) .
143            (nat-eliminate
144              (lambda unrestricted role : Nat . (family NativePhysicalCommands))
145              (peerStore numerator (frameNativeLoad weight) tail)
146              (lambda unrestricted previous : Nat .
147                (lambda unrestricted ignored : (family NativePhysicalCommands) .
148                  (peerNatural
149                    work
150                    2
151                    (peerBinary
152                      peerMultiply
153                      work
154                      work
155                      work
156                      (peerBinary
157                        peerMultiply
158                        numerator
159                        weight
160                        work
161                        (peerBinary peerAdd numerator numerator weight tail))))))
162              worker))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.