static double[][] MakeData(List <List <double> > trainData, int numItems, IndicatorQT1 qt1, int numInput) { // make the result matrix holder (now first index is row) double[][] result = new double[numItems][]; for (int r = 0; r < numItems; ++r) { // allocate the cols result[r] = new double[numInput]; } double dbInput = 0; for (int r = 0; r < numItems; ++r) { double[] inputs = new double[numInput]; if ((trainData.Count + 1) > numInput) { for (int i = 0; i < numInput; ++i) { //skip col[0] dbInput = trainData[i + 1][r]; inputs[i] = dbInput; } int c = 0; for (int i = 0; i < numInput; ++i) { result[r][c++] = inputs[i]; } } } return(result); }
public ML03(int indicatorIndex, string label, string[] mathTerms, string[] colNames, string[] depColNames, string subalgorithm, int ciLevel, int iterations, int random, IndicatorQT1 qT1, CalculatorParameters calcParams) : base(indicatorIndex, label, mathTerms, colNames, depColNames, subalgorithm, ciLevel, iterations, random, qT1, calcParams) { }
public PRA1(int ciLevel, int iterations, int random, IndicatorQT1 qT1, CalculatorParameters calcParams) : base() { CILevel = ciLevel; Random = random; Iterations = iterations; if (qT1 == null) { qT1 = new IndicatorQT1(); } this.IndicatorQT = new IndicatorQT1(qT1); Params = calcParams; }
public PRA1(PRA1 pra1) : base() { ColNames = pra1.ColNames; _depColNames = pra1._depColNames; MathTerms = pra1.MathTerms; _subalgorithm = pra1._subalgorithm; //188 anors can run algos and pass back totals to calling procedure _totalsNeeded = pra1._totalsNeeded; Label = pra1.Label; CILevel = pra1.CILevel; Random = pra1.Random; Iterations = pra1.Iterations; IndicatorQT = new IndicatorQT1(pra1.IndicatorQT); //getobserveddata ObsTs = pra1.ObsTs; }
public Script1(string[] mathTerms, string[] colNames, string[] depColNames, double[] qs, string algorithm, string subAlgorithm, CalculatorParameters calcParams, IndicatorQT1 qt1) : base() { _colNames = colNames; _depColNames = depColNames; _mathTerms = mathTerms; _algorithm = algorithm; _subalgorithm = subAlgorithm; //estimators //add an intercept to qs _qs = new double[qs.Count() + 1]; //1 * b0 = b0 _qs[0] = 1; qs.CopyTo(_qs, 1); _params = calcParams; //public and by ref back to algos meta = new IndicatorQT1(qt1); }
public MLBase(int indicatorIndex, string label, string[] mathTerms, string[] colNames, string[] depColNames, string subalgorithm, int ciLevel, int iterations, int random, IndicatorQT1 qT1, CalculatorParameters calcParams) : base() { _colNames = colNames; _depColNames = depColNames; _mathTerms = mathTerms; _subalgorithm = subalgorithm; _label = label; _ciLevel = ciLevel; _random = random; _iterations = iterations; if (qT1 == null) { qT1 = new IndicatorQT1(); } IndicatorQT = new IndicatorQT1(qT1); Params = calcParams; }
public PRA1(string label, string[] mathTerms, string[] colNames, string[] depColNames, int totalsNeeded, string subalgorithm, int ciLevel, int iterations, int random, List <double> qTs, IndicatorQT1 qT1, CalculatorParameters calcParams) : base() { ColNames = colNames; _depColNames = depColNames; MathTerms = mathTerms; _subalgorithm = subalgorithm; //188 anors can run algos and pass back totals to calling procedure _totalsNeeded = totalsNeeded; Label = label; CILevel = ciLevel; Random = random; Iterations = iterations; if (qT1 == null) { qT1 = new IndicatorQT1(); } IndicatorQT = new IndicatorQT1(qT1); //getobserveddata ObsTs = qTs.ToArray(); Params = calcParams; }