Package com.rapidminer.utils

Examples of com.rapidminer.utils.Random


    /// <param name="mean">the mean of the normal distribution drawn from</param>
    /// <param name="stdev">the standard deviation of the normal distribution</param>
    /// <param name="row">the row to be initialized</param>
    static public void RowInitNormal(Matrix matrix, double mean, double stdev, int row)
    {
      Random rnd = Random.GetInstance();
      for (int j = 0; j < matrix.dim2; j++)
        matrix.setLocation(row, j,  rnd.NextNormal(mean, stdev));
    }
View Full Code Here


    /// <param name="mean">the mean of the normal distribution drawn from</param>
    /// <param name="stdev">the standard deviation of the normal distribution</param>
    /// <param name="column">the column to be initialized</param>
    static public void ColumnInitNormal(Matrix matrix, double mean, double stdev, int column)
    {
      Random rnd = Random.GetInstance();
      for (int i = 0; i < matrix.dim1; i++)
        matrix.setLocation(i, column, rnd.NextNormal(mean, stdev));
    }
View Full Code Here

    /// <param name="matrix">the matrix to initialize</param>
    /// <param name="mean">the mean of the normal distribution drawn from</param>
    /// <param name="stdev">the standard deviation of the normal distribution</param>
    static public void RowInitNormal(Matrix matrix, double mean, double stdev)
    {
      Random rnd = Random.GetInstance();
      for (int i = 0; i < matrix.dim1; i++)
        for (int j = 0; j < matrix.dim2; j++)
          matrix.setLocation(i, j, rnd.NextNormal(mean, stdev));
    }
View Full Code Here

    static public void RowInitNormal(Matrix matrix, int start_row_index, int end_row_index ,double mean, double stdev)
    {
      if(start_row_index>end_row_index)
        throw new IllegalArgumentException("Starting row index must be smaller than ending row index");
     
      Random rnd = Random.GetInstance();
      for (int i = start_row_index; i < end_row_index; i++)
        for (int j = 0; j < matrix.dim2; j++)
          matrix.setLocation(i, j, rnd.NextNormal(mean, stdev));
    }
View Full Code Here

TOP

Related Classes of com.rapidminer.utils.Random

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.