

I need a code written on PYTHON LANGUAGE, you can use any class in scikit. Below, you can see the "Movie Rate.txt" provided. Can you solve this question? I will give thumbs up

**I HAVE ANSWER THE QUESTION FIRST AND THEN GIVE THE CODE. IF YOU DON'T NEED THE CODE YOU CAN SKIP IT.
1. It is a regression problem because we have to predict the movie rating which can be in range 0-5 and in any fractional value.
2. Learned parameters
[-0.88396343 -3.3650339 -0.12833597 -2.67356581]
3.
Rating prediction for M2: 1.97688151
Rating prediction for M7: 1.39717038
Rating prediction for M11: 3.9678044
PYTHON CODE:
#import libaries
import pandas as pd
from sklearn import linear_model
#load the data into datframe
df = pd.read_csv('Movie Rate.txt',sep='\t',header=None)
print(df)
#row 2 7 11 has the rating value ?
#except these all are the train set
train_set = df.drop([2,7,11])
#we have to preicct the rating
#i.e column 0 it is Y
Y_train = train_set.iloc[:,0]
#other rows are X
X_train = train_set.iloc[:,1:5]
X_train
#row 2 7 11 has the rating value ?
#thse are test value we have to predict
test_set = df.iloc[[2,7,11],:]
X_test = test_set.iloc[:,1:5]
#No Y_test we have to predict it
#simple linear regression model
reg = linear_model.LinearRegression()
reg.fit(X_train,Y_train)
#learnt paramenters
print(reg.coef_)
#predction for M2,M7,M11
Y_pred = reg.predict(X_test)
print(Y_pred)
![File Edit View Insert Cell Kernel Help Trusted Python 3 Run + e Code In [82]: #import Libaries import pandas as pd from sklea](http://img.homeworklib.com/questions/6e539cf0-30e4-11eb-bb57-f942f84e0814.png?x-oss-process=image/resize,w_560)
*IF YOU GET ANY ERROR READING THE FILE PLEASE INSERT A TAB BETWEEN THE DATA IN Movie Rate.txt FILE
I need a code written on PYTHON LANGUAGE, you can use any class in scikit. Below,...
USE Python 2.7(screen shot code with indentation and output exactly in the question) the task is: takes in a list of protein sequences as input and finds all the transmembrane domains and returns them in a list for each sequence in the list with given nonpolar regions and returns the lists for those. 1. This code should call two other functions that you write: regionProteinFind takes in a protein sequence and should return a list of 10 amino acid windows,...
I'm
trying to solve this differential equations by using matlab and
I've got a plot from the code attached. But I wanna get a plot of
completely sinusoidal form. If I can magnify the plot and expand
x-axis, maybe we can get the sinusoidal form. So help me with this
problem by using matlab. Example is attached in below. One is the
plot from this code and another is example.
function second_order_ode2
t=[0:0.001:1];
initial_x=0;
initial_dxdt=0;
[t,x]=ode45(@rhs,t,[initial_x initial_dxdt]);
plot(t,x(:,1))
xlabel('t')
ylabel('x')...
I'm
trying to solve this differential equations by using matlab and
I've got a plot from the code attached. But I wanna get a plot of
completely sinusoidal form. If I can magnify the plot and expand
x-axis, maybe we can get the sinusoidal form. So help me with this
problem by using matlab. Example is attached in below. One is the
plot from this code and another is example.
function second_order_ode2
t=[0:0.001:1];
initial_x=0;
initial_dxdt=0;
[t,x]=ode45(@rhs,t,[initial_x initial_dxdt]);
plot(t,x(:,1))
xlabel('t')
ylabel('x')...
can you guys PLEASE help me!!! i only have 40 min!! THANK YOU QUESTION 1 Consider the hospital emergency room data from the table. Let A denote the event that a visit is to hospital 1 and let B denote the event that a patient is admitted to hospital 1. Determine P (B | A)? Hospital 1 2 3 4 Total Total 5250 6877 5658 4301 22086 LWBS 187 255 249 246 937 Admitted 1239 1513 682 940 4374 Not admitted...
The number of successes and the sample size for a simple random sample from a population are given below. X=7, n=28, Hop=0.2, H. p> 0.2, a=0.05 a. Determine the sample proportion b. Decide whether using the one proportion z-test is appropriate. c. If appropriate, use the one proportion z-test to perform the specified hypothesis test. Click here to view a table of areas under the standard normal curve for negative values of z. Click here to view a table of...
Question 3 (9 marks) Consider the following information about a non-dividend paying stock: The current stock price is $36, and its return standard deviation is 30% per year. The continuous compound risk-free rate is 3% per year. Assume that the Black-Scholes model correctly prices all the options written on the stock given the information above. a). A call option written on the stock expires in 1 year and has an exercise price of $36. Calculate the Black-Scholes value of the...
Please give detailed explanation how you got answers.
Thank you in advance.
Z table is included. please show steps how to derive
to answer. Thank you, experts.
4. Find the following probabilities based on the standard normal variable Z. (You may find reference the z table. Round your answers to 4 decimal places.) 3.33 Doints 0.7881 0.0096 a. P(Z >08) b. PIZ-2.34) C. POSZ $ 1.57) d. P(-0.73SZ S2.81) eBook References MC Graw Hill < Prey Enfrey Next > Type...
I believe 0.0587 is the answer but i want to be sure! thank
you
Let x be a continuous random variable with a standard normal distribution. Using the accompanying standard normal distribution table, find P(1.34 SXS 1.86). Click the icon to view the standard normal distribution table. Areas for a Standard Normal Distribution P(1.34 SXS 1.86) = 0.0587 (Round to four decimal places as needed.) Entries in the table represent area under the curve between z= 0 and a positive...
I
need solution thank you!
you can use these tables and formulas.
2. The heights for 5 year boys are normally distributed with a mean height of 43 inches and a standard deviation of 5.3 inches. A sample of 60 boys is randomly selected. Find (a) (8 points) The probability that mean height of boys for the sample of 60 boys is between 41 inches and 45 inches. (b) (5 points) The height of a boy that corresponds to the...
please do 1 through 4. Thank you.
0 1. Fe 1.SCN Procedure B: 1. Prepare ICE tables for beakers 2 - 6 using the example below as a guideline (you will have 5 different ICE tables). Table 3. Sample "ICE" table. Fe(aq)*3 + SCN(aq) = FeSCN2 Initial: **M calculated **M calculated using your Table 2 using your Table 2 volumes volumes Change: - 1x - 1x Equilibrium: M 1x 1x = concentration calculated from Procedure A slope-intercept equation +1x M...