This file contains hidden or 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 torch | |
import pandas as pd | |
from sklearn.preprocessing import LabelEncoder | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import accuracy_score,f1_score | |
from pymlpipe.tabular import PyMLPipe |
This file contains hidden or 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
{ | |
"data": [ | |
[ | |
5.6, | |
3.0, | |
4.5, | |
1.5 | |
], | |
[ | |
5.6, |
This file contains hidden or 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
from sklearn.datasets import load_iris | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from pymlpipe.tabular import PyMLPipe | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.tree import DecisionTreeClassifier | |
from xgboost import XGBClassifier | |
from sklearn.metrics import accuracy_score,precision_score,recall_score,f1_score |
This file contains hidden or 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
with mlp.run(): | |
mlp.set_tags(["Classification","test run","dtree"]) | |
model=DecisionTreeClassifier() | |
model.fit(trainx, trainy) | |
predictions=model.predict(testx) | |
mlp.log_metrics({"Accuracy":accuracy_score(testy,predictions),"Precision": precision_score(testy,predictions,average='macro')}) | |
mlp.log_metric("Recall", recall_score(testy,predictions,average='macro')) | |
mlp.log_metric("F1", f1_score(testy,predictions,average='macro')) |
This file contains hidden or 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
from sklearn.linear_model import LogisticRegression | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.tree import DecisionTreeClassifier | |
from xgboost import XGBClassifier | |
from sklearn.metrics import accuracy_score,precision_score,recall_score,f1_score |
This file contains hidden or 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
from sklearn.model_selection import train_test_split | |
trainx,testx,trainy,testy=train_test_split(df,target) |
This file contains hidden or 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
from pymlpipe.tabular import PyMLPipe | |
mlp=PyMLPipe() | |
mlp.set_experiment("IrisDataV2") | |
mlp.set_version(0.1) |
This file contains hidden or 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
from sklearn.datasets import load_iris | |
iris_data=load_iris() | |
data=iris_data["data"] | |
target=iris_data["target"] | |
df=pd.DataFrame(data,columns=iris_data["feature_names"]) |
This file contains hidden or 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 cv2 | |
import math | |
from scipy import ndimage | |
import matplotlib.pyplot as plt | |
from lxml import etree | |
import xml.etree.cElementTree as xml | |
import os | |
from PIL import Image | |
"""Tools for satellite imagery pre-processing""" |
This file contains hidden or 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
from gingerit.gingerit import GingerIt | |
parser = GingerIt() | |
#line==string you wanna correct | |
tweet=parser.parse(line) |