Exemplo n.º 1
0
    # 'RH',
    # 'wind',
    # 'rain'
]
# data.drop(labels= labels,axis= 1,inplace =True)

err = []
err1 = []
err2 = []
err3 = []
err4 = []
out = []

for i in range(75, 100, 1):
    out.append(float(i) / 100)
    d = remove_outlier_h(data, 'area', float(i) / 100)
    y = d.area
    plt.show()
    y = d.area
    x = d.drop(labels=['area'], axis=1)
    x_train, x_test, y_train, y_test = train_test_split(x,
                                                        y,
                                                        random_state=10,
                                                        test_size=0.3)

    reg = SVR(kernel='rbf',
              degree=1,
              gamma='auto',
              coef0=0.0,
              tol=0.001,
              C=1.0,
Exemplo n.º 2
0
    # 'X',
    # 'Y',
    # 'month',
    # 'day',
    # 'FFMC',
    # 'DMC',
    # 'DC',
    # 'ISI',
    # 'temp',
    # 'RH',
    # 'wind',
    # 'rain'
]
data.drop(labels=labels, axis=1, inplace=True)

d = remove_outlier_h(data, 'area', 0.85)
y = d.area
x = d.drop(labels=['area'], axis=1)
x_train, x_test, y_train, y_test = train_test_split(x,
                                                    y,
                                                    random_state=10,
                                                    test_size=0.3)

err = []
err1 = []
err2 = []
err3 = []
err4 = []
out = []

for i in range(1, 100):
Exemplo n.º 3
0
import pandas as pd
import matplotlib.pyplot as plt
import functions as fnc
import math
data = pd.read_csv("../forestfires.csv")
# data = data.drop(labels=['day'],axis=1)
data.month.replace(('jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug',
                    'sep', 'oct', 'nov', 'dec'),
                   (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12),
                   inplace=True)
data.day.replace(('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'),
                 (1, 2, 3, 4, 5, 6, 7),
                 inplace=True)

d = fnc.remove_outlier_h(data, 'area', 0.9)
y = d.area
plt.title("Burned area in ha")
plt.ylabel("Frequency")
plt.hist(y)
y = list(y)
print(len(y))
plt.show()