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
### SMOTE | |
from imblearn.over_sampling import SMOTE | |
X_resampled, y_resampled = SMOTE().fit_sample(X_train, y_train) | |
### ROC_AUC_SCORE | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import roc_auc_score | |
logreg = LogisticRegression() | |
logreg.fit(X_train, y_train) |
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 numpy as np | |
import pandas as pd | |
from sklearn.model_selection import StratifiedShuffleSplit | |
train = pd.read_csv("data/application_train.csv") | |
test = pd.read_csv("data/application_test.csv") | |
# common fuction | |
def error(actual, predicted): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 ssw; | |
import java.util.*; | |
/** | |
* Created by sunu.park on 2018. 11. 10. | |
*/ | |
class Point{ | |
int x, y; |
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
##!pip3 install summa | |
#Step1. textrank를 활용 문서에서 중요문장 추출 | |
from summa.summarizer import summarize | |
f = open("wiki_en/chosun.txt", 'r') | |
data = f.read() | |
summary = summarize(data, ratio=0.2) | |
f = open("wiki_en/chosun_min.txt", "w") |
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
##!pip3 install textrankr | |
# Step1. 문서요약으로 중요문장 찾기 (여기선 3문장) | |
from __future__ import print_function | |
from textrankr import TextRank | |
f = open("wiki/chosun.txt", 'r') | |
data = f.read() | |
textrank = TextRank(data) |
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
''' | |
Source code for an attention based image caption generation system described | |
in: | |
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention | |
International Conference for Machine Learning (2015) | |
http://arxiv.org/abs/1502.03044 | |
''' | |
import torch | |
import torch.nn as nn |
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
channels: | |
- defaults | |
dependencies: | |
- ipython | |
- ipywidgets | |
- matplotlib | |
- numpy | |
- scipy |
OlderNewer