コード例 #1
0
 void TransformationModelLinear::getDefaultParameters(Param& params)
 {
   params.clear();
   params.setValue("symmetric_regression", "false", "Perform linear regression"
                                                    " on 'y - x' vs. 'y + x', instead of on 'y' vs. 'x'.");
   params.setValidStrings("symmetric_regression",
                          ListUtils::create<String>("true,false"));
 }
コード例 #2
0
 void TransformationModelBSpline::getDefaultParameters(Param & params)
 {
   params.clear();
   params.setValue("num_breakpoints", 5, "Number of breakpoints of the cubic spline in the smoothing step. More breakpoints mean less smoothing. Reduce this number if the transformation has an unexpected shape.");
   params.setMinInt("num_breakpoints", 2);
   params.setValue("break_positions", "uniform", "How to distribute the breakpoints on the retention time scale. 'uniform': intervals of equal size; 'quantiles': equal number of data points per interval.");
   params.setValidStrings("break_positions", StringList::create("uniform,quantiles"));
 }
コード例 #3
0
 void TransformationModelInterpolated::getDefaultParameters(Param & params)
 {
   params.clear();
   params.setValue("interpolation_type", "cspline",
                   "Type of interpolation to apply.");
   StringList types = StringList::create("linear,polynomial,cspline,akima");
   params.setValidStrings("interpolation_type", types);
 }
コード例 #4
0
ファイル: PeakIntegrator.cpp プロジェクト: OpenMS/OpenMS
  void PeakIntegrator::getDefaultParameters(Param& params)
  {
    params.clear();

    params.setValue("integration_type", INTEGRATION_TYPE_INTENSITYSUM, "The integration technique to use in integratePeak() and estimateBackground() which uses either the summed intensity, integration by Simpson's rule or trapezoidal integration.");
    params.setValidStrings("integration_type", ListUtils::create<String>("intensity_sum,simpson,trapezoid"));

    params.setValue("baseline_type", BASELINE_TYPE_BASETOBASE, "The baseline type to use in estimateBackground() based on the peak boundaries. A rectangular baseline shape is computed based either on the minimal intensity of the peak boundaries, the maximum intensity or the average intensity (base_to_base).");
    params.setValidStrings("baseline_type", ListUtils::create<String>("base_to_base,vertical_division,vertical_division_min,vertical_division_max"));

    params.setValue("fit_EMG", "false", "Fit the chromatogram/spectrum to the EMG peak model.");
    params.setValidStrings("fit_EMG", ListUtils::create<String>("false,true"));
  }
コード例 #5
0
ファイル: Client.cpp プロジェクト: williamwaterson/protolayer
bool retrieve(Param& instance, int& id, net::MessageProtocol::Type type, int& port)
{
  instance.clear();

  std::string address("127.0.0.1");
  net::Socket socket(address, port);

  iostream::XdrOutputStream& ostream = socket.getXdrOutputStream();

  ostream.write(type);
  ostream.flush();

  ostream.write(id);
  ostream.flush();

  checkResponse(socket);

  instance.clear();
  iostream::XdrInputStream& istream = socket.getXdrInputStream();
  instance.decode(istream);

  // TODO: Change this
  return true;
}
コード例 #6
0
 void TransformationModelLinear::getDefaultParameters(Param& params)
 {
   params.clear();
   params.setValue("symmetric_regression", "false", "Perform linear regression"
                                                    " on 'y - x' vs. 'y + x', instead of on 'y' vs. 'x'.");
   params.setValidStrings("symmetric_regression",
                          ListUtils::create<String>("true,false"));
   params.setValue("x_weight", "", "Weight x values");
   params.setValidStrings("x_weight",
                          ListUtils::create<String>("1/x,1/x2,ln(x),"));
   params.setValue("y_weight", "", "Weight y values");
   params.setValidStrings("y_weight",
                          ListUtils::create<String>("1/y,1/y2,ln(y),"));
   params.setValue("x_datum_min", 1e-15, "Minimum x value");
   params.setValue("x_datum_max", 1e15, "Maximum x value");
   params.setValue("y_datum_min", 1e-15, "Minimum y value");
   params.setValue("y_datum_max", 1e15, "Maximum y value");
 }
コード例 #7
0
  void TransformationModelLowess::getDefaultParameters(Param& params)
  {
    params.clear();
    params.setValue("span", 2/3.0, "Fraction of datapoints (f) to use for each local regression (determines the amount of smoothing). Choosing this parameter in the range .2 to .8 usually results in a good fit.");
    params.setMinFloat("span", 0.0);
    params.setMaxFloat("span", 1.0);

    params.setValue("num_iterations", 3, "Number of rubstifying iterations for lowess fitting.");
    params.setMinInt("num_iterations", 0);

    params.setValue("delta", -1.0, "Nonnegative parameter which may be used to save computations (recommended value is 0.01 of the range of the input, e.g. for data ranging from 1000 seconds to 2000 seconds, it could be set to 10). Setting a negative value will automatically do this.");

    params.setValue("interpolation_type", "cspline", "Method to use for interpolation between datapoints computed by lowess. 'linear': Linear interpolation. 'cspline': Use the cubic spline for interpolation. 'akima': Use an akima spline for interpolation");
    params.setValidStrings("interpolation_type", ListUtils::create<String>("linear,cspline,akima"));

    params.setValue("extrapolation_type", "four-point-linear", "Method to use for extrapolation outside the data range. 'two-point-linear': Uses a line through the first and last point to extrapolate. 'four-point-linear': Uses a line through the first and second point to extrapolate in front and and a line through the last and second-to-last point in the end. 'global-linear': Uses a linear regression to fit a line through all data points and use it for interpolation.");
    StringList etypes = ListUtils::create<String>("two-point-linear,four-point-linear,global-linear");
    params.setValidStrings("extrapolation_type", etypes);
  }