R studio network analysis and classification

  

Task steps:

1. Create an author-to-author tweet edge file from the original data set, stocktwit_graph_input.csv.

Create an edge file from the original data set, stocktwit_graph_input.csv. We just need two columns – source (Vertex 1) and target (Vertex 2) of an edge to create a graph. Select all rows – tweets for columns K- “from_person” and M – “to_person” (or J and L for numerical author IDs) and save it as “stocktwit_from_to” or another name you prefer. 

2. Use Gephi to generate and save author (node) metrics. Select the metrics you like to explore and use for building models later. Include at least 5 different metrics. Save the metrics in a file named as stocktwit_node_yourname.csv. Submit this file. Include answers to the following questions in HW6_yourname.doc for submission.

a. Which three authors have the highest betweenness centrality? 

b. Which three authors have the highest total degree? 

c. Which three authors have the highest closeness?

3. Build the Node Table for Prediction

(1). Open the stocktwit_node.csv file in Excel, and create a new variable: Expert (i.e. suggested). It is the target variables we aim to classify or predict.

(2). Do not close the stocktwit_node.csv file. Open the stocktwit_graph_input.csv file. And then go to the stocktwit_node.csv.

(3). Note that the unit in the stocktwit_node.csv file is a node (i.e. each individual author) and the unit in the stocktwit_graph_input.csv file is a tweet (i.e. each message). So, in order to transfer the value of expert from the table of stocktwit_graph_input to the stocktwit_node table, we need to do data transformation.

To Expert, we need to assign one value to one author (i.e. whether they are expert or not – 1 stands for yes; 0 stands for no.).

Use the VLOOKUP function to assign the value of “suggested” from the table of stocktwit_graph_input to the column, “Expert”, in stocktwit_node table. The function for the first row should be like this:

= VLOOKUP(A2, stocktwit_graph_input.csv!$K$1:$AB$38200,18,FALSE),

where “A2” is the node name; “stocktwit_graph_input.csv!$K$1:$AB$38200” is the table range we look up; 18 is the column number from the table range that we aim to return the value, “FALSE” stands for an exact match of the value.

(4). Save the stocktwit_node.csv file. BTW, you can delete those rows who have missing value in Expert, because these nodes only appear in the “to_person” column, they do not have tweets.

Use filter function in excel to remove the #NAs.

4. In R, build and evaluate a classification model that uses the metrics in stocktwit_node_yourname.csv from step 2 as features to classify authors into “expert” stocktwit author (i.e., “suggested”=1)” or not (“suggested”=0) which is the target label variable. 

(1). Using a seed of 100, randomly select 60% of the rows into training (e.g. called traindata). Divide the other 40% of the rows evenly into two holdout test/validation sets (e.g., called testdata1 and testdata2).

(2). Build the tree using the C50 function with default settings.

(3). Generate predictions (i.e. estimations) of the values of the target variable for the testing instances.

Generate a confusion matrix that shows the counts of true-positive, true-negative, false-positive and false-negative predictions for both testdata1 and testdata2. Consider 1 as positive class.

Generate seven performance metrics – Accuracy (percent of all correctly classified testing instances), and precision (percent of instances predicted to have a class are accurate), recall (also true positive) and F-measure (also F-score) of the two classes of expert. 

(4). Would you recommend using the features from network analysis to identify experts in the Stocktwit community? Why or why not? Include answers to the following questions in HW6_yourname.doc for submission.

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Paper Helper has assembled a team of highly skilled writers with diverse experience in the online writing circles. Our aim is to become a one stop shop for all your Academic/ online writing. Check out below our amazing service!

Essays

Essay Writing Services

At Paper Helper, we prioritize on all aspects that creates a good grade such as impeccable grammar, proper structure, zero-plagiarism, and conformance to guidelines. The principal purpose of essay writing is to present the author's evaluation concerning a singular subject about which they have made. Since Professionalism is the mother of every success, try our team of experienced writers in helping you complete your essays and other assignments.

Admissions

Admission Papers

You have been trying to join that prestigious institution you long yearned for, but the hurdle of an admission essay has become a stumbling block. We have your back, with our proven team that has gained invaluable experience over time, your chance of joining that institution is now! Just let us work on that essay.How do you write an admission essay? How do you begin the essay? For answers, try Quality Custom Writers Now!

Editing

Editing and Proofreading

Regardless of whether you're pleased with your composing abilities, it's never an impractical notion to have a second eye go through your work. The best editing services leaves no mistake untouched. We recognize the stuff needed to polish up a writing; as a component of our editing and proofreading, we'll change and refine your write up to guarantee it's amazing, and blunder free. Our group of expert editors will examine your work, giving an impeccable touch of English while ensuring your punctuation and sentence structures are top-notch.

Coursework

Technical papers

We pride ourselves in having a team of clinical writers. The stringent and rigorous vetting process ensures that only the best persons for job. We hire qualified PhD and MA writers only. We equally offer our team of writers bonuses and incentives to motivate their working spirit in terms of delivering original, unique, and informative content. They are our resources drawn from diverse fields. Therefore your technical paper is in the right hands. Every paper is assessed and only the writers with the technical know-how in that field get to work on it.

Coursework

College Essay Writing

If all along you have been looking for a trustworthy college essay service provider that provides superb academic papers at reasonable prices, then be glad that you search has ended with us. We are your best choice! Get high-quality college essay writing from our magnificent team of knowledgeable and dedicated writers right now!

Coursework

Quality Assignment/Homework Help

We give the students premium quality assignments, without alarming them with plagiarism and referencing issues. We ensure that the assignments stick to the rules given by the tutors. We are specific about the deadlines you give us. We assure you that you will get your papers well in advance, knowing that you will review and return it if there are any changes, which should be incorporated.