Sunday, July 31, 2022

Friendship


Friendship is the most beautiful relation in the world. Friendship is peace, friendship does not have any restrictions of time and space. This relation can change with time, there may be some problems or differences between friends but at the end this relation lasts forever amid them.

 Friendship last for life. It is a kind of love that we can't predict the future,we do not know its end. But even when it ends, it will still leave countless memories. Friendship is like a glass vase: easy to break but hard to mend. 

 Friendship doesn't only last for teen. Friendship is a value, who you want to share your life with and you can see it as a part of your family. As a friend brings people closer together, we are still love our friends after they grow up.

 Friendship Lasts shows how friendship changes with time, and that even though friends can drift apart over time, they still remain friends. Starting off with friends who were very close at the beginning of the book, they slowly grew farther and farther apart. The only thing that kept them together was the little red ball of yarn they were both holding on to tightly.

 Attitude changes with time.Friend's importance changes with age, from each others stand point.Friendship does not change with time and it's always trust, care and sincerity that prevailed in the life of friends for their friendship to last forever!

 It’s the people in your life who know you best and love you most, through all of life’s ups and downs. As our relationships change over time, it is important to nurture their growth.

  Some people come into your life and quickly go. Some stay for a while, leave footprints on your heart, and you are changed forever.  They work their way into your heart and become friends who last forever.

 Friendship doesn't need great deeds and big words, but it needs a small amount of consistency. Friendship is more than just those big things that you do for your friends; it's the small daily acts of caring and attention that make the difference between simply liking someone and being a true friend.









Monday, April 11, 2022

linear regression techniques on the Boston house pricing dataset

Implement multiple linear regression techniques on the Boston house pricing dataset using Scikit-learn.







Linear Regression Gradient descent method

Implement multiple linear regression techniques on the Boston house pricing dataset using Scikit-learn.



import matplotlib.pyplot as plt
import numpy as np
import pandas
url = “https://raw.githubusercontent.com/jbrownlee/Datasets/master/iris.csv"
names = [‘sepal-length’, ‘sepal-width’, ‘petal-length’,’petal- width’, ‘class’]
dataset = pandas.read_csv(url, names = names)
X, Y = dataset[‘petal-length’], dataset[‘petal- width’]
plt.scatter(X, Y)
plt.title(‘Scatter plot’)
plt.xlabel(‘petal length’)
plt.ylabel(‘petal width’)
plt.show()
# Building the model
t0 = 0
t1 = 0
L = 0.001 # The learning Rate (ALPHA in lecture notes)
epochs = 500 # The number of iterations to perform gradient descent

m = len(X) # Number of examples in X
cost_list = []
# Performing Gradient Descent
for i in range(epochs):
Y_pred = t1*X + t0 # The current predicted value of Y
D_t1 = (-1/m) * sum(X * (Y — Y_pred)) # Derivative term wrt t1
D_t0 = (-1/m) * sum(Y — Y_pred) # Derivative term wrt t0
t1 = t1 — L * D_t1 # Update t1
t0 = t0 — L * D_t0 # Update t0
cost= (1/2*m) * sum(Y-Y_pred)**2
cost_list.append(cost)
print (t1, t0)
Y_pred = t1*X + t0
plt.scatter(X, Y)
plt.plot([min(X), max(X)], [min(Y_pred), max(Y_pred)], color=’red’) #regression line
plt.show()

Output:

plt.plot(list(range(epochs)), cost_list, ‘-r’) #plot the cost function.












Logistic Regression

 

Apply the Logistic Regression on ‘weather.csv’ database.












Implement KNN

 

Implement KNN on any data set and choose different values of K to see how it impacts the accuracy of the predictions.












Linear Discriminant Analysis in Python

Linear Discriminant Analysis and comparison with Principle component Analysis in python










Quadratic Discriminant Analysis in PYTHON

Implement QDA on any dataset and explain with comments. Each student should implement on different dataset.


Dataset: Breast cancer






Friendship

Friendship is the most beautiful relation in the world. Friendship is peace, friendship does not have any restrictions of time and space. Th...