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 to Expert-Tailored 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

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Understand the various phases of integration

Answered: 1 week ago

Question

Define and discuss the nature of communication

Answered: 1 week ago

Question

Define and discuss the nature of culture

Answered: 1 week ago