public class Svdpp.UserComputation extends Object implements ComputeFunction<CfLongId,Svdpp.SvdppValue,Float,FloatMatrixMessage>
ComputeFunction.Aggregators, ComputeFunction.Callback<K,VV,EV,Message>, ComputeFunction.InitCallback, ComputeFunction.MasterCallback, ComputeFunction.ReadAggregators, ComputeFunction.ReadWriteAggregators
Constructor and Description |
---|
UserComputation() |
Modifier and Type | Method and Description |
---|---|
void |
compute(int superstep,
VertexWithValue<CfLongId,Svdpp.SvdppValue> vertex,
Iterable<FloatMatrixMessage> messages,
Iterable<EdgeWithValue<CfLongId,Float>> edges,
ComputeFunction.Callback<CfLongId,Svdpp.SvdppValue,Float,FloatMatrixMessage> cb)
The function for computing a new vertex value or sending messages to the next superstep.
|
void |
preSuperstep(int superstep,
ComputeFunction.Aggregators aggregators)
Prepare for computation.
|
protected void |
updateValue(org.jblas.FloatMatrix user,
org.jblas.FloatMatrix item,
float error,
float gamma,
float lambda) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, masterCompute, postSuperstep
protected void updateValue(org.jblas.FloatMatrix user, org.jblas.FloatMatrix item, float error, float gamma, float lambda)
public void preSuperstep(int superstep, ComputeFunction.Aggregators aggregators)
ComputeFunction
preSuperstep
in interface ComputeFunction<CfLongId,Svdpp.SvdppValue,Float,FloatMatrixMessage>
superstep
- the superstepaggregators
- the aggregatorspublic void compute(int superstep, VertexWithValue<CfLongId,Svdpp.SvdppValue> vertex, Iterable<FloatMatrixMessage> messages, Iterable<EdgeWithValue<CfLongId,Float>> edges, ComputeFunction.Callback<CfLongId,Svdpp.SvdppValue,Float,FloatMatrixMessage> cb)
ComputeFunction
compute
in interface ComputeFunction<CfLongId,Svdpp.SvdppValue,Float,FloatMatrixMessage>
superstep
- the count of the current superstepvertex
- the current vertex with its valuemessages
- a Map of the source vertex and the message sent from the previous superstepedges
- the adjacent edges with their valuescb
- a callback for setting a new vertex value or sending messages to the next superstepCopyright © 2020. All rights reserved.