<commit_before>//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#pragma once

#include "SurrogateModel.h"
#include "GaussianProcessTrainer.h"
#include "Standardizer.h"
#include <Eigen/Dense>

class GaussianProcess : public SurrogateModel
{
public:
  static InputParameters validParams();
  GaussianProcess(const InputParameters & parameters);
  virtual Real evaluate(const std::vector<Real> & x) const override;
  virtual Real evaluate(const std::vector<Real> & x, Real & std) const;

private:
  ///Paramaters (x) used for training, along with statistics
  const RealEigenMatrix & _training_params;
  const StochasticTools::Standardizer & _param_standardizer;
  //const RealEigenVector & _training_params_mean;
  //const RealEigenVector & _training_params_var;

  /// Data (y) used for training, along with statistics
  const RealEigenMatrix & _training_data;
  const StochasticTools::Standardizer & _data_standardizer;
  //const RealEigenVector & _training_data_mean;
  //const RealEigenVector & _training_data_var;

  /// An _n_sample by _n_sample covariance matrix constructed from the selected kernel function
  const RealEigenMatrix & _K;

  /// A solve of Ax=b via Cholesky.
  const RealEigenMatrix & _K_results_solve;

  /// Pointer to covariance function used for K matrix
  const std::unique_ptr<CovarianceFunction::CovarianceKernel> & _covar_function;
};<commit_msg>Clean up of file #15482<commit_after>//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#pragma once

#include "SurrogateModel.h"
#include "GaussianProcessTrainer.h"
#include "Standardizer.h"
#include <Eigen/Dense>

class GaussianProcess : public SurrogateModel
{
public:
  static InputParameters validParams();
  GaussianProcess(const InputParameters & parameters);
  virtual Real evaluate(const std::vector<Real> & x) const override;
  virtual Real evaluate(const std::vector<Real> & x, Real & std) const;

private:
  ///Paramaters (x) used for training
  const RealEigenMatrix & _training_params;

  /// Standardizer for use with params (x)
  const StochasticTools::Standardizer & _param_standardizer;

  /// Data (y) used for training
  const RealEigenMatrix & _training_data;

  /// Standardizer for use with data (y)
  const StochasticTools::Standardizer & _data_standardizer;

  /// An _n_sample by _n_sample covariance matrix constructed from the selected kernel function
  const RealEigenMatrix & _K;

  /// A solve of Ax=b via Cholesky.
  const RealEigenMatrix & _K_results_solve;

  /// Pointer to covariance function used for K matrix
  const std::unique_ptr<CovarianceFunction::CovarianceKernel> & _covar_function;
};
{'fraction_non_alphanumeric': 0.10286624203821657, 'fraction_numerical': 0.004140127388535032, 'mean_word_length': 4.618962432915922, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7658703', 'n_tokens_mistral': 972, 'n_tokens_neox': 932, 'n_words': 280}