forked from s464914/ium_464914
update
This commit is contained in:
parent
dcd281495b
commit
00367909c2
7
IUM_2.py
7
IUM_2.py
@ -1,13 +1,7 @@
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
import kaggle
|
|
||||||
from sklearn.model_selection import train_test_split
|
from sklearn.model_selection import train_test_split
|
||||||
from sklearn.preprocessing import StandardScaler
|
from sklearn.preprocessing import StandardScaler
|
||||||
|
|
||||||
def download_file():
|
|
||||||
kaggle.api.authenticate()
|
|
||||||
kaggle.api.dataset_download_files('nasa/meteorite-landings', path='.', unzip=True)
|
|
||||||
|
|
||||||
|
|
||||||
def split(data):
|
def split(data):
|
||||||
meteorite_train, meteorite_test = train_test_split(data, test_size=0.2, random_state=1)
|
meteorite_train, meteorite_test = train_test_split(data, test_size=0.2, random_state=1)
|
||||||
meteorite_train, meteorite_val = train_test_split(meteorite_train, test_size=0.25, random_state=1)
|
meteorite_train, meteorite_val = train_test_split(meteorite_train, test_size=0.25, random_state=1)
|
||||||
@ -28,7 +22,6 @@ def preprocessing(data):
|
|||||||
data.loc[(data['mass'].isnull()) & (data['name'].str.startswith('Österplana')), 'mass'] = 0
|
data.loc[(data['mass'].isnull()) & (data['name'].str.startswith('Österplana')), 'mass'] = 0
|
||||||
return data
|
return data
|
||||||
|
|
||||||
download_file()
|
|
||||||
data = pd.read_csv("meteorite-landings.csv")
|
data = pd.read_csv("meteorite-landings.csv")
|
||||||
meteorite_train, meteorite_test, meteorite_val = split(data)
|
meteorite_train, meteorite_test, meteorite_val = split(data)
|
||||||
|
|
||||||
|
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -11,6 +11,16 @@ pipeline {
|
|||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Download dataset') {
|
||||||
|
steps {
|
||||||
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
||||||
|
sh 'pip install kaggle'
|
||||||
|
sh 'kaggle datasets download -d nasa/meteorite-landings'
|
||||||
|
sh 'unzip -o meteorite-landings.zip'
|
||||||
|
sh 'rm meteorite-landings.zip'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
Loading…
Reference in New Issue
Block a user