1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AURORKA [14]
3 years ago
13

Using the estimated regression model, what median house price is predicted for a tract in the Boston area that does not bound th

e Charles River, has a crime rate of 0.1, and where the average number of rooms per house is 6?
Computers and Technology
1 answer:
stepladder [879]3 years ago
8 0

Answer:

The predicted median house price "medv" is $20,775.

Explanation:

The python code below uses the python's scikit-learn package to program the housing model using multiple factor linear regression.

import pandas as pd

from sklearn.linear_model import LinearRegression

from sklearn.model_selection import train_test_split

df = pd.read_csv('Boston.csv')

df.head(10)

y = df[['medv']]

x = df[['crim', 'chas', 'rm']]

x_train, x_test, y_train, y_test = train_test_split(x, y, train_size=0.75, test_size=0.25, random_state=0)

regr = LinearRegression()

regr.fit(x_train, y_train)

print(regr.coef_)

result = (regr.predict([[0.1,0,6]])).tolist()

print(f"The mean price of house in boston with 6 rooms: {round(result[0][0], 2)}")

You might be interested in
What is a Network-layer routing technology that enables a group of workstations to share a single registered address?
Talja [164]
Your answer is:
Network Address Translation

I hope this helps! :)
4 0
3 years ago
File Sales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. It then
myrzilka [38]

Answer:

import java.util.Scanner;

public class Sales

{

public static void main(String[] args) {

   

    int sum;

    Scanner input = new Scanner(System.in);

   

    System.out.print("Enter number of salespeople: ");

    int salespeople = input.nextInt();

    int[] sales = new int[salespeople];

       

    for (int i=0; i<sales.length; i++)

    {

     System.out.print("Enter sales for salesperson " + (i+1) + ": ");

     sales[i] = input.nextInt();

    }

    System.out.println("\nSalesperson   Sales");

    System.out.println("--------------------");

    sum = 0;

       int maxSale = sales[0];

       int minSale  = sales[0];

       int minId=1;

       int maxId=1;

    for (int i=0; i<sales.length; i++)

    {

               System.out.println("     " + (i+1) + "         " + sales[i]);

 sum += sales[i];

  if(maxSale < sales[i])

           {

               maxSale = sales[i];

               maxId = i+1;

           }

           if(minSale > sales[i])

           {

               minSale = sales[i];

               minId = i+1;

           }

   }

System.out.println("Total sales: " + sum);

       System.out.println("The average sale is: " + sum / salespeople );

       System.out.println("Salesperson "+ maxId + " had the highest sale with "+ maxSale + ".");

       System.out.println("Salesperson "+ minId + " had the lowest sale with "+ minSale + ".");

       

       int amount = 0;

       int counter = 0;

       System.out.print("Enter an amount: ");

       amount = input.nextInt();

       for (int i=0; i<sales.length; i++)

    {

     if(sales[i] > amount) {

         counter++;

         System.out.println("Salesperson "+ (i+1) + " exceeded given amount. (Number of sales: " + sales[i] +")");

     }

    }

       System.out.println("Number of salespeople exceeded given amount is: "+ counter);

}

}

Explanation:

- Ask the user for the number of salesperson

- According to entered number, create an array called sales to hold sale number for each person

- In the first for loop, assign the given sales numbers

-  In the second for loop, print all the sales people with sales, calculate the total sales. Also, find the minimum and maximum sales numbers with associated individuals.

- Print total, average, highest, and lowest sales.

- Ask user enter an amount

- In the third for loop, find the sales people who exceeded this amount.

- Print number of sales people who exceeded the amount.

8 0
4 years ago
Is there a way I can put an already made sound that i created over an already made video
lys-0071 [83]
If you're using an apple product to do video editing, then iMovie is probably the best way to do that.

If you're on Windows and you're looking for a free video editing website, I'd suggest WeVideo. Although WeVideo does add watermarks to your videos, editing is pretty easy when using it.
6 0
4 years ago
Write a method named showChar. The method should accept two arguments: a reference to a String object and an integer. The intege
matrenka [14]

A complete program with the method ShowCar:

import java.util.Scanner; // header file

public class ShowChar

{

public static void main(String[] args)

{

String lnOfText;

int i;

Scanner input = new Scanner(System.in);

System.out.print("Enter a line of text:");

lnOfText = input.nextLine();

System.out.print(" Enter your index: ");

i = input.nextInt();

show_Char(lnOfText,i);

}

public static void show_Char(String str_a, int i)

{

System.out.print(str_a.charAt(i));

}

}

In this program, both the inputs ie. a sentence or line of text as well as the index position is obtained. A method is written to find the string at that particular position. Finally the method prints that character at the particular index.

5 0
3 years ago
Strengths and weaknesses about esport
grandymaker [24]

Answer:

you can practice and make money it can also do bad on your eyes ik cuz i do esports

Explanation:

8 0
3 years ago
Other questions:
  • "what do you perform when you want to recall specific records from a database"
    13·1 answer
  • Can embedded computers automate security so you can lock and unlock doors remotely
    15·1 answer
  • Pop3 allows users to fetch and download e-mails from a remote mailbox. does this mean that the internal format of the mailboxes
    14·1 answer
  • Anyone understand coding? Please Help! Thank you! :)
    8·1 answer
  • How to do this question , please answer quickly , I’ll give branliest
    14·1 answer
  • Create a class called StockTester that has the following fucntionality. a. Create a main method with an ArrayList named dataStoc
    9·1 answer
  • 1. As part of your community, your school, and your neighbourhood, how else does ICT have an impact on social
    11·1 answer
  • Which of the following terms means the computer operating system automatically detects and installs the proper driver for a new
    9·1 answer
  • I'll give u 16 points answer thisss
    12·1 answer
  • write the few lines of code that prompts the user to enter a series of exam scores, stopping when the user has entered an exam s
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!