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.

US Custom Writers
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

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

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.