[Tutor] Tutor Digest, Vol 196, Issue 1

Nihal shivakumar nihal.shiva007 at gmail.com
Fri Jun 5 02:39:37 EDT 2020


Use website coursera
Make account and learn audit the courses
Learn from many university and google as well

On Wed 3 Jun, 2020, 4:42 AM , <tutor-request at python.org> wrote:

> Send Tutor mailing list submissions to
>         tutor at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://mail.python.org/mailman/listinfo/tutor
> or, via email, send a message with subject or body 'help' to
>         tutor-request at python.org
>
> You can reach the person managing the list at
>         tutor-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Tutor digest..."
> Today's Topics:
>
>    1. Python Networkx with file in gexf format (Daniel Wobmann)
>    2. Practice websites (Divya)
>    3. Re: Practice websites (Alan Gauld)
>    4. Named tuple special methods and attributes start with an
>       underscore? (boB Stepp)
>
>
>
> ---------- Forwarded message ----------
> From: Daniel Wobmann <d_wobmann at hotmail.com>
> To: "tutor at python.org" <tutor at python.org>
> Cc:
> Bcc:
> Date: Tue, 2 Jun 2020 18:38:36 +0000
> Subject: [Tutor] Python Networkx with file in gexf format
> Hello everybody,
>
> I'm doing a continuing education, with Python being a relatively large
> part of it. With my basic knowledge I have practically no chance -
> especially for the project work, which we have to deliver on June 20, 2020.
> We are not allowed to use Gephi. Everything must be analyzed and derived in
> Python. So I am dependent on help and thank you for every support, no
> matter how small.
>
> I have a dataset in gexf format about the nodes "students" (student-ID)
> and "teachers" (teacher-ID), where each node belongs to a school class and
> has a corresponding gender; for teachers no gender is given. There are 10
> school classes, e.g. 1A, 2B, etc.
> The edges connect the pupil-ID by means of "Origin" and "Destination". The
> edges are all of the type "Undirected" and weight "1". The "duration" is
> the duration of all interactions between the nodes (origin and
> destination); "count" is the number of times the origin and destination
> have joined together to form an interaction. I have attached the dataset to
> you.
>
> If someone can help me with this, I would send him/her the dataset by
> mail. And of course I would pay something for the work.
>
> So far I have managed to get the system to tell me how many nodes and
> edges there are and what the average degree per node is. That was it.
>
> Now I wish to read out various information from this dataset with Python
> and the package networkx - and above all to display it graphically. This
> causes me many difficulties, because in python I want to work with the
> nodes / edges in the gexf document; but also with the values per item - for
> example with the value of an ID of a student or with a class name. For this
> I want to use "networkx". And these are my questions:
>
> 1. how can I find out from which data type a feature is? How can I convert
> the datatype of a feature for example from String to Int (preprocessing
> engineering)?
>
> 2. how can I calculate the number of edges per node (1 origin and how many
> targets?)? I think this is called "degree", I have seen. What does this
> code look like? So I want to know how many connections (edges) the node
> 1551 has to other nodes, for example how many connections the student 1551
> has to other students to other students (and teachers). How can I list them
> per node? What does the code for this look like?
> For example, how can I calculate the sum of "counts" or "duration" per
> student ID? How can I use the result of the number of nodes per Student ID
> to divide them, for example to calculate the average duration?
>
> 4. develop and display the graph for the whole dataset What does the code
> for this look like?
>
> 5. how can I display graphs, i.e. connections and nodes of a single school
> class (clusters?), single nodes (students) of the same class, etc. with
> different colors? What does the code for this look like?
>
> 6. subgraphs: Are they parts of a whole graph, as I understood it, or? How
> can I display them for example for between two, three classes, ten students
> per class, for students and teachers together, etc.? Or for example for the
> connections within a class? What does the code for this look like?
>
> 7. are subgraphs also called "subgroups" and "clusters"? What does the
> code for this look like so that I can graphically represent such
> properties? What do I concentrate on in the dataset? For example items?
> values?
>
> 8 How can I determine whether or which student is an "influencer" in the
> class and which student is not an influencer at all? And which pupil is the
> "influencer" between school classes? Which are the "inluencers" between
> school classes? What does the code for this look like?
>
> 9. how can I remove items. For example, because they represent an outlier?
> Or simply remove all those items whose "count" is below 10, for example?
> What does the code for this look like?
>
> 10. weight: I have read a lot about it, but I have not been able to figure
> out what it is and what purpose it serves. What does this tell me? What can
> I do with it? How can I change this weight? Why is the weight adjusted in
> different ways, i.e. for certain connections the weight is often set to 2,
> for others to 3, etc. And above all: Why should I change a weight, i.e.
> what could be the intention? What would this mean for "my" dataset? Between
> all origins and destinations, in our case there is weight 1. Why should I
> change it?
> Why should it make sense to change weights? In which case would I do this
> and why? What is the code for changing the weight?
>
> 11. How to calculate the following? For example, is this calculated per
> student or even per cluster (e.g. school class)? Or for which properties is
> this calculated?
> - Degree Centrality
> - Betweenness-Zentralität)
> - Closeness Central Office
> - Prestige Indegree
> - Ego Network
>
> 12. Link Predictions? I heard that there are ways to use different models
> (or algorithms?) to predict what other possible connections between nodes
> or the students (in our case) might look like. For example Jaccard, Common
> Neighbours, Preferential Attachment, Resource Allocation, etc. What does
> the code for these look like?
>
> I am looking forward to your feedback. Thank you very much and best regards
>
> Daniel Wobmann
>
>
>
>
>
>
>
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Divya <dvsree123 at gmail.com>
> To: tutor at python.org
> Cc:
> Bcc:
> Date: Tue, 2 Jun 2020 16:40:56 +0530
> Subject: [Tutor] Practice websites
> Please suggest me some websites where I can practice the very basics like
> functions, expressions etc..
>
>
>
>
> ---------- Forwarded message ----------
> From: Alan Gauld <alan.gauld at yahoo.co.uk>
> To: tutor at python.org
> Cc:
> Bcc:
> Date: Wed, 3 Jun 2020 00:00:05 +0100
> Subject: Re: [Tutor] Practice websites
> On 02/06/2020 12:10, Divya wrote:
> > Please suggest me some websites where I can practice the very basics like
> > functions, expressions etc..
>
>
> I'm not sure what you are looking for.
>
> There are a couple of web sites with virtual Python interpreters
> where you can type basic Python code and it will execute it
> for you. If that's what you want here is one I found. I
> don't use this service so can't say how good it is but it
> seems to handle print("hello") ok...!
>
> https://repl.it/languages/Python3
>
> But most folks find it easier to download Python to their PC
> (Or tablet) and use it offline. Especially if you want to process
> local data or manipulate you machine in some way.
>
> If on the other hand you are looking for tutorial information there
> is a whole page for beginners (one each both non-programmers and
> existing programmers in other languages). (Or you can try
> mine - see the link in my .sig
>
> Finally, if you want projects or exercises there are some sites
> that do that too - I think coursera has some. And the Python
> Challenge website is an interesting way to learn new tricks
> with Python.
>
> I hope that helps, if not you need to be a bit more specific
> about what you are after.
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
>
>
>
>
>
>
> ---------- Forwarded message ----------
> From: boB Stepp <robertvstepp at gmail.com>
> To: tutor at python.org
> Cc:
> Bcc:
> Date: Tue, 2 Jun 2020 18:12:04 -0500
> Subject: [Tutor] Named tuple special methods and attributes start with an
> underscore?
> I was reading an article on the collections library
> (
> https://davidmuller.github.io/posts/2020/05/08/collections-module-Python3.html
> ).
> In it it had the following note:  "In Python, methods with leading
> underscores are usually considered “private.” Additional methods provided
> by namedtuple (like _asdict(), ._make(), ._replace(), etc.), however, are
> public."  This greatly surprised me.  So I went to the Python docs
> (https://docs.python.org/3/library/collections.html#collections.namedtuple
> )
> and found:  "In addition to the methods inherited from tuples, named tuples
> support three additional methods and two attributes. To prevent conflicts
> with field names, the method and attribute names start with an underscore."
> Huh?!?
>
> The mentioned 5 items are:  _make, _asdict, _replace, _fields and
> _field_defaults.  Of the items "_replace" is the most surprising as that is
> already used by Python in other contexts such as str.replace().  These
> items don't look to be likely field names to be used by anyone.  Any
> illumination for this design decision?  To my (perhaps naive) eyes this
> strikes me as extraordinarily inconsistent Python syntax.
>
> --
> Wishing you only the best,
>
> boB Stepp
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> https://mail.python.org/mailman/listinfo/tutor
>


More information about the Tutor mailing list