71 template<
typename dtype,
73 std::enable_if_t<std::is_arithmetic_v<dtype>,
int> = 0,
76 std::pair<NdArray<double>,
double>
132 return std::make_pair(beta.flatten(),
rms(
residuals).item());
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition Error.hpp:37
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4587
Slice cSlice(index_type inStartIdx=0, size_type inStepSize=1) const
Definition NdArrayCore.hpp:1008
Definition cholesky.hpp:41
NdArray< double > inv(const NdArray< dtype > &inArray)
Definition inv.hpp:54
std::pair< NdArray< double >, double > gaussNewtonNlls(const uint32 numIterations, const NdArray< dtype > &coordinates, const NdArray< dtype > &measurements, const std::function< dtype(const NdArray< dtype > &, const NdArray< dtype > &)> &function, const std::array< std::function< dtype(const NdArray< dtype > &, const NdArray< dtype > &)>, sizeof...(Params)> &derivatives, Params... initialGuess)
Definition gaussNewtonNlls.hpp:77
constexpr bool all_arithmetic_v
Definition TypeTraits.hpp:67
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
constexpr bool all_same_v
Definition TypeTraits.hpp:101
NdArray< double > rms(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition rms.hpp:51
std::uint32_t uint32
Definition Types.hpp:40