Questions
I need this code to be written in Python: Given a dataset, D, which consists of...

I need this code to be written in Python:

Given a dataset, D, which consists of (x,y) pairs, and a list of cluster assignments, C, write a function centroids(D, C) that computes the new (x,y) centroid for each cluster. Your function should return a list of the new cluster centroids, with each centroid represented as a list of x, y:

def centroid(D, C):

In: Computer Science

The purpose of this lab is to become familiar with searching, inserting and deleting elements in...

The purpose of this lab is to become familiar with searching, inserting and deleting elements in a linked list.using java  

public boolean contains(String name) // returns true if provided name exists in the list, otherwise returns false public void add(String name) // adds name to the list in its proper lexographical (alphabetical) ordering public void delete(String name) // removes name from list

In: Computer Science

The data show the list and selling prices for several expensive homes. Find the regression​ equation,...

The data show the list and selling prices for several expensive homes. Find the regression equation, letting the the list price be the independent (x) variable. Find the best predicted selling price of a home having a list price of
$22
million. Is the result close to the actual selling price of
$2.22.2

million? Use a significance level of 0.05

list of price of millions of $- 1.6 4.2 2.1 1.6 2.3 4

selling price of millions of $ - 2 . 4.6 . 1.8 . 1.9 . 2.4 . 3.6

1. what is the regresstion equation? Y= __ +__x

2. if there is a linear equation use the regression equation as the predictor rounding to two decimal places

In: Statistics and Probability

You need to select three subjects from a list of 15 subjects: 01. Lorran 04. Sunny     ...

You need to select three subjects from a list of 15 subjects:

01. Lorran 04. Sunny      07. Jennifer

02. John 05. Caroline 08. Izzy

03. Mercedes     06. Matthew 09. Nicole

10. Natasha       11. Krissy          12. Muskan

13. Jacob           14. Autumn       15. Rachel

Use the numerical labels attached to the names and the following list of random digits to select three individuals. Read the list of random digits from left to right, starting at the beginning of the list.

44982 20751 27498 12009 45287 71753 98236 66419 84533 11793 20495 05907 11384

In: Statistics and Probability

Suppose that Mork and Mindy are walking together and reach a crossroad. Each one can turn...

Suppose that Mork and Mindy are walking together and reach a crossroad. Each one can turn right (R), turn left (L), or go straight (S). Consider observing the direction they choose. Assume that Mork is walking slightly in front of Mindy and makes his decision ?rst.
a. List all outcomes in the event B that both people go in the same direction. b. List all outcomes in the event C that at least one of the two turns left. c. List all outcomes in the event D that both people take di?erent directions. d. List outcomes in D', C ?B, and C ?D

In: Statistics and Probability

Task : (Please Answer in C#) Class Polynomials The class Polynomials is a collection of polynomials...

Task : (Please Answer in C#)

Class Polynomials

The class Polynomials is a collection of polynomials of either implementation stored in an instance of the generic library class List.

class Polynomials

{

private List L;

// Creates an empty list L of polynomials

public Polynomials ( )

{ … }

// Retrieves the polynomial stored at position i in L

public Polynomial Retrieve (int i)

{ … }

// Inserts polynomial p into L

public void Insert (Polynomial p)

{ … }

// Deletes the polynomial at index i

public void Delete (int i)

{ … }

// Returns the number of polynomials in L

public int Size ( )

{ … }

// Prints out the list of polynomials

public void Print ( )

{ … }

}

In: Computer Science

Consider the following definition of a doubly linked-list: class LinkedList{ public: LinkedList():head(0), tail(0){} ~LinkedList(); void reverse();...

Consider the following definition of a doubly linked-list:

class LinkedList{
        public:
                LinkedList():head(0), tail(0){}
                ~LinkedList();
                void reverse(); 
                //reverses the order of elements in the linked list
                void insert(int value);
        private:
            struct Node{
                        int data;
                        Node* next;
                        Node* prev;
                };
                Node* head;
                Node* tail;
                //Add your helper function here that recursively reverses the order of elements in the linked list


};

Write the declaration of a helper function in the class provided above that recursively reverses the order of elements in the linked list. This function will be used by the reverse() method. Then, write the implementation of both the reverse() method and the helper function.

In: Computer Science

C++ Linked Lists Practice your understanding of linked lists in C++ by creating a list of...

C++ Linked Lists

Practice your understanding of linked lists in C++ by creating a list of songs/artist pairs. Allow your user to add song / artist pairs to the list, remove songs (and associated artist) from the list and be sure to also write a function to print the list! Have fun!

Make sure you show your implementation of the use of vectors in this lab (You can use them too )

You MUST modularize your code ( meaning, there must be functions written for each piece of functionality that you write... at the very least: add(), delete(), print() and main() functions should be obvious.

Thanks!!

In: Computer Science

Python 3.7.4 Costume = {'label': str, 'price': int, 'sizes': [str]} ''' C5. Define a function `most_expensive_costume`...

Python 3.7.4

Costume = {'label': str, 'price': int, 'sizes': [str]}

''' C5. Define a function `most_expensive_costume` that consumes a list of costumes and produces a string representing the label of the costume with the highest price. In the event of a tie, give the label of the item later in the list. If there are no costumes, return the special value None. '''

''' C6. Define a function `find_last_medium` that consumes a list of costumes and produces the label of the last costume that is available in a medium. If no medium costumes are found, produce the special value `None`. '''

''' C7. Define a function `find_first_small` that consumes a list of costumes and produces the label of the first costume that is available in a small. If no small costumes are found, produce the special value `None`. '''

In: Computer Science

1. All social groups and families can be considered speech communities meaning they have their own...

1. All social groups and families can be considered speech communities meaning they have their own unique language. Reflect on the words you use in your groups of friends, coworkers, clubs, etc. and create a list of 15 WORDS that make up your own language. Discuss the origins of these words in your language and provide a definition for each of the words on the list. Internet, texting jargon, and acronyms can apply to this activity.

LIST of 15 WORDS:

2. Consider the following quote, “Meaning is in people not words.” Describe the words on your list and how they relate to this quote. What happens when you use these words in other groups?

In: Psychology