Search in sources :

Example 6 with SimpleParamVector

use of edu.cmu.ml.proppr.util.math.SimpleParamVector in project ProPPR by TeamCohen.

the class SRWTest method moreSetup.

@Override
public void moreSetup(LearningGraphBuilder lgb) {
    uniformParams = srw.getRegularizer().setupParams(new SimpleParamVector<String>(new ConcurrentHashMap<String, Double>()));
    for (String n : new String[] { "fromb", "tob", "fromr", "tor" }) uniformParams.put(n, srw.getSquashingFunction().defaultValue());
    startVec = new TIntDoubleHashMap();
    startVec.put(nodes.getId("r0"), 1.0);
}
Also used : TIntDoubleHashMap(gnu.trove.map.hash.TIntDoubleHashMap) SimpleParamVector(edu.cmu.ml.proppr.util.math.SimpleParamVector)

Aggregations

SimpleParamVector (edu.cmu.ml.proppr.util.math.SimpleParamVector)6 StatusLogger (edu.cmu.ml.proppr.util.StatusLogger)2 TIntDoubleHashMap (gnu.trove.map.hash.TIntDoubleHashMap)2 PosNegRWExample (edu.cmu.ml.proppr.examples.PosNegRWExample)1 ArrayLearningGraphBuilder (edu.cmu.ml.proppr.graph.ArrayLearningGraphBuilder)1 FixedWeightRules (edu.cmu.ml.proppr.learn.tools.FixedWeightRules)1 CustomConfiguration (edu.cmu.ml.proppr.util.CustomConfiguration)1 ParamsFile (edu.cmu.ml.proppr.util.ParamsFile)1 ParsedFile (edu.cmu.ml.proppr.util.ParsedFile)1 SimpleSymbolTable (edu.cmu.ml.proppr.util.SimpleSymbolTable)1 NamedThreadFactory (edu.cmu.ml.proppr.util.multithreading.NamedThreadFactory)1 TIntDoubleIterator (gnu.trove.iterator.TIntDoubleIterator)1 TIntDoubleMap (gnu.trove.map.TIntDoubleMap)1 File (java.io.File)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 ExecutorService (java.util.concurrent.ExecutorService)1 ThreadPoolExecutor (java.util.concurrent.ThreadPoolExecutor)1 CommandLine (org.apache.commons.cli.CommandLine)1 Option (org.apache.commons.cli.Option)1