All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.pepstock.charba.client.ml.NativePolynomialRegression Maven / Gradle / Ivy

/**
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
    
      http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
*/
package org.pepstock.charba.client.ml;

import org.pepstock.charba.client.commons.ArrayDouble;
import org.pepstock.charba.client.commons.NativeName;

import jsinterop.annotations.JsMethod;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;

/**
 * Polynomial Regression is a regression algorithm that models the relationship between a dependent(y) and independent variable(x) as nth degree polynomial.
* The Polynomial Regression equation is given below:
*
* y = b0 + b1x1 + b2x12 + * b2x13 +...... bnx1n
*
* It maps mljs/regression-polynomial. * * @author Andrea "Stock" Stocchero * */ @JsType(isNative = true, name = NativeName.ML_POLYNOMIAL_REGRESSION, namespace = JsPackage.GLOBAL) final class NativePolynomialRegression extends NativeBasePolynomialRegression { /** * Creates the polynomial regression object, using the passed data to calculate the formula. * * @param x values bound to x * @param y values bound to y * @param degree the maximum degree of the polynomial */ // Ignores SonarCloud issue, java:S1172 - Unused method parameters should be removed, because this is the way of JSINTEROP to invoke a JavaScript constructor. @SuppressWarnings("java:S1172") NativePolynomialRegression(ArrayDouble x, ArrayDouble y, int degree) { // nothing } /** * Creates new regression by a descriptor. * * @param descriptor regression description used to create new regression * @return new regression instance */ @JsMethod static native NativePolynomialRegression load(RegressionDescriptor descriptor); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy