$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Command (m for help): nPartition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions)Select (default p): pPartition number (1-4, default 1): First sector (2048-30283007, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P}(2048-30283007, default 30283007): Created a new partition 1 of type 'Linux' and of size 14.4 GiB.
$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Command (m for help): nAll space for primary partitions is in use. # パーティション作成できないCommand (m for help): d # パーティション削除Selected partition 1Partition 1 has been deleted.
$ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Command (m for help): tSelected partition 1Hex code (type L to list all codes): fdChanged type of partition 'Linux' to 'Linux raid autodetect'.
HDDの変更を保存
下記で変更を保存する。
Command (m forhelp): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
mdadm: largest drive (/dev/sdb1) exceeds size (15131264K) by more than 1%
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
import xgboost as xgb
from sklearn import datasets
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
pred = bst.predict(dtest)
score = mean_squared_error(y_te, pred)
print('score:', format(score))
重要度変数可視化
xgb.plot_importance(bst)
分類編
import
分類では以下のモジュールを使用。
import xgboost as xgb
from sklearn import datasets
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score