Skip to content

Instantly share code, notes, and snippets.

View ksdkamesh99's full-sized avatar
💻
Sleep-Code-Eat

Kota Kamesh ksdkamesh99

💻
Sleep-Code-Eat
View GitHub Profile
model_torch=convert(model,'pytorch')
# Calculation of time for predicting test data
%%time
#prediction of labels for test data
y_pred=model.predict(np.array(x_test))
#importing metrics from sklearn
model=RandomForestClassifier(n_estimators=300)
model.fit(x_train,y_train)
# load CSV file
data=pd.read_csv('winequality_red.csv')
#plot the Countplot for the column quality
sns.countplot(x='quality',data=data)
# store the quality dataframe
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import RandomForestClassifier
import seaborn as sns
from hummingbird.ml import convert
from sklearn.model_selection import train_test_split
!pip install hummingbird-ml
%%time
#opening hdf5 file
df_vaex=vaex.open('dataset.csv.hdf5')
print(df_vaex.head())
%%time
#importing vaex library
import vaex
#converting csv to hdf5 format
df=vaex.from_csv('dataset.csv',convert=True)
pip install vaex
#Converting datatype int64 to int32
dataset=dataset.astype('int32')
#info of dataframe
dataset.info()