project 2

 

Reproduce the results in the Python ML Tutorial, but using the following changes:

  1. Linear regression: y = 5*sin(2*pi*t/8 + pi/9); where t = 100 values between 1 and 2
  2. Logistic regression: 4 classes
    • class 1: centered at (2,2), std deviation = 2
    • class 2: centered at (10,10), std deviation = 3
    • class 3: centered at (2,10), std deviation = 5
    • class 4: centered at (10,5), std deviation = 3

3.  For binary logistic regression use class 1 and 2

4.  For k-binary and softmax use all classes

Code to modify:

import numpy as np

import matplotlib.pyplot as plt

a=10

b=90

x = (b-a)* np.random.random((100, 1)) + a

noise = 10*np.random.normal(size=x.shape)

slope = 2.5

y_int = 3.25

y = slope*x + y_int + noise

plt.scatter(x,y)

plt.plot(np.linspace(0,100,100),3.25+2.5*np.linspace(0,100,100),’r–‘) #true y for comparison

plt.xlabel(‘x’)

plt.ylabel(‘y’)

plt.show

m = len(x)

w = 10*np.random.random((2,1))

alpha = 0.0001

itera = 1000

dJdw0 = 1

dJdw1 = x

for i in range(itera):

y_hat = w[0] + w[1]*x

error = y_hat-y

J = np.sum(error**2)/(2*m)

w[0] = w[0] – alpha/m*np.sum(error*dJdw0)

w[1] = w[1] – alpha/m*np.sum(error*dJdw1)

print(“iteration: %4d cost: %10.2f alpha: %10.8f w0: %10.2f w1: %10.2f” %(i, J, alpha, w[0], w[1]))

print(“cost: %10.2f alpha: %10.8f w0: %10.2f w1: %10.2f” %(J, alpha, w[0], w[1]))

plt.scatter(x,y)

plt.plot(x,y_hat)

plt.plot(np.linspace(0,100,100),3.25+2.5*np.linspace(0,100,100),’r–‘)

plt.show

X = np.ones((len(x),2))

X[:,1]=list(x)

Y = y

W = np.dot(np.dot(np.linalg.inv(np.dot(X.T,X)),X.T),Y)

print(W)

X = x.reshape(100,)

Y = y.reshape(100,)

W=np.polyfit(X,Y,1)

print(W)

order = 3

X=np.zeros((len(x),order+1))

for i in range(order+1):

X[:,i]=list(x**i)

W = np.dot(np.dot(np.linalg.inv(np.dot(X.T,X)),X.T),Y)

print(W)

plt.scatter(x,y)

xs = x

xs.sort(axis=0)

X=np.zeros((len(x),order+1))

for i in range(order+1):

X[:,i]=list(xs**i)

W = W.reshape(4,1)

y_hat=np.dot(X,W)

plt.plot(x,y_hat)

plt.show

x11 = np.random.normal(10, 2, 20).reshape(20,1)

x21 = np.random.normal(5, 2, 20).reshape(20,1)

x12 = np.random.normal(5, 3, 20).reshape(20,1)

x22 = np.random.normal(10, 3, 20).reshape(20,1)

X1 = np.hstack((np.ones((20,1)),x11,x21))

X2 = np.hstack((np.ones((20,1)),x12,x22))

X = np.vstack ((X1,X2))

Y = np.vstack ((np.ones((20,1)), np.zeros((20,1))))

plt.plot(x11,x21,’ro’,x12,x22,’bo’)

plt.show

alpha = 0.01

itera = 10000

m = Y.shape[0]

W = np.random.random((3,1))

for i in range(itera):

Z = np.dot(X, W)

H = 1 / (1 + np.exp(-Z))

L = -np.sum(Y*np.log(H)+ (1-Y)*np.log(1-H))

dW = np.dot(X.T, (H – Y)) / m

W = W – alpha*dW

y1 = np.array([np.min(X),np.max(X)])

y2 = -((W[0,0] + W[1,0]*y1)/W[2,0])

plt.plot(x11,x21,’ro’,x12,x22,’bo’)

plt.plot(y1,y2,’–‘)

plt.show

x13 = np.random.normal(10, 2, 20).reshape(20,1)

x23 = np.random.normal(15, 3, 20).reshape(20,1)

X3 =np.hstack([np.ones((20,1)),x13,x23])

X = np.vstack((X1,X2,X3))

plt.plot(x11,x21,’ro’,x12,x22,’bo’,x13,x23,’go’)

plt.show

classes = 3

alpha = 0.01

itera = 10000

for c in range(classes):

Y = np.zeros((60,1))

a = 20*c

b = 20*(c+1)

Y[a:b,:]=np.ones((20,1))

W = np.random.random((3,1))

m = Y.shape[0]

for i in range(itera):

Z = np.dot(X, W)

H = 1 / (1 + np.exp(-Z))

L = -np.sum(Y*np.log(H)+(1-Y)*np.log(1-H))

dW = np.dot(X.T, (H – Y)) / m

W = W – alpha*dW

y1 = np.array([np.min(X[:,1]),np.max(X[:,1])])

y2 = -((W[0,0] + W[1,0]*y1)/W[2,0])

plt.plot(X[:,1],X[:,2],’go’,X[a:b,1],X[a:b,2],’ro’)

plt.plot(y1,y2,’–‘)

plt.show

plt.figure()

x11 = np.random.normal(10, 2, 20).reshape(20,1)

x21 = np.random.normal(5, 2, 20).reshape(20,1)

x12 = np.random.normal(5, 3, 20).reshape(20,1)

x22 = np.random.normal(10, 3, 20).reshape(20,1)

x13 = np.random.normal(10, 2, 20).reshape(20,1)

x23 = np.random.normal(15, 3, 20).reshape(20,1)

X1 = np.hstack((x11,x21))

X2 = np.hstack((x12,x22))

X3 = np.hstack((x13,x23))

X = np.vstack ((X1,X2,X3))

Y = np.vstack ((np.zeros((20,1)),np.ones((20,1)),2*np.ones((20,1))))

from sklearn.linear_model import LogisticRegression

softmax_reg = LogisticRegression(multi_class=”multinomial”,solver=”lbfgs”, C=10)

logreg = softmax_reg.fit(X, Y.reshape(60,))

logreg.fit(X, Y.reshape(60,))

x_min, x_max = X[:, 0].min() – .5, X[:, 0].max() + .5

y_min, y_max = X[:, 1].min() – .5, X[:, 1].max() + .5

h = .02 # step size in the mesh

xx, yy = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_max, h))

Z = logreg.predict(np.c_[xx.ravel(), yy.ravel()])

Z = Z.reshape(xx.shape)

plt.figure(1, figsize=(4, 3))

plt.pcolormesh(xx, yy, Z, cmap=plt.cm.Paired)

plt.plot(X[0:20, 0], X[0:20, 1],’ro’,X[20:40, 0], X[20:40, 1],’bo’,X[40:60, 0], X[40:60, 1],’go’)

plt.show()

Web app development task:2 and task:3

Task 2- Background Research: Review at least ten websites promoting businesses that are similar to your case study. Reflect on the design, usability, features (functionality), accessibility, and legal requirements of these websites.

Present a summary of your analysis and a summarised tabular list of the websites you visited. (L.O.1. and L.0.7, 700 words, 10%)Task 3- Web Planning: Using a defined approach to modelling, present a plan for your website to include design, usability, functionality, and accessibility

features. Your plans should separate the design specification from the content.

Make your web technologies recommendations, choice of URL, service provider, and method of implementation. (L.O. 1. and L.0.2., 700 words, 20%).

Python,R

M2 assign 1

1. Show the variation of goals (sum and average)  with respect to funding status as shown in the lecture video.

2. Show the variation of number of donors (sum and average) with respect to funding status as shown in lecture video. Also include school state as filter.

3. Create a dashboard including above charts.

Submit one document with screenshots of each of the above visualizations. Also, submit your Tableau file.

M3 assign 1

1. Create a pandas data-frame with columns: (1) Project_ID; (2) School_city; (3) Goal; (4) num_donors. (2 points)

2. Show mean values of Goal and num_donors for each school_city using groupby() function. (2 points)

3. Present descriptive statistics for the data-frame. using describe() function. (2 points)

4. Create another data-frame from Crowdfunding_data_1000_projects.xlsx with columns: (1) Project_ID ; (2) school_state, and merge with data-frame from step (1). (2 points)

5. Using the merged data-frame from step (4), select rows where school_state is MO and num_donors>1. (2 points)

Upload one Jupyter Notebook file in submission.

article review

  Please read chapter 8 and 9 and discover that the material covering motivation was interesting to you given your current situation at work (or a past employer). You would then look for an article that sheds light on your interest in this topic. 

I need 2 pages with references and citations 

Please copy this and paste it in google there go through link which is the text book I will put a screenshot to identify the link

  “An Introduction to Organizational Behavior – Table of Contents (lardbucket.org)” 

Write an iOS app to calculate the BMI of the user.

Write an iOS app to calculate the BMI of the user. 

• The app should allow the user to type their name in a text field.

 • The app should allow the user to use two sliders to enter their height and weight.

 • The app should have a button. 

Once the user taps the button, the BMI should be displayed in a message box. The message box should contain the user’s name and their BMI. 

The equation to compute BMI is: BMI = (Weight in kg) / (Height in meter) 2 The sample app is shown in the pictures below. In this sample app, cm and kg are used. 

You may use meter, foot/inch, pound as you like. 

Government's Role with the internet

 Government’s Role with the internet

Term Paper Outline Example:

  • Title Page: Create a page separate from the rest of the paper, including the title of the paper, your name, institution name, the course name/section, the instructor’s name, and the date.
  • Table of Content: Optional but preferred
  • Introduction: this is the overall purpose or term paper statement. It is used to acquaint anyone reading the paper with the argument being explored.
  • Body: This section is typically divided into multiple headings and subheadings, each linked with various components of the topic.
    • Heading One: History of the argument
    • Heading Two: Extent of the problem being explored
    • Heading Three: Effects of the problem being explored
    • Heading Four: Potential solutions
  • Conclusion: Summary of all of the points made and a response to the term paper statement
  • Reference List: Must follow APA 7th Format, and that includes in-text citations.

Term Paper: You are to write an ethics term paper on a selected topic approved by your instructor. The list of ethics topics with instructions and due date is located on the Left Hand Menu (under Term Paper). You are to notify the instructor of your topic choices (via myLeo email – using correct email protocol) by Sunday, February 14, 2021. This term paper will represent 20% of your total grade.  The term paper must be no less than 2000(NOT INCLUDE TITLE PAGE, TABLE OF CONTENT, and REFERENCES) words, double spaced, APA Format, and Time New Roman 12 Font.

This course has been designated as a Global Course, which has the following QEP Student Learning Outcomes. The Term Paper will be used to evaluate these learning outcomes.

To meet this requirement, you must place this term paper in your ePortfolio in Mane Sync. A screenshot must be attached to your term paper that you submit for grading to prove that the paper was placed in your ePortfolio. Directions for using the ePortfolio can be located at the following URL: http://www.tamuc.edu/aboutUs/ier/QualityEnhancementPlan/documents/GlobalFellowe PortfolioGuide.pdf

 

  1.  Demonstrate knowledge of the interconnectedness of global dynamics (issues, processes, trends, and systems). (QEP LO1)
  2.  View yourself as engaged citizens within an interconnected and diverse world. (QEP LO3)

IT476 week 1

Dear Students,
After you review Chapter 1 in your textbook and review all course materials in Module 1, please answer the following two questions:

Assignment Question :

1A)- What is the difference between a database and a DBMS?
1B) – What is data, metadata, and information? What are the differences?

2- Go to: https://www.niche.com/k12/search/best-public-elementary-schools/s/virginia/
Convert the school data found on this page into a row-column format (click on the link below for hints)

Hint: Link

Project 1: Vulnerability and Threat Assessment Step 6: Prioritize Threats and Vulnerabilities

 

Now that you have explained and classified the threats and vulnerabilities, you will prioritize them using a reasonable approach as explained in the project plan. As you prioritize the identified threats and vulnerabilities, you will need to:

Use this information, along with the threat and vulnerability explanations and risk classifications from the previous steps, to develop the threats and vulnerabilities report.

Compose a two- to three-page report regarding specific threats and vulnerabilities of the technical aspects of the environment. This report will be used in the final vulnerability and threat assessment report.

IT470 week 6

Week 6 discussion topic

Discuss the following…

A) What current dedicated networks are there? Does anyone know how much it cost?

B) Can someone search when to use ring, mesh, star (pick one)? when to use what?

Feel free to show diagrams or videos or animation to help others understand.