Git Product home page Git Product logo

hashkat-v2's Introduction

G'day, eh... I'm Armin!

I am an HPC/ARC Scientific Software Developer.

  • 😄 Pronouns: He/Him
  • 🔭 Currently working on g3p and sq3p
  • ❤️ Coffee, Cooking, Swimming, Music, Movies
  • 🎮 XBox

👋 About me

hashkat-v2's People

Contributors

arminms avatar

Stargazers

 avatar  avatar

Watchers

 avatar

hashkat-v2's Issues

Adding preferential_agent follow model

  • making bins, weights and kmax for each agent type (i.e. at_bins_, at_weights and at_kmaxes)
  • initialize the above mentioned member variables in twitter_follow::init_agent_types like twitter_follow::init_bins
  • implementing update_at_bins_when_connection_added()
  • updating twitter_follow::preferential_agent_follow_model()
  • implementing update_at_bins_when_agent_added()
  • calling init_bins() in init_follow_models() rather than do_init()
  • printing bins in do_print() for preferential_agent follow model

Splitting update_bins to several slots for handling connection_added signal

  • first slot is update_counters_when_connection_added() which ls bound to connection_added() signal in init_slots()
  • second slot is update_bins_when_connection_added() which is bound to connection_added() signal in init_follow_models() for twitter_suggest and twitter follow models
  • third slot is update_at_bins_when_connection_added() which is bound to connection_added() signal in init_follow_models() for preferential_agent and twitter follow models

Splitting agent_added() to several slots for handling network::grown() signal

  • first slot is update_counters_when_agent_added() which ls bound to network::grow() signal in init_slots()
  • second slot is update_bins_when_agent_added() which is bound to network::grow() signal in init_follow_models() for twitter_suggest and twitter follow models
  • third slot is update_at_bins_when_agent_added() which is bound to network::grow() signal in init_follow_models() for preferential_agent and twitter follow models

Using analyzer_select_agent method to select follower in twitter_follow::select_follower()

  • adding std::vector<weight_type> at_add_weight_ to twitter_follow class and initialize it the same way as it was done for twitter_add_agent class
  • selecting agent type based on the agent type add weights (i.e. at_add_weight_)
  • adding AgentType network::agent_by_type(std::size_t type, T n) const to network class
  • if add rate is zero, just try to randomly select from network::agent_by_type(type, n)
  • when add rate is not zero, make a vector of adjusted add weights by multiplying follow rate of that agent type for each month (at_monthly_weights_[at][i]) with add weight of the agent type (at_add_weight_[at]) and dividing by sum of monthly follow rates (std::accumulate(at_monthly_weights_))
  • using adjusted_add_weights vector to select relevant month by discrete distribution
  • use the month for selecting agent ID using at_agent_per_month_[at][month] and uniform distribution

Recording follow counts for each follow model

  • adding std::array<T, 5> follow_models_count_ as a member to twitter_follow
  • initializing follow_models_count_ in init_follow_models() to zero
  • increment relevant element on invocation of each model
  • report values in twitter_follow::dump()

When max value is less or greater than maximum number of agents for follow_ranks, program crashes

  • in twitter_follow::init_bins(), if max is greater than max_agent + 1, set it to max_agent + 1
  • in twitter_follow::init_agent_types(), if max is greater than max_agent + 1, set it to max_agent + 1
  • using new method for calculating previous and current bin's index in update_bins_when_connection_added() slot
  • using new method for calculating previous and current bin's index in update_at_bins_when_connection_added() slot

Recording follow counts for each agent type

  • adding std::vector<std::size_t> at_follows_count_ as a member to twitter_follow
  • initializing at_follows_count_ in init_agent_types() to zero
  • increment relevant element in do do_action
  • report values in twitter_follow::dump()

Implementation of agent types as stereotype class

Agent stereotypes are intended to represent different kinds of network participants. For a network like Twitter, example agent stereotypes include 'Standard User', 'Celebrity', etc. Issue #9 requires this feature.

Splitting engine::step_time() to two slots

  • making two slots for action::finished() signal: increase_time() and increase_time_randomly()
  • based on the analysis.use_random_time_increment config item, bind action::finished() to either increase_time() or increase_time_randomly() in engine constructor
  • remove random_time_increment_ member variable
  • doing the same for multi-threaded version

Producing the same output as original hashkat

  • changing -o option to output-folder rather than output-file with 'output' as default value
  • placing out.dat inside output-folder
  • adding void dump(const std::string& folder) const member method to network, simulation, engine and action_base classes
  • adding virtual void do_dump(const std::string& folder) const = 0 to action_base class
  • overriding do_dump() in all action classes
  • calling network and engine's dump() in simulation::dump()
  • calling dump() for all actions in engine::dump()
  • saving network.dat file in network::dump()
  • saving main_stats.dat in network::dump() and relevant action classes checking for output.main_statistics flag in config
  • saving Categories_Distro.dat in twitter_follow::dump() checking for output.categories_distro flag in config
  • saving dd_by_follow_model.dat in twitter_follow::dump() checking for output.degree_distribution_by_follow_model flag in config
  • saving AT_info.dat for each agent type in twitter_follow::dump() checking for output.agent_stats flag in config
  • implement twitter_follow::save_degree_distributions() which saves X_degree_distribution_monthY.dat files
  • saving X_degree_distribution_monthY.dat files for each month in twitter_follow::dump() by calling twitter_follow::save_degree_distributions() checking for output.degree_distributions flag in config
  • pushing back months to twitter_follow::at_agent_per_month_ in twitter_follow::do_action() rather than twitter_follow::init_agent_types()
  • saving X_degree_distribution_monthY.dat files if we crossed a month in twitter_follow::do_action() by calling twitter_follow::save_degree_distributions() checking for output.degree_distributions flag in config
  • saving network.gexf in network_st::dump() checking for output.visualize flag in config
  • saving network.graphml in network_st::dump() checking for output.visualize flag in config
  • finding a way to pass output folder name for the previous item
  • removing reverse vector ordering for reading agent type configuration file in order to have consistent output for labels in graphs

Replacing C++11 RNG by TRNG

TRNG (http://numbercrunch.de/trng) is suited for shared memory as well as for distributed memory computers and may be used in any parallel programming environment, e.g. Message Passing Standard, OpenMP or CUDA. All generators, that are implemented by TRNG, have been subjected to thorough statistical tests in sequential and parallel setups.

Using time_of_follow for twitter_suggest follow model

  • adding std::vector<TimeType> agent_creation_time_ to twitter_follow class
  • initializing agent_creation_time_ in `twitter_follow::do_init()
  • pushing back current time to agent_creation_time_ for each invocation of twitter_follow::agent_added(T idx, W at)
  • adding referral_rate_function
  • changing twitter_follow::twitter_suggest_follow_model(T)

Adding Kolmogorov–Smirnov (K-S) Test to network class

  • adding network_st::make_cdf() function
  • adding network_st::write_cdf() static function
  • adding network_st::read_cdf() static function
  • adding bool network_st::ks_test(cdf1, cdf2, alpha = 0.05) function
  • write a patch for original hashkat to do write_cdf()

Adding Barabasi follow model

  • checking for analysis.use_barabasi config item in twitter_follow::init_follow_models() and binding barabasi_follow_model member function to follow_models_[1] if true
  • implementing barabasi_follow_model() function
  • saving analysis.barabasi_connections to barabasi_connections_ member variable in twitter_follow::init_follow_models()
  • implementing twitter_follow::barabasi_follow_when_agent_added() to follow that many times when a new agent is added
  • using analysis.use_barabasi config in twitter_follow::init_follow_models() to bind twitter_follow::barabasi_follow_when_agent_added() member function as a slot for 'network::agent_added()' signal
  • adding update_barabasi_bins_when_connection_added() slot and connect it to the signal
  • use the barabasi_exponent for bins
  • calling handle_follow() function in the slot

adding support for followback to twitter_follow class

  • add std::vector<weight_type> at_followback_weight_ member variable to twitter_follow class
  • initializing at_followback_weight_ for each agent type by reading agents.followback_probability from config in twitter_follow::init_agent_types
  • making an empty followback_when_connection_added() slot
  • binding followback_when_connection_added() slot to connection_added() signal in init_slots() if analysis.use_followback is true in config
  • implement followback_when_connection_added() slot

Using rate function rather than just rate value for add_agent action

This in yaml:

add: {function: constant, value: 1.0}

must be changed to this in xml:

    <rates>
        <add_function>constant</add_function>
        <add_rate>1.0</add_rate>
    </rates>

also this in yaml:

add: {function: linear, y_intercept: 0.0, slope: 0.5 }

to

    <rates>
        <add_function>linear</add_function>
        <add_y_intercept>0.0</add_y_intercept>
        <add_slope>0.5</add_slope>
    </rates>

Adding agent types to hashkat-lib

  • std::uint16_t will be the last template argument (W)
  • it must be a vector of std::uint16_t types
  • VauleType will be renamed to V
  • agent type names will be stored as std::vector<std::string> at_name_
  • agent type name can be found using std::string type_name(std::size_t type_idx) const
  • agent type can be found using W agent_type(T n) const
  • initialization of agent types from config can happen in constructors
  • agent types add weights are stored in std::vector<V> at_add_weight_
  • changing bool network::grow() to bool network::grow(W at)
  • changing signal<void(T)> grown_signal_type to signal<void(T,W)> grown_signal_type
  • during grow, type of the agent will be decided using the algorithm in original hashkat
  • adding std::vector<std::vector<T>> at_agent_ids to network class to hold agent_list for each agent type
  • adding std::vector<std::vector<T>> at_agent_per_month to twitter_follow class to hold agent_cap for each agent type
  • calculation of follow action weight must be based on the agent type monthly follow weights in twitter_follow::do_update_weight(const TimeType&) (requires #14)
  • creation of follow ranks (bins) for each agent type
  • updating follow ranks (bins) for each agent type in twitter_follow::agent_added(T,W) and twitter_follow::update_ranks(T,T) member functions

Adding a constant pointer of engine's time as member variable to actions

  • adding time as the last parameter of action::do_init(net, cnt, cnf, rng)
  • removing time parameter of do_update_weight(const TimeType& time)
  • adding std::size_t month() const member function to action classes which returns current month
  • increasing at_agent_per_month_[type][month] in twitter_follow::agent_added(T idx, W at)

Updating multi-threaded version to the latest changes

  • updating hashkat_mt.cpp based on hashkat.cpp
  • updating network_mt.hpp based on network_st.hpp
  • updating simulation_mt.hpp based on simulation_st.hpp
  • updating engine_mt.hpp based on engine_st.hpp
  • updating action_mt.hpp based on action_st.hpp
  • updating twitter_add_agent_mt.hpp based on twitter_add_agent_st.hpp
  • updating twitter_follow_mt.hpp based on twitter_follow_st.hpp

Updating CMake files

  • adding support for version extraction
  • add CMakeLists.txt to include folder for headers installation
  • adding CTest
  • adding INSTALL_TESTS option
  • adding support for CPack driven installer package
  • update `install.txt' file
  • make a tagged version for the latest release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.