Skip to content

Instantly share code, notes, and snippets.

View 3liud's full-sized avatar
💭
Learning

Eliud Nduati 3liud

💭
Learning
View GitHub Profile
@3liud
3liud / PY0101EN-1-1-Types.ipynb
Created August 27, 2019 05:35
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@3liud
3liud / 1.3_notebook_quizz_String_Operations.ipynb
Created August 27, 2019 06:18
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@3liud
3liud / PY0101EN-1-2-Strings.ipynb
Created August 27, 2019 09:46
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@3liud
3liud / 2.1_notebook_quizz_list_tuplesv4.ipynb
Created August 28, 2019 08:28
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@3liud
3liud / PY0101EN-2-3-Sets.ipynb
Created August 28, 2019 08:47
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@3liud
3liud / PY0101EN-2-4-Dictionaries.ipynb
Created August 28, 2019 14:24
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@3liud
3liud / d9a27b0b-5222-4db5-8c7a-56d917ec9288.py
Created February 7, 2022 08:01
supervised_ml_applications0
# import libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression # Logistic regression
@3liud
3liud / f384fea7-3b3e-4de7-afa5-6d2ef5e7f50f.py
Created February 7, 2022 08:01
supervised_ml_applications1
# loading the dataset
df = pd.read_csv("diabetes.csv")
df.head()
@3liud
3liud / 189d0883-2145-41ae-b8e4-c35708166767.py
Created February 7, 2022 08:01
supervised_ml_applications2
#Have the outcome data as y
y = df.Outcome.values
# remove the Outcome data from the dataset and have the remaining as x
x_data = df.drop(['Outcome'], axis=1)
@3liud
3liud / 6e7c04f3-4721-4370-882f-2a63e2c2db8f.py
Created February 7, 2022 08:01
supervised_ml_applications3
lr = LogisticRegression()
lr.fit(x_train, y_train)
print("test accuracy {}".format(lr.score(x_test, y_test)))
lr_score=lr.score(x_test, y_test)