Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def _ _ init _ _ ( self ) : # Your code starts after this line # Your code ends before this line def

def __init__(self):
# Your code starts after this line
# Your code ends before this line
def train(self, data, column, values):
# Your code starts after this line
# Your code ends before this line
def predict(self):
# Your code starts after this line
# Your code ends before this line
import pandas as pd
data = pd.read_csv("data/da-week1.csv")
model1= model()
model1.train(data,'X',['A','B','C','D'])
print('Model 1 prediction: '+ model1.predict())
model2= model()
model2.train(data,'Y', range(1,11))
print('Model 2 prediction: '+str(model2.predict()))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions