import nltk
nltk.download('stopwords')
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import PassiveAggressiveClassifier
from sklearn.metrics import accuracy_score, confusion_matrix
from lightgbm import LGBMClassifier
from nltk.corpus import stopwords
from sklearn.ensemble import RandomForestClassifier
import pandas as pd
import numpy as np
import urllib3
[nltk_data] Downloading package stopwords to /root/nltk_data... [nltk_data] Package stopwords is already up-to-date!
Os dados utilizados de noticias são do remositório Fake.br-Corpus. São vários arquivos de texto com as notícias separados em diretórios diferentes, marcados como 'fake' e 'true' disponibilizados no GitHub. Exemplo do conteúdo de um arquivo:
http = urllib3.PoolManager() # PoolManager
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # Desabilitando avisos
url = "https://raw.githubusercontent.com/roneysco/Fake.br-Corpus/master/full_texts/fake/%d.txt" % 1 # URL da notícia
r = http.request('GET', url) # Copiando notícia
print(r.data.decode('utf-8')) # Print com o texto decodificado
Kátia Abreu diz que vai colocar sua expulsão em uma moldura, mas não para de reclamar. A senadora Kátia Abreu (sem partido-TO) disse que sua expulsão do PMDB foi resultado de uma ação da cúpula atual da legenda que, segundo ela, é oportunista. “Amanhã eu vou botar numa moldura dourada a minha expulsão, porque das mãos de onde veio, é um atestado de boa conduta para o meu currículo. Essas pessoas que me expulsaram não servem ao país. Eles se servem do país em seus benefícios próprios”, disse Kátia Abreu. Ué, mas se a expulsão é algo tão bom para seu currículo, por que tanta choradeira, Kátia? Sabemos o motivo. Provavelmente Kátia não tem valor para o PT, partido que já deveria tê-la absorvido. Ao que parece o PT gostava de Kátia somente se ela ficasse entrincheirada dentro do PMDB. Ou seja, isso é se rebaixar demais. Resta a Kátia ficar chorando as pitangas por todos os cantos. Em tempo: até o momento o PT não cadastrou Kátia Abreu em suas fileiras. Que situação patética para a ex-ministra da Agricultura de Dilma.
É criado um dataframe do pandas.
df = pd.DataFrame(columns = ['noticia', 'label'])
Adicionando as notícias ao dataframe (são 3600 notícias fake e 3600 notícias reais):
for i in range(1, 3601):
url = "https://raw.githubusercontent.com/roneysco/Fake.br-Corpus/master/full_texts/fake/%d.txt" % i # URL da notícia
r = http.request('GET', url) # Copiando notícia
noticia = pd.DataFrame([[r.data.decode('utf-8'), 'fake']], columns = ['noticia', 'label'])
df = df.append(noticia, ignore_index=True)
for i in range(1, 3601):
url = "https://raw.githubusercontent.com/roneysco/Fake.br-Corpus/master/full_texts/true/%d.txt" % i # URL da notícia
r = http.request('GET', url) # Copiando notícia
noticia = pd.DataFrame([[r.data.decode('utf-8'), 'true']], columns = ['noticia', 'label'])
df = df.append(noticia, ignore_index=True)
Início do data-frame
df.head()
noticia | label | |
---|---|---|
0 | Kátia Abreu diz que vai colocar sua expulsão e... | fake |
1 | Blog esquerdista dá a entender que reclamar de... | fake |
2 | Alckmin diz que por ele PSDB desembarca, mas... | fake |
3 | Cara de pau não tem limites: Zé Celso aciona M... | fake |
4 | Temer resolve o problema de Luislinda: liberd... | fake |
Final do dataframe
df.tail()
noticia | label | |
---|---|---|
7195 | Ficou longe das notícias no fim de ano? Veja o... | true |
7196 | A nova denúncia contra o ex-presidente Luiz I... | true |
7197 | Como a Bahia virou uma potência mundial do mar... | true |
7198 | Alvo da Lava Jato, Bendine tinha passagem comp... | true |
7199 | Chefs convidados do Encontro Mundial das Cidad... | true |
df2 = pd.read_csv('https://raw.githubusercontent.com/ViniciusNunes0/SIRENE-news/master/noticias-sirene.csv', sep=';')
df2 = df2[['noticia', 'classificacao']]
df2 = df2.rename(columns={"noticia": "noticia", "classificacao": "label"})
df2['label'] = df2['label'].replace({0: 'true', 1: 'fake'})
df2.head()
df = df.append(df2, ignore_index=True)
x_train,x_test,y_train,y_test=train_test_split(df['noticia'], df['label'], test_size=0.2, random_state=42)
tfidf_vectorizer = TfidfVectorizer(stop_words=stopwords.words('portuguese'),
analyzer='word',
ngram_range=(1, 1),
lowercase=True,
use_idf=True)
tfidf_train = tfidf_vectorizer.fit_transform(x_train)
tfidf_test = tfidf_vectorizer.transform(x_test)
pac = PassiveAggressiveClassifier(max_iter=50, random_state=0)
pac.fit(tfidf_train,y_train)
y_pred = pac.predict(tfidf_test)
score = accuracy_score(y_test,y_pred)
print(f'Accuracy: {round(score*100,2)}%')
Accuracy: 96.69%
rf = RandomForestClassifier(random_state=0)
rf.fit(tfidf_train,y_train)
y_pred = rf.predict(tfidf_test)
score = accuracy_score(y_test,y_pred)
print(f'Accuracy: {round(score*100,2)}%')
Accuracy: 93.93%
lgbm = LGBMClassifier(learning_rate=0.1,
num_leaves=128,
min_child_samples=100,
ubsample=0.96,
colsample_bytree=0.28,
random_state=0,
subsample_freq=1,
n_estimators=100)
lgbm.fit(tfidf_train,y_train)
y_pred = lgbm.predict(tfidf_test)
score = accuracy_score(y_test,y_pred)
print(f'Accuracy: {round(score*100,2)}%')
Accuracy: 96.4%
!pip install scikit-optimize
from skopt import dummy_minimize
Collecting scikit-optimize Downloading https://files.pythonhosted.org/packages/4f/cf/b4aee828215a882495f7696ac85f8c1ecc0275923a18fecbb109ceaca651/scikit_optimize-0.7.2-py2.py3-none-any.whl (80kB) |████████████████████████████████| 81kB 2.5MB/s Requirement already satisfied: joblib in /usr/local/lib/python3.6/dist-packages (from scikit-optimize) (0.14.1) Collecting pyaml Downloading https://files.pythonhosted.org/packages/35/1e/eda9fe07f752ced7afcef590e7d74390f0d9c9c0b7ff98317afbaa0697e3/pyaml-19.12.0-py2.py3-none-any.whl Requirement already satisfied: scikit-learn>=0.19.1 in /usr/local/lib/python3.6/dist-packages (from scikit-optimize) (0.22.1) Requirement already satisfied: scipy>=0.14.0 in /usr/local/lib/python3.6/dist-packages (from scikit-optimize) (1.4.1) Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from scikit-optimize) (1.17.5) Requirement already satisfied: PyYAML in /usr/local/lib/python3.6/dist-packages (from pyaml->scikit-optimize) (3.13) Installing collected packages: pyaml, scikit-optimize Successfully installed pyaml-19.12.0 scikit-optimize-0.7.2
def treinar_modelo(params):
learning_rate = params[0]
num_leaves = params[1]
min_child_samples = params[2]
subsample = params[3]
colsample_bytree = params[4]
print(params, '\n')
mdl = LGBMClassifier(learning_rate=learning_rate,
num_leaves=num_leaves,
min_child_samples=min_child_samples,
subsample=subsample,
colsample_bytree=colsample_bytree,
random_state=0,
subsample_freq=1,
n_estimators=100)
mdl.fit(tfidf_train,y_train)
y_pred = mdl.predict(tfidf_test)
return -accuracy_score(y_test,y_pred)
space = [(1e-3, 1e-1, 'log-uniform'), #learning rate
(2, 128), # num_leaves
(1, 100), # min_child_samples
(0.05, 1.0), # subsample
(0.1, 1.0)] # colsample bytree
resultado = dummy_minimize(treinar_modelo, space, random_state=1, verbose=1, n_calls=30)
Iteration No: 1 started. Evaluating function at random point. [0.09871192514273254, 74, 10, 0.3372159440002478, 0.23208030173540176] Iteration No: 1 ended. Evaluation done at random point. Time taken: 24.9603 Function value obtained: -0.9539 Current minimum: -0.9539 Iteration No: 2 started. Evaluating function at random point. [0.001529949829431263, 78, 72, 0.3782826906908954, 0.457090726807603] Iteration No: 2 ended. Evaluation done at random point. Time taken: 6.4905 Function value obtained: -0.9221 Current minimum: -0.9539 Iteration No: 3 started. Evaluating function at random point. [0.01195730942971637, 128, 19, 0.5483207515942279, 0.49910760440160107] Iteration No: 3 ended. Evaluation done at random point. Time taken: 37.0118 Function value obtained: -0.9338 Current minimum: -0.9539 Iteration No: 4 started. Evaluating function at random point. [0.0028784217488024557, 16, 51, 0.9182639233502714, 0.5114843271882895] Iteration No: 4 ended. Evaluation done at random point. Time taken: 9.7546 Function value obtained: -0.9183 Current minimum: -0.9539 Iteration No: 5 started. Evaluating function at random point. [0.007267702383040958, 96, 97, 0.7894697745197069, 0.7443734643715278] Iteration No: 5 ended. Evaluation done at random point. Time taken: 12.4704 Function value obtained: -0.9146 Current minimum: -0.9539 Iteration No: 6 started. Evaluating function at random point. [0.04031948793713315, 63, 23, 0.5422449214947946, 0.8785182267810852] Iteration No: 6 ended. Evaluation done at random point. Time taken: 33.8039 Function value obtained: -0.9481 Current minimum: -0.9539 Iteration No: 7 started. Evaluating function at random point. [0.045529597892867466, 90, 14, 0.30939747550591, 0.15331888117140713] Iteration No: 7 ended. Evaluation done at random point. Time taken: 16.3770 Function value obtained: -0.9430 Current minimum: -0.9539 Iteration No: 8 started. Evaluating function at random point. [0.021930881089764206, 73, 4, 0.6880713925510277, 0.47060909107214777] Iteration No: 8 ended. Evaluation done at random point. Time taken: 57.5811 Function value obtained: -0.9363 Current minimum: -0.9539 Iteration No: 9 started. Evaluating function at random point. [0.002483715204721354, 26, 44, 0.7021758812975045, 0.8511631047076357] Iteration No: 9 ended. Evaluation done at random point. Time taken: 14.2743 Function value obtained: -0.9091 Current minimum: -0.9539 Iteration No: 10 started. Evaluating function at random point. [0.0010878688833867167, 43, 83, 0.98941803446117, 0.7733490889418555] Iteration No: 10 ended. Evaluation done at random point. Time taken: 13.6617 Function value obtained: -0.9171 Current minimum: -0.9539 Iteration No: 11 started. Evaluating function at random point. [0.003638211850540798, 89, 8, 0.14806470624875995, 0.5031041735583147] Iteration No: 11 ended. Evaluation done at random point. Time taken: 24.5911 Function value obtained: -0.9255 Current minimum: -0.9539 Iteration No: 12 started. Evaluating function at random point. [0.06564339077069616, 105, 24, 0.163515944581681, 0.572319439183401] Iteration No: 12 ended. Evaluation done at random point. Time taken: 12.0019 Function value obtained: -0.9502 Current minimum: -0.9539 Iteration No: 13 started. Evaluating function at random point. [0.0014697585967435188, 40, 9, 0.9149259627034465, 0.36903710098874454] Iteration No: 13 ended. Evaluation done at random point. Time taken: 25.5028 Function value obtained: -0.9313 Current minimum: -0.9539 Iteration No: 14 started. Evaluating function at random point. [0.014749532034944692, 89, 26, 0.633241401906253, 0.9608820910034701] Iteration No: 14 ended. Evaluation done at random point. Time taken: 41.3526 Function value obtained: -0.9234 Current minimum: -0.9539 Iteration No: 15 started. Evaluating function at random point. [0.0033262735259356143, 34, 89, 0.5567760660749166, 0.9549443246793757] Iteration No: 15 ended. Evaluation done at random point. Time taken: 9.7227 Function value obtained: -0.8957 Current minimum: -0.9539 Iteration No: 16 started. Evaluating function at random point. [0.009685436253688836, 2, 78, 0.09307844214592059, 0.225969507272543] Iteration No: 16 ended. Evaluation done at random point. Time taken: 1.7682 Function value obtained: -0.8932 Current minimum: -0.9539 Iteration No: 17 started. Evaluating function at random point. [0.03844210597293627, 93, 22, 0.8889692020284521, 0.5867093706408683] Iteration No: 17 ended. Evaluation done at random point. Time taken: 42.2379 Function value obtained: -0.9435 Current minimum: -0.9539 Iteration No: 18 started. Evaluating function at random point. [0.00786973960931508, 45, 21, 0.40870512409353993, 0.5845822248519866] Iteration No: 18 ended. Evaluation done at random point. Time taken: 17.2985 Function value obtained: -0.9284 Current minimum: -0.9539 Iteration No: 19 started. Evaluating function at random point. [0.020164978538544195, 59, 83, 0.6559446598566927, 0.2136833965403995] Iteration No: 19 ended. Evaluation done at random point. Time taken: 7.6264 Function value obtained: -0.9317 Current minimum: -0.9539 Iteration No: 20 started. Evaluating function at random point. [0.024010940718920456, 9, 25, 0.3814534248789504, 0.3429351025885235] Iteration No: 20 ended. Evaluation done at random point. Time taken: 6.8313 Function value obtained: -0.9246 Current minimum: -0.9539 Iteration No: 21 started. Evaluating function at random point. [0.061911658253265375, 96, 61, 0.9665980447909663, 0.6970973480366033] Iteration No: 21 ended. Evaluation done at random point. Time taken: 28.6212 Function value obtained: -0.9523 Current minimum: -0.9539 Iteration No: 22 started. Evaluating function at random point. [0.01751424579956557, 110, 93, 0.9520147957717178, 0.5049209201319466] Iteration No: 22 ended. Evaluation done at random point. Time taken: 13.6599 Function value obtained: -0.9292 Current minimum: -0.9539 Iteration No: 23 started. Evaluating function at random point. [0.014347598955915168, 84, 87, 0.27517563123087635, 0.9130415685060285] Iteration No: 23 ended. Evaluation done at random point. Time taken: 5.5491 Function value obtained: -0.9116 Current minimum: -0.9539 Iteration No: 24 started. Evaluating function at random point. [0.014039737029591284, 17, 6, 0.6362876679396877, 0.3939804115948866] Iteration No: 24 ended. Evaluation done at random point. Time taken: 17.6811 Function value obtained: -0.9309 Current minimum: -0.9539 Iteration No: 25 started. Evaluating function at random point. [0.011327034010293172, 103, 14, 0.3894062720023748, 0.9176816358278194] Iteration No: 25 ended. Evaluation done at random point. Time taken: 47.1847 Function value obtained: -0.9250 Current minimum: -0.9539 Iteration No: 26 started. Evaluating function at random point. [0.017649005221070314, 98, 56, 0.9329653720565734, 0.7218072257652316] Iteration No: 26 ended. Evaluation done at random point. Time taken: 27.0328 Function value obtained: -0.9259 Current minimum: -0.9539 Iteration No: 27 started. Evaluating function at random point. [0.09877469581360704, 123, 84, 0.18027896214743389, 0.9393359167334473] Iteration No: 27 ended. Evaluation done at random point. Time taken: 4.9769 Function value obtained: -0.9477 Current minimum: -0.9539 Iteration No: 28 started. Evaluating function at random point. [0.024753483395116363, 45, 7, 0.7676898999723432, 0.7784885696151218] Iteration No: 28 ended. Evaluation done at random point. Time taken: 46.1493 Function value obtained: -0.9313 Current minimum: -0.9539 Iteration No: 29 started. Evaluating function at random point. [0.07015345605895347, 11, 67, 0.16805741387355647, 0.11789212045581604] Iteration No: 29 ended. Evaluation done at random point. Time taken: 2.7115 Function value obtained: -0.9330 Current minimum: -0.9539 Iteration No: 30 started. Evaluating function at random point. [0.0011282932078263237, 23, 41, 0.28390051422289364, 0.8740251538145993] Iteration No: 30 ended. Evaluation done at random point. Time taken: 9.1497 Function value obtained: -0.9079 Current minimum: -0.9539
resultado.x
[0.09871192514273254, 74, 10, 0.3372159440002478, 0.23208030173540176]
from skopt import gp_minimize
resultados_gp = gp_minimize(treinar_modelo, space, random_state=1, verbose=1, n_calls=50, n_random_starts=10)
Iteration No: 1 started. Evaluating function at random point. [0.09871192514273254, 120, 14, 0.9990884895579377, 0.3124800792567785] Iteration No: 1 ended. Evaluation done at random point. Time taken: 49.8891 Function value obtained: -0.9598 Current minimum: -0.9598 Iteration No: 2 started. Evaluating function at random point. [0.006210998932353835, 51, 67, 0.9387621172657304, 0.8616798250174156] Iteration No: 2 ended. Evaluation done at random point. Time taken: 17.2649 Function value obtained: -0.9121 Current minimum: -0.9598 Iteration No: 3 started. Evaluating function at random point. [0.004232013397179603, 68, 45, 0.2680983530433343, 0.5809725180523154] Iteration No: 3 ended. Evaluation done at random point. Time taken: 8.6664 Function value obtained: -0.9200 Current minimum: -0.9598 Iteration No: 4 started. Evaluating function at random point. [0.0672858974212934, 60, 44, 0.9421713999524447, 0.8005503127028804] Iteration No: 4 ended. Evaluation done at random point. Time taken: 32.4960 Function value obtained: -0.9556 Current minimum: -0.9598 Iteration No: 5 started. Evaluating function at random point. [0.027035912483147396, 103, 10, 0.5422449214947946, 0.8785182267810853] Iteration No: 5 ended. Evaluation done at random point. Time taken: 62.7098 Function value obtained: -0.9397 Current minimum: -0.9598 Iteration No: 6 started. Evaluating function at random point. [0.045529597892867466, 107, 28, 0.1062810412364853, 0.7034752360620511] Iteration No: 6 ended. Evaluation done at random point. Time taken: 7.4884 Function value obtained: -0.9401 Current minimum: -0.9598 Iteration No: 7 started. Evaluating function at random point. [0.01535080081765723, 87, 42, 0.23767335308554222, 0.3606666764912312] Iteration No: 7 ended. Evaluation done at random point. Time taken: 7.3549 Function value obtained: -0.9276 Current minimum: -0.9598 Iteration No: 8 started. Evaluating function at random point. [0.0019241559628256106, 101, 42, 0.0824627456265471, 0.661626987829618] Iteration No: 8 ended. Evaluation done at random point. Time taken: 4.0012 Function value obtained: -0.9008 Current minimum: -0.9598 Iteration No: 9 started. Evaluating function at random point. [0.02095421812724112, 40, 45, 0.2610183201586061, 0.16602775456833962] Iteration No: 9 ended. Evaluation done at random point. Time taken: 5.6642 Function value obtained: -0.9284 Current minimum: -0.9598 Iteration No: 10 started. Evaluating function at random point. [0.008679147174590262, 14, 90, 0.163515944581681, 0.5723194391834011] Iteration No: 10 ended. Evaluation done at random point. Time taken: 3.3876 Function value obtained: -0.9049 Current minimum: -0.9598 Iteration No: 11 started. Searching for the next optimal point. [0.1, 2, 1, 1.0, 0.1] Iteration No: 11 ended. Search finished for the next optimal point. Time taken: 8.1544 Function value obtained: -0.9204 Current minimum: -0.9598 Iteration No: 12 started. Searching for the next optimal point. [0.1, 82, 100, 1.0, 0.1] Iteration No: 12 ended. Search finished for the next optimal point. Time taken: 9.7585 Function value obtained: -0.9573 Current minimum: -0.9598 Iteration No: 13 started. Searching for the next optimal point. [0.1, 128, 100, 1.0, 1.0] Iteration No: 13 ended. Search finished for the next optimal point. Time taken: 26.9558 Function value obtained: -0.9598 Current minimum: -0.9598 Iteration No: 14 started. Searching for the next optimal point. [0.1, 87, 1, 0.05, 1.0] Iteration No: 14 ended. Search finished for the next optimal point. Time taken: 69.4241 Function value obtained: -0.7647 Current minimum: -0.9598 Iteration No: 15 started. Searching for the next optimal point. [0.1, 128, 17, 0.6791405330341167, 0.36978260724986156] Iteration No: 15 ended. Search finished for the next optimal point. Time taken: 47.4743 Function value obtained: -0.9581 Current minimum: -0.9598 Iteration No: 16 started. Searching for the next optimal point. [0.1, 128, 100, 0.9562060254291818, 0.2826514395863122] Iteration No: 16 ended. Search finished for the next optimal point. Time taken: 13.6883 Function value obtained: -0.9619 Current minimum: -0.9619 Iteration No: 17 started. Searching for the next optimal point. [0.1, 128, 16, 0.7170517565581257, 0.7192043907505543] Iteration No: 17 ended. Search finished for the next optimal point. Time taken: 69.0674 Function value obtained: -0.9552 Current minimum: -0.9619 Iteration No: 18 started. Searching for the next optimal point. [0.001, 2, 18, 1.0, 0.1] Iteration No: 18 ended. Search finished for the next optimal point. Time taken: 3.5221 Function value obtained: -0.9091 Current minimum: -0.9619 Iteration No: 19 started. Searching for the next optimal point. [0.001, 128, 100, 0.6126979403477888, 1.0] Iteration No: 19 ended. Search finished for the next optimal point. Time taken: 11.6402 Function value obtained: -0.8819 Current minimum: -0.9619 Iteration No: 20 started. Searching for the next optimal point. [0.029872145925565766, 2, 24, 0.804947178555389, 0.1] Iteration No: 20 ended. Search finished for the next optimal point. Time taken: 3.4398 Function value obtained: -0.9079 Current minimum: -0.9619 Iteration No: 21 started. Searching for the next optimal point. [0.1, 128, 4, 0.05, 0.1] Iteration No: 21 ended. Search finished for the next optimal point. Time taken: 13.1276 Function value obtained: -0.7186 Current minimum: -0.9619 Iteration No: 22 started. Searching for the next optimal point. [0.1, 46, 69, 0.05, 0.27886906080963625] Iteration No: 22 ended. Search finished for the next optimal point. Time taken: 2.7451 Function value obtained: -0.9259 Current minimum: -0.9619 Iteration No: 23 started. Searching for the next optimal point. [0.1, 128, 10, 0.9667024841699353, 0.6580246295842597] Iteration No: 23 ended. Search finished for the next optimal point. Time taken: 86.3331 Function value obtained: -0.9527 Current minimum: -0.9619 Iteration No: 24 started. Searching for the next optimal point. [0.1, 128, 85, 1.0, 1.0] Iteration No: 24 ended. Search finished for the next optimal point. Time taken: 31.6482 Function value obtained: -0.9577 Current minimum: -0.9619 Iteration No: 25 started. Searching for the next optimal point. [0.1, 128, 29, 0.47229873092084085, 1.0] Iteration No: 25 ended. Search finished for the next optimal point. Time taken: 49.9670 Function value obtained: -0.9573 Current minimum: -0.9619 Iteration No: 26 started. Searching for the next optimal point. [0.001, 128, 36, 1.0, 0.1] Iteration No: 26 ended. Search finished for the next optimal point. Time taken: 19.9594 Function value obtained: -0.9188 Current minimum: -0.9619 Iteration No: 27 started. Searching for the next optimal point. [0.1, 128, 47, 1.0, 1.0] Iteration No: 27 ended. Search finished for the next optimal point. Time taken: 52.3109 Function value obtained: -0.9598 Current minimum: -0.9619 Iteration No: 28 started. Searching for the next optimal point. [0.1, 128, 51, 0.690163518775476, 0.1] Iteration No: 28 ended. Search finished for the next optimal point. Time taken: 15.3943 Function value obtained: -0.9573 Current minimum: -0.9619 Iteration No: 29 started. Searching for the next optimal point. [0.1, 128, 78, 0.5821641489959132, 0.1] Iteration No: 29 ended. Search finished for the next optimal point. Time taken: 8.3819 Function value obtained: -0.9539 Current minimum: -0.9619 Iteration No: 30 started. Searching for the next optimal point. [0.1, 128, 61, 0.46493671909185036, 1.0] Iteration No: 30 ended. Search finished for the next optimal point. Time taken: 21.6823 Function value obtained: -0.9548 Current minimum: -0.9619 Iteration No: 31 started. Searching for the next optimal point. [0.07065505099416787, 94, 21, 0.6579886820786071, 1.0] Iteration No: 31 ended. Search finished for the next optimal point. Time taken: 59.9456 Function value obtained: -0.9548 Current minimum: -0.9619 Iteration No: 32 started. Searching for the next optimal point. [0.1, 128, 91, 1.0, 0.1] Iteration No: 32 ended. Search finished for the next optimal point. Time taken: 11.7756 Function value obtained: -0.9581 Current minimum: -0.9619 Iteration No: 33 started. Searching for the next optimal point. [0.1, 128, 47, 0.694258025221401, 1.0] Iteration No: 33 ended. Search finished for the next optimal point. Time taken: 42.6876 Function value obtained: -0.9611 Current minimum: -0.9619 Iteration No: 34 started. Searching for the next optimal point. [0.001, 74, 100, 0.6290011906343209, 0.6851071876283265] Iteration No: 34 ended. Search finished for the next optimal point. Time taken: 9.7367 Function value obtained: -0.9129 Current minimum: -0.9619 Iteration No: 35 started. Searching for the next optimal point. [0.1, 2, 100, 0.6882574895687902, 1.0] Iteration No: 35 ended. Search finished for the next optimal point. Time taken: 3.6897 Function value obtained: -0.9154 Current minimum: -0.9619 Iteration No: 36 started. Searching for the next optimal point. [0.001, 104, 1, 1.0, 0.1] Iteration No: 36 ended. Search finished for the next optimal point. Time taken: 61.9762 Function value obtained: -0.9112 Current minimum: -0.9619 Iteration No: 37 started. Searching for the next optimal point. [0.1, 2, 94, 1.0, 0.7579423824962375] Iteration No: 37 ended. Search finished for the next optimal point. Time taken: 3.4479 Function value obtained: -0.9158 Current minimum: -0.9619 Iteration No: 38 started. Searching for the next optimal point. [0.001, 2, 22, 0.05, 1.0] Iteration No: 38 ended. Search finished for the next optimal point. Time taken: 4.0558 Function value obtained: -0.7961 Current minimum: -0.9619 Iteration No: 39 started. Searching for the next optimal point. [0.1, 128, 100, 0.2872896736759894, 0.6469028700861311] Iteration No: 39 ended. Search finished for the next optimal point. Time taken: 6.1838 Function value obtained: -0.9489 Current minimum: -0.9619 Iteration No: 40 started. Searching for the next optimal point. [0.1, 29, 100, 0.35649852215840644, 0.32166956996010443] Iteration No: 40 ended. Search finished for the next optimal point. Time taken: 6.0237 Function value obtained: -0.9539 Current minimum: -0.9619 Iteration No: 41 started. Searching for the next optimal point. [0.1, 64, 100, 0.7550429345651503, 0.5484507122183814] Iteration No: 41 ended. Search finished for the next optimal point. Time taken: 14.4771 Function value obtained: -0.9585 Current minimum: -0.9619 Iteration No: 42 started. Searching for the next optimal point. [0.1, 94, 100, 0.6230200199744601, 0.2416758362492999] Iteration No: 42 ended. Search finished for the next optimal point. Time taken: 8.5844 Function value obtained: -0.9539 Current minimum: -0.9619 Iteration No: 43 started. Searching for the next optimal point. [0.1, 85, 1, 0.8192871244331369, 0.7900859342771712] Iteration No: 43 ended. Search finished for the next optimal point. Time taken: 177.0017 Function value obtained: -0.9552 Current minimum: -0.9619 Iteration No: 44 started. Searching for the next optimal point. [0.1, 2, 1, 0.13948477404147397, 0.32121755739313207] Iteration No: 44 ended. Search finished for the next optimal point. Time taken: 9.0142 Function value obtained: -0.9158 Current minimum: -0.9619 Iteration No: 45 started. Searching for the next optimal point. [0.1, 68, 100, 0.4328201718060503, 0.45193645904272195] Iteration No: 45 ended. Search finished for the next optimal point. Time taken: 7.8458 Function value obtained: -0.9518 Current minimum: -0.9619 Iteration No: 46 started. Searching for the next optimal point. [0.1, 77, 10, 0.7664855205658347, 0.1] Iteration No: 46 ended. Search finished for the next optimal point. Time taken: 26.3770 Function value obtained: -0.9535 Current minimum: -0.9619 Iteration No: 47 started. Searching for the next optimal point. [0.0824998168892209, 7, 100, 0.10888942866593732, 1.0] Iteration No: 47 ended. Search finished for the next optimal point. Time taken: 3.5684 Function value obtained: -0.9330 Current minimum: -0.9619 Iteration No: 48 started. Searching for the next optimal point. [0.03908723990709154, 110, 100, 0.23667895805629796, 0.9426636175495662] Iteration No: 48 ended. Search finished for the next optimal point. Time taken: 5.3322 Function value obtained: -0.9288 Current minimum: -0.9619 Iteration No: 49 started. Searching for the next optimal point. [0.024294875676627584, 128, 100, 1.0, 1.0] Iteration No: 49 ended. Search finished for the next optimal point. Time taken: 20.1392 Function value obtained: -0.9271 Current minimum: -0.9619 Iteration No: 50 started. Searching for the next optimal point. [0.1, 128, 31, 0.9623256999582401, 1.0] Iteration No: 50 ended. Search finished for the next optimal point. Time taken: 65.2303 Function value obtained: -0.9569 Current minimum: -0.9619
resultados_gp.x
[0.1, 128, 100, 0.9562060254291818, 0.2826514395863122]
[0.1, 23, 51, 0.8039348617451548, 0.34702698317511055]