This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import weka.classifiers.Evaluation; | |
import weka.classifiers.trees.J48; | |
import weka.core.*; | |
import com.opencsv.CSVReader; | |
import java.io.FileReader; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example.argoritmia; | |
import weka.classifiers.trees.J48; | |
import weka.core.Attribute; | |
import weka.core.Instances; | |
import weka.core.converters.CSVLoader; | |
import weka.core.Instance; | |
import weka.core.DenseInstance; | |
import java.io.File; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.commons.math3.analysis.function.Exp; | |
import org.apache.commons.math3.fitting.WeightedObservedPoints; | |
import org.apache.commons.math3.fitting.WeightedObservedPoint; | |
import org.apache.commons.math3.stat.regression.SimpleRegression; // Cambiar la importación | |
public class RegresionLinealSimple { | |
public static void main(String[] args) { | |
// Datos de entrada | |
double[] years = {2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023}; | |
double[] saldo = {751, 795, 852, 953, 971, 1002, 1287, 1396, 1399, 1502, 1596, 2000, 2842, 3052, 3520}; |