micom package¶
Subpackages¶
Submodules¶
micom.algorithms module¶
Implements additional analysis algorithms for communities.
-
micom.algorithms.
euclidean
(inclusion)¶ Calculate euclidean distances for a community.
-
micom.algorithms.
jaccard
(inclusion)¶ Calculate jaccard distances for a community.
-
micom.algorithms.
metabolic_dist
(reactions, metric=<function jaccard>)¶ Calculate the metabolic distances between all members.
-
micom.algorithms.
reaction_matrix
(files)¶ Create a matrix of reactions x models.
micom.community module¶
A class representing a microbial or tissue community.
-
class
micom.community.
Community
(taxonomy, id=None, name=None, rel_threshold=1e-06, solver=None, progress=True, max_exchange=100, mass=1)¶ Bases:
cobra.core.model.Model
A community of models.
This class represents a community of individual models. It was designed for microbial communities but may also be used for multi-tissue or tissue-cell mixture models as long as all individuals exist within a single enclosing compartment.
-
property
abundances
¶ The normalized abundances.
Setting this attribute will also trigger the appropriate updates in the exchange fluxes and the community objective.
- Type
pandas.Series
-
cooperative_tradeoff
(min_growth=0.0, fraction=1.0, fluxes=False, pfba=True)¶ Find the best tradeoff between community and individual growth.
Finds the set of growth rates which maintian a particular community growth and spread up growth across all species as much as possible. This is done by minimizing the L2 norm of the growth rates with a minimal community growth.
- Parameters
min_growth (float or array-like, optional) – The minimal growth rate required for each individual. May be a single value or an array-like object with the same length as there are individuals.
fraction (float or list of floats in [0, 1]) – The minum percentage of the community growth rate that has to be maintained. For instance 0.9 means maintain 90% of the maximal community growth rate. Defaults to 100%.
fluxes (boolean, optional) – Whether to return the fluxes as well.
pfba (boolean, optional) – Whether to obtain fluxes by parsimonious FBA rather than “classical” FBA. This is highly recommended.
- Returns
The solution of the optimization. If fluxes==False will only contain the objective value, community growth rate and individual growth rates. If more than one fraction value is given will return a pandas Series of solutions with the fractions as indices.
- Return type
micom.CommunitySolution or pd.Series of solutions
-
property
exchanges
¶ Returns all exchange reactions in the model.
Uses several heuristics based on the reaction name and compartments to exclude reactions that are not exchange reactions.
- Type
list
-
knockout_species
(species=None, fraction=1.0, method='change', progress=True, diag=True)¶ Sequentially knowckout a list of species in the model.
This uses cooperative tradeoff as optimization criterion in order to get unqiue solutions for individual growth rates. Requires a QP solver to work.
- Parameters
species (str or list of strs) – Names of species to be knocked out.
fraction (float in [0, 1], optional) – Percentage of the maximum community growth rate that has to be maintained. Defaults to 100%.
method (str, optional) – One of “raw”, “change” or “relative change” that dictates whether to return the new growth rate (raw), the change in growth rate new - old or the relative change ([new - old] / old).
progress (bool, optional) – Whether to show a progress bar. On by default.
diag (bool, optional) – Whether the diagonal should contain values as well. If False will be filled with NaNs.
- Returns
A data frame with one row for each knockout and growth rates in the columns. Here the row name indicates which species has been knocked out and the columns contain the growth changes for all species in that knockout.
- Return type
pandas.DataFrame
-
property
modification
¶ Denotes modifications to the model currently applied.
Will be None if the community is unmodified.
- Type
str
-
optcom
(strategy='lagrangian', min_growth=0.0, fluxes=False, pfba=True)¶ Run OptCom for the community.
OptCom methods are a group of optimization procedures to find community solutions that provide a tradeoff between the cooperative community growth and the egoistic growth of each individual [#c1]_. micom provides several strategies that can be used to find optimal solutions:
“moma”: Minimization of metabolic adjustment. Simultaneously optimizes the community objective (maximize) and the cooperativity cost (minimize). This method finds an exact maximum but doubles the number of required variables, thus being slow.
“lmoma”: The same as “moma” only with a linear representation of the cooperativity cost (absolute value).
“original”: Solves the multi-objective problem described in [#c1]_. Here, the community growth rate is maximized simultanously with all individual growth rates. Note that there are usually many Pareto-optimal solutions to this problem and the method will only give one solution. This is also the slowest method.
- Parameters
community (micom.Community) – The community to optimize.
strategy (str) – The strategy used to solve the OptCom formulation. Defaults to “lagrangian” which gives a decent tradeoff between speed and correctness.
min_growth (float or array-like) – The minimal growth rate required for each individual. May be a single value or an array-like object with the same length as there are individuals.
fluxes (boolean) – Whether to return the fluxes as well.
pfba (boolean) – Whether to obtain fluxes by parsimonious FBA rather than “classical” FBA.
- Returns
The solution of the optimization. If fluxes==False will only contain the objective value, community growth rate and individual growth rates.
- Return type
micom.CommunitySolution
References
- 1
OptCom: a multi-level optimization framework for the metabolic modeling and analysis of microbial communities. Zomorrodi AR, Maranas CD. PLoS Comput Biol. 2012 Feb;8(2):e1002363. doi: 10.1371/journal.pcbi.1002363, PMID: 22319433
-
optimize
(fluxes=False, pfba=True, raise_error=False)¶ Optimize the model using flux balance analysis.
- Parameters
slim (boolean, optional) – Whether to return a slim solution which does not contain fluxes, just growth rates.
raise_error (boolean, optional) – Should an error be raised if the solution is not optimal. Defaults to False which will either return a solution with a non-optimal status or None if optimization fails.
- Returns
The solution after optimization or None if there is no optimum.
- Return type
micom.CommunitySolution
-
optimize_all
(fluxes=False, progress=False)¶ Return solutions for individually optimizing each model.
Notes
This might well mean that growth rates for all other individuals are low since the individual may use up all available resources. As a consequence the reported growth rates may usually never be obtained all at once.
- Parameters
fluxes (boolean, optional) – Whether to return all fluxes. Defaults to just returning the maximal growth rate.
progress (boolean, optional) – Whether to show a progress bar.
- Returns
The maximal growth rate for each species.
- Return type
pandas.Series
-
optimize_single
(id)¶ Optimize growth rate for one individual.
optimize_single will calculate the maximal growth rate for one individual member of the community.
Notes
This might well mean that growth rates for all other individuals are low since the individual may use up all available resources.
- Parameters
id (str) – The ID of the individual to be optimized.
fluxes (boolean, optional) – Whether to return all fluxes. Defaults to just returning the maximal growth rate.
- Returns
The maximal growth rate for the given species.
- Return type
float
-
set_abundance
(value, normalize=True)¶ Change abundances for one or more taxa.
- Parameters
value (array-like object) – The new abundances. Must contain one value for each taxon. Can be a named object like a pandas Series.
normalize (boolean, optional) – Whether to normalize the abundances to a total of 1.0. Many things in micom asssume that this is always the case. Only change this if you know what you are doing :O
-
property
taxonomy
¶ The taxonomy used within the model.
This attribute only returns a copy.
- Type
pandas.DataFrame
-
to_pickle
(filename)¶ Save a community in serialized form.
- Parameters
filename (str) – Where to save the pickled community.
- Returns
- Return type
Nothing
-
property
-
micom.community.
load_pickle
(filename)¶ Load a community model from a pickled version.
- Parameters
filename (str) – The file the community is stored in.
- Returns
The loaded community model.
- Return type
micom.duality module¶
Implements a fast dual formulation.
-
micom.duality.
fast_dual
(model, prefix='dual_')¶ Add dual formulation to the problem.
A mathematical optimization problem can be viewed as a primal and a dual problem. If the primal problem is a minimization problem the dual is a maximization problem, and the optimal value of the dual is a lower bound of the optimal value of the primal. For linear problems, strong duality holds, which means that the optimal values of the primal and dual are equal (duality gap = 0). This functions takes an optlang Model representing a primal linear problem and returns a new Model representing the dual optimization problem. The provided model must have a linear objective, linear constraints and only continuous variables. Furthermore, the problem must be in standard form, i.e. all variables should be non-negative. Both minimization and maximization problems are allowed.
-
micom.duality.
model
¶ The model to be dualized.
- Type
cobra.Model
-
micom.duality.
prefix
¶ The string that will be prepended to all variable and constraint names in the returned dual problem.
- Type
str
- Returns
The coefficients for the new dual objective.
- Return type
dict
-
micom.elasticity module¶
Calculate elasticity coefficients.
Functions to calculate elasticity coefficients for various community quantities.
-
micom.elasticity.
elasticities_by_abundance
(com, reactions, fraction, growth_rate, progress)¶ Get the elasticity coefficients for a set of variables.
- Parameters
com (micom.Community) – The community for wrhich to calculate elasticities.
variables (list of optlang.Variable) – The variables for which to calculate the elasticities. All of these must have non-zero primal vaues in the previous solution.
- Returns
The long/tidy version of the elasticities. Contains columns variable, effector, and elasticity.
- Return type
pandas.Dataframe
-
micom.elasticity.
elasticities_by_medium
(com, reactions, fraction, growth_rate, progress)¶ Get the elasticity coefficients for a set of variables.
- Parameters
com (micom.Community) – The community for wrhich to calculate elasticities.
variables (list of optlang.Variable) – The variables for which to calculate the elasticities. All of these must have non-zero primal vaues in the previous solution.
- Returns
The long/tidy version of the elasticities. Contains columns variable, effector, and elasticity.
- Return type
pandas.Dataframe
-
micom.elasticity.
exchange_elasticities
(com, fraction=1.0, progress=True)¶ Calculate elasticities for exchange reactions.
Calculates elasticity coefficients using the exchange reactions as response and exchange bounds (diet) and taxa abundances as effectors/parameters. Will use an arbitrary flux distribution as base.
- Parameters
com (micom.Community) – The community for wrhich to calculate elasticities.
fraction (double) – The tradeoff to use for the cooperative tradeoff method. Fraction of maximal community growth to enforce.
progress (boolean) – Whether to shwo progress bars. Will show two, one for the diet optimizations and another one for the taxa abundances.
- Returns
A data frame with the following columns: “reaction” - the exchange reaction (response), “effector” - the parameter that was changed, “direction” - whether the flux runs in the forward or reverse
direction,
”elasticity” - the elasticity coefficient, “type” - the type of effector either “exchange” for diet or “abundance” for taxa abundances.
- Return type
pandas.DataFrame
micom.logger module¶
configures the logger for mico.
-
micom.logger.
file_logger
(filepath)¶ Log micom messages to file.
micom.media module¶
Manages functions for growth media analysis and manipulation.
-
micom.media.
add_linear_obj
(community)¶ Add a linear version of a minimal medium to the community.
Changes the optimization objective to finding the growth medium requiring the smallest total import flux:
minimize sum |r_i| for r_i in import_reactions
- Parameters
community (micom.Community) – The community to modify.
-
micom.media.
add_mip_obj
(community)¶ Add a mixed-integer version of a minimal medium to the community.
Changes the optimization objective to finding the medium with the least components:
minimize size(R) where R part of import_reactions
- Parameters
community (micom.Community) – The community to modify.
-
micom.media.
default_excludes
= ['biosynthesis', 'transcription', 'replication', 'sink', 'demand', 'DM_', 'SN_', 'SK_']¶ A list of sub-strings in reaction IDs that usually indicate that the reaction is not an exchange reaction.
-
micom.media.
minimal_medium
(community, community_growth, min_growth=0.0, exports=False, minimize_components=False, open_exchanges=False, solution=False)¶ Find the minimal growth medium for the community.
Finds the minimal growth medium for the community which allows for community as well as individual growth. Here, a minimal medium can either be the medium requiring the smallest total import flux or the medium requiring the least components (ergo ingredients).
- Parameters
community (micom.Community) – The community to modify.
community_growth (positive float) – The minimum community-wide growth rate.
min_growth (positive float or array-like object.) – The minimum growth rate for each individual in the community. Either a single value applied to all individuals or one value for each.
exports (boolean) – Whether to include export fluxes in the returned medium. Defaults to False which will only return import fluxes.
minimize_components (boolean) – Whether to minimize the number of components instead of the total import flux. Might be more intuitive if set to True but may also be slow to calculate for large communities.
open_exchanges (boolean or number) – Whether to ignore currently set bounds and make all exchange reactions in the model possible. If set to a number all exchange reactions will be opened with (-number, number) as bounds.
solution (boolean) – Whether to also return the entire solution and all fluxes for the minimal medium.
- Returns
A series {rid: flux} giving the import flux for each required import reaction. If solution is True retuns a dictionary {“medium”: panas.Series, “solution”: micom.CommunitySolution}.
- Return type
pandas.Series or dict
micom.optcom module¶
Implements optimization and model problems.
-
micom.optcom.
add_dualized_optcom
(community, min_growth)¶ Add dual Optcom variables and constraints to a community.
Uses the original formulation of OptCom and solves the following multi-objective problem:
maximize community_growth s.t. maximize growth_rate_i for all i s.t. Sv_i = 0 lb_i >= v_i >= ub_i
Notes
This method will only find one arbitrary solution from the Pareto front. There may exist several other optimal solutions.
- Parameters
community (micom.Community) – The community to modify.
min_growth (positive float or array-like object.) – The minimum growth rate for each individual in the community. Either a single value applied to all individuals or one value for each.
-
micom.optcom.
add_moma_optcom
(community, min_growth, linear=False)¶ Add a dualized MOMA version of OptCom.
Solves a MOMA (minimization of metabolic adjustment) formulation of OptCom given by:
minimize cooperativity_cost s.t. maximize community_objective s.t. Sv = 0 lb >= v >= ub where community_cost = sum (growth_rate - max_growth)**2 if linear=False or community_cost = sum |growth_rate - max_growth| if linear=True
- Parameters
community (micom.Community) – The community to modify.
min_growth (positive float or array-like object.) – The minimum growth rate for each individual in the community. Either a single value applied to all individuals or one value for each.
linear (boolean) – Whether to use a non-linear (sum of squares) or linear version of the cooperativity cost. If set to False requires a QP-capable solver.
-
micom.optcom.
optcom
(community, strategy, min_growth, fluxes, pfba)¶ Run OptCom for the community.
OptCom methods are a group of optimization procedures to find community solutions that provide a tradeoff between the cooperative community growth and the egoistic growth of each individual 2. micom provides several strategies that can be used to find optimal solutions:
“moma”: Minimization of metabolic adjustment. Simultaneously optimizes the community objective (maximize) and the cooperativity cost (minimize). This method finds an exact maximum but doubles the number of required variables, thus being slow.
“lmoma”: The same as “moma” only with a linear representation of the cooperativity cost (absolute value).
“original”: Solves the multi-objective problem described in 2. Here, the community growth rate is maximized simultanously with all individual growth rates. Note that there are usually many Pareto-optimal solutions to this problem and the method will only give one solution. This is also the slowest method.
- Parameters
community (micom.Community) – The community to optimize.
strategy (str) – The strategy used to solve the OptCom formulation. Defaults to “lagrangian” which gives a decent tradeoff between speed and correctness.
min_growth (float or array-like) – The minimal growth rate required for each individual. May be a single value or an array-like object with the same length as there are individuals.
fluxes (boolean) – Whether to return the fluxes as well.
pfba (boolean) – Whether to obtain fluxes by parsimonious FBA rather than “classical” FBA.
- Returns
The solution of the optimization. If fluxes==False will only contain the objective value, community growth rate and individual growth rates.
- Return type
micom.CommunitySolution
References
micom.problems module¶
Implements tradeoff optimization between community and egoistic growth.
-
micom.problems.
cooperative_tradeoff
(community, min_growth, fraction, fluxes, pfba)¶ Find the best tradeoff between community and individual growth.
-
micom.problems.
knockout_species
(community, species, fraction, method, progress, diag=True)¶ Knockout a species from the community.
-
micom.problems.
regularize_l2_norm
(community, min_growth)¶ Add an objective to find the most “egoistic” solution.
This adds an optimization objective finding a solution that maintains a (sub-)optimal community growth rate but is the closest solution to the community members individual maximal growth rates. So it basically finds the best possible tradeoff between maximizing community growth and individual (egoistic) growth. Here the objective is given as the sum of squared differences between the individuals current and maximal growth rate. In the linear case squares are substituted by absolute values (Manhattan distance).
- Parameters
community (micom.Community) – The community to modify.
min_growth (positive float) – The minimal community growth rate that has to be mantained.
linear (boolean) – Whether to use a non-linear (sum of squares) or linear version of the cooperativity cost. If set to False requires a QP-capable solver.
max_gcs (None or dict) – The precomputed maximum individual growth rates.
micom.solution module¶
A community solution object.
-
class
micom.solution.
CommunitySolution
(community, slim=False, reactions=None, metabolites=None)¶ Bases:
cobra.core.solution.Solution
An FBA solution for an entire community.
-
objective_value
¶ The (optimal) value for the objective function.
- Type
float
-
members
¶ Contains basic info about the individual compartments/members of the community such as id, abundance and growth rates. Will also include one row for the external medium (without abundance and growth rate).
- Type
pandas.Series
-
growth_rate
¶ The overall growth rate for the community normalized to 1 gDW.
- Type
float
-
status
¶ The solver status related to the solution.
- Type
str
-
strategy
¶ The optimization strategy used to obtain the solution (may be empty).
- Type
str
-
fluxes
¶ Contains the reaction fluxes (primal values of variables) stratified by compartment. Columns denote individual fluxes and rows denote compartments: one for every species plus one for the external medium. Fluxes will be NA if the reaction does not exist in the organism.
- Type
pandas.DataFrame
-
reduced_costs
¶ Contains reaction reduced costs (dual values of variables) stratified by species. Columns denote individual fluxes and rows denote species. Reduced costs will be NA if the reaction does not exist in the organism.
- Type
pandas.Series
-
shadow_prices
¶ Contains metabolite shadow prices (dual values of constraints) stratified by species. Columns denote individual metabolites and rows denote species. Shadow prices will be NA if the metabolite does not exist in the organism.
- Type
pandas.Series
-
-
micom.solution.
add_pfba_objective
(community)¶ Add pFBA objective.
Add objective to minimize the summed flux of all reactions to the current objective. This one will work with any objective (even non-linear ones).
See also
pfba()
- Parameters
community (micom.Community) – The community to add the objective to.
-
micom.solution.
crossover
(community, sol, fluxes=False, pfba=False)¶ Get the crossover solution.
-
micom.solution.
good
= ['optimal', 'numeric', 'feasible', 'suboptimal', 'iteration_limit']¶ Solver states that permit returning the solution.
-
micom.solution.
optimize_with_fraction
(com, fraction, growth_rate=None, fluxes=False, pfba=False)¶ Optimize with a constrained community growth rate.
-
micom.solution.
optimize_with_retry
(com, message='could not get optimum.')¶ Try to reset the solver.
-
micom.solution.
reset_solver
(community)¶ Reset the solver.
-
micom.solution.
solve
(community, fluxes=True, pfba=True, raise_error=False)¶ Get all fluxes stratified by species.
micom.util module¶
Holds utility functions for other modules.
-
micom.util.
add_var_from_expression
(model, name, expr, lb=None, ub=None)¶ Add a variable to a model equaling an expression.
-
micom.util.
adjust_solver_config
(solver)¶ Adjust the optlang solver configuration for larger problems.
-
micom.util.
check_modification
(community)¶ Check whether a community already carries a modification.
- Parameters
community (micom.Community) – The community class to check.
- Raises
ValueError – If the community already carries a modification and adding another would not be safe.
-
micom.util.
download_model
(url, folder='.')¶ Download a model.
-
micom.util.
fluxes_from_primals
(model, info)¶ Extract a list of fluxes from the model primals.
-
micom.util.
join_models
(model_files, id=None)¶ Join several models into one.
This requires all the models to use the same ID system.
- Parameters
model_files (list of strings) – The files to be joined.
id (str) – The new ID for the model. Will be the ID of the first model if None.
- Returns
The joined cobra Model.
- Return type
cobra.Model
-
micom.util.
load_model
(filepath)¶ Load a cobra model from several file types.
-
micom.util.
reset_min_community_growth
(com)¶ Reset the lower bound for the community growth.
-
micom.util.
serialize_models
(files, dir='.')¶ Convert several models to Python pickles.
micom.workflows module¶
Makes it easier to run analyses on several samples in parallel.
-
micom.workflows.
workflow
(func, args, n_jobs=4, unit='sample(s)')¶ Run analyses for several samples in parallel.
This will analyze several samples in parallel. Includes a workaround for optlang memory leak.
- Parameters
func (function) – A function that takes a single argument (can be any object) and that performs your analysis for a single sample.
args (array-like object) – An array-like object (list, tuple, numpy array, pandas Series, etc.) that contains the arguments for each sample.
n_jobs (positive int) – How many samples to analyze in parallel at once.
unit (str) – The unit used for the progress bar.
Module contents¶
Simple init file for mico.
-
class
micom.
Community
(taxonomy, id=None, name=None, rel_threshold=1e-06, solver=None, progress=True, max_exchange=100, mass=1)¶ Bases:
cobra.core.model.Model
A community of models.
This class represents a community of individual models. It was designed for microbial communities but may also be used for multi-tissue or tissue-cell mixture models as long as all individuals exist within a single enclosing compartment.
-
property
abundances
¶ The normalized abundances.
Setting this attribute will also trigger the appropriate updates in the exchange fluxes and the community objective.
- Type
pandas.Series
-
cooperative_tradeoff
(min_growth=0.0, fraction=1.0, fluxes=False, pfba=True)¶ Find the best tradeoff between community and individual growth.
Finds the set of growth rates which maintian a particular community growth and spread up growth across all species as much as possible. This is done by minimizing the L2 norm of the growth rates with a minimal community growth.
- Parameters
min_growth (float or array-like, optional) – The minimal growth rate required for each individual. May be a single value or an array-like object with the same length as there are individuals.
fraction (float or list of floats in [0, 1]) – The minum percentage of the community growth rate that has to be maintained. For instance 0.9 means maintain 90% of the maximal community growth rate. Defaults to 100%.
fluxes (boolean, optional) – Whether to return the fluxes as well.
pfba (boolean, optional) – Whether to obtain fluxes by parsimonious FBA rather than “classical” FBA. This is highly recommended.
- Returns
The solution of the optimization. If fluxes==False will only contain the objective value, community growth rate and individual growth rates. If more than one fraction value is given will return a pandas Series of solutions with the fractions as indices.
- Return type
micom.CommunitySolution or pd.Series of solutions
-
property
exchanges
¶ Returns all exchange reactions in the model.
Uses several heuristics based on the reaction name and compartments to exclude reactions that are not exchange reactions.
- Type
list
-
knockout_species
(species=None, fraction=1.0, method='change', progress=True, diag=True)¶ Sequentially knowckout a list of species in the model.
This uses cooperative tradeoff as optimization criterion in order to get unqiue solutions for individual growth rates. Requires a QP solver to work.
- Parameters
species (str or list of strs) – Names of species to be knocked out.
fraction (float in [0, 1], optional) – Percentage of the maximum community growth rate that has to be maintained. Defaults to 100%.
method (str, optional) – One of “raw”, “change” or “relative change” that dictates whether to return the new growth rate (raw), the change in growth rate new - old or the relative change ([new - old] / old).
progress (bool, optional) – Whether to show a progress bar. On by default.
diag (bool, optional) – Whether the diagonal should contain values as well. If False will be filled with NaNs.
- Returns
A data frame with one row for each knockout and growth rates in the columns. Here the row name indicates which species has been knocked out and the columns contain the growth changes for all species in that knockout.
- Return type
pandas.DataFrame
-
property
modification
¶ Denotes modifications to the model currently applied.
Will be None if the community is unmodified.
- Type
str
-
optcom
(strategy='lagrangian', min_growth=0.0, fluxes=False, pfba=True)¶ Run OptCom for the community.
OptCom methods are a group of optimization procedures to find community solutions that provide a tradeoff between the cooperative community growth and the egoistic growth of each individual [#c1]_. micom provides several strategies that can be used to find optimal solutions:
“moma”: Minimization of metabolic adjustment. Simultaneously optimizes the community objective (maximize) and the cooperativity cost (minimize). This method finds an exact maximum but doubles the number of required variables, thus being slow.
“lmoma”: The same as “moma” only with a linear representation of the cooperativity cost (absolute value).
“original”: Solves the multi-objective problem described in [#c1]_. Here, the community growth rate is maximized simultanously with all individual growth rates. Note that there are usually many Pareto-optimal solutions to this problem and the method will only give one solution. This is also the slowest method.
- Parameters
community (micom.Community) – The community to optimize.
strategy (str) – The strategy used to solve the OptCom formulation. Defaults to “lagrangian” which gives a decent tradeoff between speed and correctness.
min_growth (float or array-like) – The minimal growth rate required for each individual. May be a single value or an array-like object with the same length as there are individuals.
fluxes (boolean) – Whether to return the fluxes as well.
pfba (boolean) – Whether to obtain fluxes by parsimonious FBA rather than “classical” FBA.
- Returns
The solution of the optimization. If fluxes==False will only contain the objective value, community growth rate and individual growth rates.
- Return type
micom.CommunitySolution
References
- 3
OptCom: a multi-level optimization framework for the metabolic modeling and analysis of microbial communities. Zomorrodi AR, Maranas CD. PLoS Comput Biol. 2012 Feb;8(2):e1002363. doi: 10.1371/journal.pcbi.1002363, PMID: 22319433
-
optimize
(fluxes=False, pfba=True, raise_error=False)¶ Optimize the model using flux balance analysis.
- Parameters
slim (boolean, optional) – Whether to return a slim solution which does not contain fluxes, just growth rates.
raise_error (boolean, optional) – Should an error be raised if the solution is not optimal. Defaults to False which will either return a solution with a non-optimal status or None if optimization fails.
- Returns
The solution after optimization or None if there is no optimum.
- Return type
micom.CommunitySolution
-
optimize_all
(fluxes=False, progress=False)¶ Return solutions for individually optimizing each model.
Notes
This might well mean that growth rates for all other individuals are low since the individual may use up all available resources. As a consequence the reported growth rates may usually never be obtained all at once.
- Parameters
fluxes (boolean, optional) – Whether to return all fluxes. Defaults to just returning the maximal growth rate.
progress (boolean, optional) – Whether to show a progress bar.
- Returns
The maximal growth rate for each species.
- Return type
pandas.Series
-
optimize_single
(id)¶ Optimize growth rate for one individual.
optimize_single will calculate the maximal growth rate for one individual member of the community.
Notes
This might well mean that growth rates for all other individuals are low since the individual may use up all available resources.
- Parameters
id (str) – The ID of the individual to be optimized.
fluxes (boolean, optional) – Whether to return all fluxes. Defaults to just returning the maximal growth rate.
- Returns
The maximal growth rate for the given species.
- Return type
float
-
set_abundance
(value, normalize=True)¶ Change abundances for one or more taxa.
- Parameters
value (array-like object) – The new abundances. Must contain one value for each taxon. Can be a named object like a pandas Series.
normalize (boolean, optional) – Whether to normalize the abundances to a total of 1.0. Many things in micom asssume that this is always the case. Only change this if you know what you are doing :O
-
property
taxonomy
¶ The taxonomy used within the model.
This attribute only returns a copy.
- Type
pandas.DataFrame
-
to_pickle
(filename)¶ Save a community in serialized form.
- Parameters
filename (str) – Where to save the pickled community.
- Returns
- Return type
Nothing
-
property
-
micom.
load_pickle
(filename)¶ Load a community model from a pickled version.
- Parameters
filename (str) – The file the community is stored in.
- Returns
The loaded community model.
- Return type


Travel Diary Log
Add a destination:
Location
Time of Year
Start Date
End Date
Landmarks Visited
Add Landmark
Notes
Add Destination
Destinations
Location:
StartDate:
EndDate:
Landmarks:
Notes:


February 4th, 2014. Version 1
In using this website or related websites, or the NationStates++ browser extension, you are deemed to have read and agreed to the following Terms of Service:
The following terminology applies to these Terms of Service, Privacy Statement and Disclaimer Notice: “You” and “Your” refers to you, the person using these websites and accepting NationStates++’s Terms of Service. “Ourselves” “We” and “Us” refers to NationStates++.
The information on this web site and its related sites is provided on an “as-is” basis. To the fullest extent permitted by law, NationStates++:
We may use IP addresses to analyse trends, administer the site, track user’s movements and gather broad demographic information for aggregate use. IP addresses are not linked to personally identifiable information. Additionally, for systems administration, detecting usage patterns or troubleshooting problems, our web servers automatically log standard access information including browser type, access times, URL requested, and referral URL. This information is not shared with third parties. Any individually identifiable information related to this data will never be used in any way different to that stated above without your explicit permission.
Like most interactive websites, NationStates++ uses cookies for the purposes of anonymous user analytic, including third-party services, such as Google Analytics.
Copyright and other relevant intellectual property rights in relation to NationStates++ are covered by the Massachusetts Institute of Technology (MIT) License. In respect of the website, normal copyright and intellectual property rights apply to all text relating to NationStates++’s services.
Failure of either Party to insist upon the strict performance of any provision of this or any Agreement or the failure of either Party to exercise any right or remedy to which it, he or they are entitled hereunder shall not cause a diminution of the obligations under this or any Agreement. No waiver of the provisions of this or any Agreement shall be effective unless it is expressly stated to be such and agreed by both Parties.
These Terms of Service form part of the Agreement between you and ourselves. Your accessing of this website and the use of the services it provides indicates your understanding, agreement to and acceptance of the Disclaimer Notice and the full Terms of Service contained herein.


{% for owned_item in owned_items %}
{{ owned_item.name }}
Are You sure you want to sell
{{ owned_item.name }}
for
{{ owned_item.price }}
$?
By clicking Sell, you will put this item back on the Market.
{% endfor %}


The dynamism of migration strengthens NYC and has contributed to the City’s growth in population to an all-time high of 8,537,673 in 2016. These charts show the number of people who moved to or left NYC during each time period, according to census survey data. While NYC has seen wide variations in the volume of migrants through the decades, certain groups are more inclined to come or go. The overall or net effect of migration flows in and out of the city is referred to as net migration. Keep in mind that groups with net migration losses can see their populations grow, as migration losses are often offset by “natural increase” – the number of births exceeding deaths.
Hover over the bars to see trendlines and details for each grouping.
Selected Characteristic
Groupings
Copyright © NYC Department of City Planning. All rights reserved.
A Project by the DCP Population Division and NYC Planning Labs. | Report a Bug
Up until 2000, the long form census asked respondents where they lived "5 years ago." Beginning in 2006 the American Community Survey asked respondents where they lived "1 year ago." The ACS data has been adjusted to be historically comparable. The full methodology is forthcoming.
Raw data from IPUMS-USA, University of Minnesota, www.ipums.org: 1940 1% Sample, 1980 5% State Sample, 1990 5% Sample, 2000 5% Sample, and 2010-14 ACS.
Download the data that powers this visualization as a CSV.


Supplementary Marathon List for 1988
Scheduled but not verified AUS 12 Jun Trial Bay Kempsey BEL 23 Apr Geel Geel (1st) BEL 23 Apr Menen Menen (1st) BEL 21 May Tienen Heerbaantocht (3rd) BEL 22 May Ronquières Amitié (5th) BEL 22 May Ruiselede Molendorp (6th) BEL 05 Jun Gent Gent (2nd) BEL 14 Aug Middelkerke Kust BEL 01 Oct Beveren Flanders (2nd) BEL 23 Oct Liège Liège (5th) BEL 17 Dec Heusden Kerstcorrida (5th) DEN 26 Jun Viborg Haervejs DEN 09 Oct Aarhus Aarhus ENG 08 May Margate Isle of Thanet Coastal ENG 26 Jun Selby Selby ENG 04 Sep New Milton New Forest ENG 18 Sep Guilford Red Cross FRA 04 Jun Nancy Nancy FRA 03 Sep Montpellier Montpellier (2nd) FRA 04 Sep Orcines Volcans (2nd) FRA 16 Oct Saint Aubin Deux Lacs GER 17 Apr Köln PSV (11th) GER 08 May Giessen Stadt (2nd) GER 15 May Wesseling Wesseling GER 19 May Lüdingshausen Lüdingshausen (11th) GER 21 Aug Gieboldehausen Richsfeld (7th) GER 25 Sep Pfungstadt Pfungstadt (14th) GER 09 Oct Augsburg Augsburg GER 23 Oct Oelde Oelde GER 29 Oct Hamm Langstrecken-Grossveranstaltung (13th) GER 06 Nov Neugraben Süderelbe (12th) NED 28 May Rhenen Berg tot Berg NED Nov Shiedam NOR 04 Jun Beitostolen Norske Fjell POL 09 May Bialo Podlaska (4th) POL 22 May Lowicz (2nd) POL 04 Jun Walcz (4th) POL 19 Jun Oks (16th) POL 16 Jul Olsztyn Grunwald (2nd) POL 28 Aug Gorzow (4th) POL 13 Oct Kozle (3rd) SCO 24 Apr Dundee People's Health SUI 24 Apr Biel Bienne SUI 08 May Geneve SUI 24 Sep Zürich Züricher Wald (9th) SUI 23 Oct Basel Sri Chinmoy SUI 30 Oct Geneve Jussy USA 09 Jan Baton Rouge LA Baton Rouge USA 17 Jan [Point Reyes] CA Point Reyes (2nd) USA 30 Jan Volcano HI Volcano Wilderness (6th) USA 13 Feb The Woodlands TX The Woodlands (10th) USA 21 Feb Bossier City LA Louisiana (was Red River) USA 28 Feb El Paso TX Desert (8th) USA 01 Mar Wawawai WA Snake River Canyon (9th) USA 02 Apr Sausalito CA 49er (trails) USA 02 Apr Yakima WA Run For Jesus (5th) USA 23 Apr Sausalito CA Golden Gate Headlands USA 07 May Clayton CA Mount Diablo USA 08 May Pinole CA Pinole USA 15 May Kailua HI Windward (8th) USA 03 Jun Elk Grove IL NJCAA USA 26 Jun Guernsey WY Wyoming Governor's Cup USA 01 Oct Scott City KS Heart of the Nation (9th) USA 15 Oct Muncie IN Mid America Running Festival (4th) USA 29 Oct Sausalito CA Miwoks (1st) (trail) USA 06 Nov Loma Linda CA Pigeon Pass (9th) USA 06 Nov Soquel CA Summit (9th) USA 12 Nov [Santa Cruz] CA Skyline to the Sea (2nd) (trails) USA 13 Nov Fresno CA Fresno (5th) USA 20 Nov Boston MA Boston Peace (4th) USA 04 Dec Altus OK Bulldog (4th) (pt/pt) WAL 07 Aug Cardiff City-to-City (Swansea => Cardiff) Scheduled but cancelled ITA 30 Oct Ivrea Ivrea (1st) USA Feb Davis CA Davis
Last Updated on 23 Apr 2014


Each precinct is colored to indicate which candidate received the most votes there. A more opaque (darker) version of the color is used when the candidate managed to win a majority of the votes in the precinct.
The map can be misleading in the same way typical U.S. presidential election maps are, since the area of a precinct is not proportional to the number of voters there. A candidate who wins in densely populated, high-turnout areas will often look worse on the map than a candidate who wins in less dense or low-turnout areas.
Click on a precinct to see the vote breakdown.
Each precinct is shaded to indicate the percentage of the vote that went for the candidate, with darker grays indicating higher percentages.
Click on a precinct to see the vote breakdown.
Each precinct is shaded to indicate the number of votes the candidate received there, with darker grays indicating higher numbers.
Click on a precinct to see the vote breakdown.
Each precinct is shaded to indicate the total number of votes cast there, with darker grays indicating higher numbers.
Click on a precinct to see the vote breakdown.
The 20 precincts that gave the candidate the most votes are colored.
Click on a precinct to see the vote breakdown.
This map is like the one of the precinct winners, except that precincts are colored to indicate the candidate who won second place in each. It's probably most interesting for the at-large race, which has two winners.
Click on a precinct to see the vote breakdown.
Each precinct is shaded to indicate what percentage of the registered voters voted, with darker grays indicating higher turnout.
Click on a precinct to see the vote breakdown.
Each precinct is shaded to indicate the average number of votes cast in this contest on each ballot, with darker grays indicating higher numbers. For the at-large council race a voter has two votes.
Click on a precinct to see the vote breakdown.
Page by Keith C. Ivey (source), Nov 2014. Send comments to keith at iveys dot org.


Francisco Murillo
Here you'll find the results of the platzi exercises
Workshop #1
Calculate Area and Perimeter
of your figures
Workshop #2
Calculate
Workshop #3
Calculate
Workshop #4
Calculate


Part of my job includes national and international service. I hold many leadership positions in the software engineering research community.
Journal Board Memberships
Senior Associate Editor
Journal of Systems and Software (JSS), 2021 - current
Associate Editor
IEEE Transactions on Software Engineering (TSE), 2021 - current
Empirical Software Engineering (EMSE), 2018 - current
Journal of Systems and Software (JSS), 2017 - 2020
Guest Editor
Special Issue on Human-Centric Software Engineering in Journal of Systems and Software (JSS), 2023
Special Issue on MSR'21 in Empirical Software Engineering (EMSE), 2023
Special Issue on ICSME'20 in Empirical Software Engineering (EMSE), 2023
Special Issue on RE'19 in Empirical Software Engineering (EMSE), 2020
Special Issue on RE'19 in Requirements Engineering (RE), 2020
Special Issue on Context for Software Developers in Journal of Systems and Software (JSS), 2016
Review Board Member
Information and Software Technology (IST), 2021 - current
ACM Transactions on Software Engineering and Methodology (TOSEM), 2019 - 2022
Empirical Software Engineering (EMSE), 2015 - 2017
Executive Committee Memberships
Liaison for Diversity, Equity, and Inclusion
ACM Special Interest Group on Software Engineering (SIGSOFT), 2019 - current
Treasurer
Software Innovation New Zealand, 2016 - 2022
Member
IEEE Computer Society Diversity and Inclusion Committee, 2023 - current
Steering Committee Member
Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2021 - current
International Conference on Software Maintenance and Evolution, 2020 - current
Mining Software Repositories Conference, 2019 - current
Organizing Committee Memberships
Program Co-Chair
Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2023
Mining Software Repositories (MSR), 2021
International Conference on Software Maintenance and Evolution (ICSME), 2020
Program Committee Area Chair
Software Analytics, International Conference on Software Engineering (ICSE), 2023
Track Co-Chair
Industry Forum, International Conference on Software Engineering (ICSE), 2023
Software Engineering in Society, International Conference on Software Engineering (ICSE), 2022
RE Next, International Requirements Engineering Conference (RE), 2022
Journal First Track, International Conference on Software Analysis Evolution and Reengineering (SANER), 2022
Industrial Papers, International Symposium on Empirical Software Engineering and Measurement (ESEM), 2018
Short Papers, Evaluation and Assessment in Software Engineering Conference (EASE), 2018
Experience Reports, International Conference on Global Software Engineering (ICGSE), 2018
Other Conference Organization Committee Roles
Diversity and Inclusion Co-Chair, Local Organising Chair, ACM SIGPLAN conference on Systems, Programming, Languages, and Applications Software for Humanity (SPLASH), 2022
Publicity Co-Chair, Mining Software Repositories (MSR), 2019
Workshop Organizer
International Workshop on Affective Computing in Requirements Engineering (AffectRE), 2020, 2021
International Workshop on Context for Software Developers (CSD), 2014, 2015
Program Committee Memberships
Conferences Main Research Paper Tracks
International Conference on Software Engineering (ICSE), 2019 - 2021
Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2020 - 2022
Mining Software Repositories (MSR), 2018 - 2020
International Conference on Software Maintenance and Evolution (ICSME), 2019, 2021 - 2022
International Requirements Engineering Conference (RE), 2018 - 2021
International Symposium on Empirical Software Engineering and Measurement (ESEM), 2018
International Conference on Evaluation of Novel Approaches to Software Engineering (ENASE), 2018
Australasian Computer Science Conference (ACSC), 2017
CORE Conference Rankings
Area Committee for 4612 Software (and its) engineering, 2023
Conferences Other Tracks
Student Research Competition, International Conference on Software Engineering (ICSE), 2023
Doctoral Symposium, International Conference on Software Engineering (ICSE), 2023
Doctoral Symposium, Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2022
New Ideas and Emerging Results, International Conference on Software Maintenance and Evolution (ICSME), 2022
Doctoral Symposium, Evaluation and Assessment in Software Engineering Conference (EASE), 2022
Diversity, Equity and Inclusion Track, European Conference on Software Architecture (ECSA), 2021
Ideas, Visions, and Reflections (IVR) Track, Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2021
Posters Track, International Conference on Software Engineering (ICSE), 2020
Tools Demo Track, Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2019
Short Papers Track, Evaluation and Assessment in Software Engineering Conference (EASE), 2019
Artifact Evaluation, International Conference on Software Engineering (ICSE), 2019 - 2020
Artifact Evaluation, International Requirements Engineering Conference (RE), 2019
Journal-First Papers Track, International Symposium on Empirical Software Engineering and Measurement (ESEM), 2018
Software Engineering in Practice (SEIP) Track, International Conference on Software Engineering (ICSE), 2018
Software Engineering in Society (SEIS) Track, International Conference on Software Engineering (ICSE), 2016 - 2018
Short Papers Track, Asia-Pacific Software Engineering Conference (APSEC), 2017
Mining Challenge Track, Mining Software Repositories (MSR), 2015
Workshops
International Workshop on Recruiting Participants for Empirical Software Engineering (RoPES), 2022
International Workshop on Software Health (SoHeal), 2018 - 2020
International Workshop on Emotion Awareness in Software Engineering (SEMotion), 2016 - 2019
International Workshop on the Social and Organizational Dimensions of Software Architecting (SODA), 2018
Workshop on the Evaluation and Usability of Programming Languages and Tools (PLATEAU), 2016, 2018
Social Software Engineering Workshop (SSE), 2016
Award Committee Memberships
Chair
Test of Time Award, Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2022
Awards, Mining Software Repositories (MSR), 2023 - 2024
Member
IEEE TCSE Distinguished Education Award, 2021 - 2022
Awards, Mining Software Repositories (MSR), 2022
FOSS Award, Mining Software Repositories (MSR), 2022
Most Influential Paper (MIP) Award, Mining Software Repositories (MSR), 2020 - 2021
Reviewing
IEEE Transactions on Software Engineering Journal (TSE)
ACM Transactions on Software Engineering and Methodology Journal (TOSEM)
Empirical Software Engineering Journal (EMSE)
Journal of Systems and Software (JSS)
Information and Software Technology Journal (IST)
ACM Computing Surveys Journal
ACM Transactions on Computing Education Journal (TOCE)
Journal of Computer Science and Technology (JCST)
Advances in Complex Systems Journal (ACS)
IEEE Software
Journal of Internet Services and Applications (JISA)
Computers in Human Behavior Journal
ACM Conference on Computer-Supported Cooperative Work and Social Computer (CSCW)
Hawaii International Conference on System Sciences (HICSS)
ACM Conference on Human Factors in Computing Systems (CHI)


--- layout: post ---
In March 2016, Wire™ launches a new version, featuring video calling and end-to-end encryption. As the company focuses on privacy and security, the source code of some critical parts of the application is made available to the public.
During my years of work at Wire, I made contribution to all parts of the iOS code currently available to the public. A list of currently released repositories can be found here.


Our core objective is to gauge the effectiveness of social distancing policies on containing the transmission of the coronavirus by investigating social distancing among people in New York City during the 2020 COVID-19 lockdown. We used the data collected on pedestrian activities from the streets of NYC during and after the COVID-19 outbreak from public traffic cameras and vehicle dashcam footage. We used machine learning models YOLOv3 and Super Resolution to pre-process the image data and then created a distance estimation program to study social distancing in different NYC boroughs from March through August 2020.
Our dataset draws on Nexar’s dashcam image directory. This directory is composed of pictures taken from Uber and Lyft vehicles driving through 3 boroughs of New York City -- Manhattan, Queens, and Brooklyn. We primarily focused on images taken in Manhattan during the first 5 months of the pandemic (March through August 2020).
We noticed that the object detection model was havinng trouble identifying people in dim images. A lot of the dashcam images in our dataset were taken at night, making them blurry and unusable. We determined the average brightness-per-pixel of an image and set a threshold of 50 bpp to filter out usable images.
This gave us a smaller and more informative set of pictures to work with.
YOLO (You Only Look Once) is a notable real-time object detection model that classifies objects in a single sweep of the image. We used YOLOv3, trained using the COCO (Common Objects in Context) dataset. OpenCV has a deep neural network (DNN) module that was used to read in YOLOv3 weights.
We paired YOLOv3 with a script to draw colorful boxes around any human YOLO detected. For example, the person walking on the right side of this image has a blue box drawn around them.We sorted out any images where YOLO detected no people, including images with only blurry or partial representations of people.
Using the coordinates of a person, we cropped the image around the detected people, creating an image patch.  Traffic and dashcam images are generally low resolution.
To handle this, we ran the images through a Super Resolution (SR) model. We tested four different models, shown above. Between these four super-resolution methods, ESPCN worked the best, because YOLO detected the most people in images that used ESPCN.
Finally, we ran the filtered set of images through a distance detection model. This model created boxes around humans, this time changing the color based on proximity to the camera. This color ranges from yellow (no people nearby) to dark red (many people in proximity).
For each person, we monitored how many other people were within six feet of them. In this image, the leftmost number above a person is their individual ID, the middle number is the confidence (how sure is YOLO that this is a human?), and the rightmost number is how many people are close to them.
Advisors:
Professor Jorge Ortiz, Rutgers University
Tahiya Chowdhury, Rutgers University
Team:
Justin Ding, Rutgers University
Taqiya Ehsan, Rutgers University
Maya Shankar, University of Toronto
Aryan Doshi, Rutgers University
Ansh Bhatti, Middlesex County Academy
Sonia Batheja, Hunterdon Central Regional HS


Test that checks location resolving mechanics for TimerInstall TimerRemove and FunctionCall events with scriptId.
It expects two FunctionCall for InjectedScript, two TimerInstall events, two FunctionCall events and one TimerRemove event to be logged with performActions.js script name and some line number.


101th Anniversary of Armistice Day Commemorated in France and UK - Video
France and the UK as well as other European cities are hosting a series of events marking the landmark November 1918 ceasefire that brought an end to the then-unrivalled carnage of World War One; the end of the war was formalised the following year by the Treaty of Versailles.
Various events are being held on 11 November in France and the United Kingdom to commemorate Armistice Day.
World War I was fought across three continents, Europe, Asia and Africa, making 'The Great War' the largest and bloodiest conflicts ever witnessed human history. Out of the 70 million men who were mobilised, 9.5 million were killed or died of their injuries, more than 20 million were wounded and 3.5 million incapacitated.
Adding to the tragedy was the Spanish influenza pandemic of 1918, which was spread in the harsh conditions of the trenches and eventually infected over 500 million people, over a quarter of the world's population at the time. The super-flu left between 50 and 100 million people dead.
Follow Sputnik feed to find out more.


FRDControllerManager
public class FRDControllerManager: NSObject
FRDControllerManager is a way to manage view controllers and invoke view controllers from a URL or class name.
-
Singleton instance of FRDControllerManager
Declaration
Swift
public static let sharedInstance = FRDControllerManager()
-
Registers a url for calling handler blocks.
Declaration
Swift
@discardableResult public func register(url: URL, clazz: AnyClass) -> Bool
Parameters
url
The url to be registered.
clazz
The clazz to be registered, and the clazz’s view controller object will be launched while routed.
Return Value
True if it registers successfully.
-
Registers with a plist file.
Declaration
Swift
public func registers(plistFile: String) -> Bool
Parameters
plistFile
The plistFile path.
Return Value
True if it registers successfully.
-
Launch a view controller from source view controller with a intent.
Declaration
Swift
public func startController(source: UIViewController, intent: FRDIntent)
Parameters
source
The source view controller.
intent
The intent for launch a new view controller.
-
Launch a view controller for which you would like a result when it finished. When this view controller exits, your onControllerResult() method will be called with the given requestCode.
Declaration
Swift
public func startControllerForResult(source: UIViewController, intent: FRDIntent, requestCode: Int)
Parameters
source
The source view controller.
intent
The intent for start new view controller.
requestCode
this code will be returned in onControllerResult() when the view controller exits.


| parse_expr {rlang} | R Documentation |
These functions parse and transform text into R expressions. This is the first step to interpret or evaluate a piece of R code written by a programmer.
parse_expr()
returns one expression. If the text contains more
than one expression (separated by semicolons or new lines), an
error is issued. On the other hand parse_exprs()
can handle
multiple expressions. It always returns a list of expressions
(compare to base::parse()
which returns a base::expression
vector). All functions also support R connections.
parse_quo()
and parse_quos()
are variants that create a
quosure that inherits from the global environment by
default. This is appropriate when you're parsing external user
input to be evaluated in user context (rather than the private
contexts of your functions).
Unlike quosures created with enquo()
, enquos()
, or {{
, a
parsed quosure never contains injected quosures. It is thus safe
to evaluate them with eval()
instead of eval_tidy()
, though
the latter is more convenient as you don't need to extract expr
and env
.
parse_expr(x) parse_exprs(x) parse_quo(x, env = global_env()) parse_quos(x, env = global_env())
x |
Text containing expressions to parse_expr for
|
env |
The environment for the quosures. The global environment (the default) may be the right choice when you are parsing external user inputs. You might also want to evaluate the R code in an isolated context (perhaps a child of the global environment or of the base environment). |
parse_expr()
returns an expression,
parse_exprs()
returns a list of expressions. Note that for the
plural variants the length of the output may be greater than the
length of the input. This would happen is one of the strings
contain several expressions (such as "foo; bar"
). The names of
x
are preserved (and recycled in case of multiple expressions).
The _quo
suffixed variants return quosures.
# parse_expr() can parse any R expression: parse_expr("mtcars %>% dplyr::mutate(cyl_prime = cyl / sd(cyl))") # A string can contain several expressions separated by ; or \n parse_exprs("NULL; list()\n foo(bar)") # Use names to figure out which input produced an expression: parse_exprs(c(foo = "1; 2", bar = "3")) # You can also parse source files by passing a R connection. Let's # create a file containing R code: path <- tempfile("my-file.R") cat("1; 2; mtcars", file = path) # We can now parse it by supplying a connection: parse_exprs(file(path))


Uploading DASH PDMs
Current implementation in Uploader
Windows: node-powershell
- There are many varieties of PowerShell that can be installed
- Separate code path to MacOS
- Doesn't work in browser
MacOS: node-mtp
- Our own JS wrapper around libmtp library written in C
- libmtp is known to be buggy
- Doesn't work in browser


Online Examination
ONLINE TEST SERIES
GATE,ESE/IES,ISRO,CIL,BSNL,IBPS CLERK,IBPS PO,SBI CLERK,IBPS RRB,SBI PO,LIC AAO,SSC CGL,RAILWAY,IAS PRELIMS
SIGN UP
SIGN IN


v09-tab07_Sample-Size.Rmd
The Sample Size tab allows users to create simulated datasets built from their real data, and to perform power calculations to help guide future experimental designs. The subsampler will display summary statistics for number of detected genes, number of significantly differentially expressed genes, and minimum detectable effect sizes for simulated datasets of varying design.
In the ‘Sequencing Depth’ tab, you can see how the statistical power of simulated experiments changes as the number of sequencing reads is changed. You can specify the minimum and maximum number of reads to simulate, select whether those parameters are total reads per experiment or reads per cell (default is total reads/experiment), and choose a condition for differential expression assesment from your sample annotations. The chosen condition for differential expression should be a discrete variable. For expediency, differential expression is performed using either a t-test if exactly two groups are detected for the chosen condition, or an ANOVA if more than two groups are detected. The toolkit will only run the simulations once you click the ‘Run Subsampler’ button.
Simulated datasets will not be permanently saved. Instead, summary statistics will be saved for each simulation, and plotted in the “Genes Detected”, “Minimum Detectable Effect Size”, and “Number of Diffex Genes” tabs. Solid lines represent median values at each simulated sequencing depth, wile dotted lines represent the upper and lower quartiles.
In the ‘Number of Cells’ tab, you can see how the statistical power of simulated experiments changes as the number of cells is changed while keeping the total number of reads for the experiment constant. You can specify the minimum and maximum number of cells to simulate, specify how many total reads each simulated counts matrix should have, and choose a condition for differential expression assesment from your sample annotations. The chosen condition for differential expression should be a discrete variable. For expediency, differential expression is performed using either a t-test if exactly two groups are detected for the chosen condition, or an ANOVA if more than two groups are detected. The toolkit will only run the simulations once you click the ‘Run Subsampler’ button.
Simulated datasets will not be permanently saved. Instead, summary statistics will be saved for each simulation, and plotted in the “Genes Detected”, “Minimum Detectable Effect Size”, and “Number of Diffex Genes” tabs. Solid lines represent median values at each simulated sequencing depth, wile dotted lines represent the upper and lower quartiles.
In the ‘Snapshot’ tab, you can simultaneously specify both the number of cells and the total number of reads to be produced in each simulated experiment. Rather than giving you an impression of how statistical power would be affected by a variable experimental design, this tab shows a more detailed assessment of a single proposed design.
In the snapshot plot, we show a scatterplot of all genes detected in your input dataset. The x-axis represents the empirical cohen’s-d effect size for genes; cohen’s-d is defined as the mean expression level for a gene in condition A minus the mean expression level in condition B, divided by the pooled standard deviation in expression of that gene across all cells. If your chosen condition of interest has more than two groups, the largest two groups will be compared. The y-axis shows the portion of simulated datasets in which a gene was found to be significantly differentially expressed between groups. This should be interpreted as an estimate of statistical power.
## R version 3.6.0 (2019-04-26)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Mojave 10.14.4
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] BiocStyle_2.12.0
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.1 rstudioapi_0.10 knitr_1.22
## [4] xml2_1.2.0 magrittr_1.5 roxygen2_6.1.1
## [7] MASS_7.3-51.4 R6_2.4.0 rlang_0.3.4
## [10] stringr_1.4.0 tools_3.6.0 xfun_0.6
## [13] htmltools_0.3.6 commonmark_1.7 yaml_2.2.0
## [16] digest_0.6.18 assertthat_0.2.1 rprojroot_1.3-2
## [19] bookdown_0.9 pkgdown_1.3.0 crayon_1.3.4
## [22] BiocManager_1.30.4 fs_1.3.0 memoise_1.1.0
## [25] evaluate_0.13 rmarkdown_1.12 stringi_1.4.3
## [28] compiler_3.6.0 desc_1.2.0 backports_1.1.4


--- layout: post title: "Day 28 - Bar Brothers Workout" subtitle: "The weight loss from yesterday is 0.700kg which is excellent but unfortunately not enough, I have to reach 93 pounds this week, tonight I will probably go for a walk and walk on the climb." date: 2019-11-18 background: '/img/posts/intro-barbrothers.png' ---
So today I started with a breakfast that consisted of whole wheat bread, tuna, two eggs, and tahini, I must note that the tahini was salty to my taste, however I took a big salad today, prepared chicken breast, and of course peas and carrots, I continue to drink lots of tea during the day
Going out for a walk in the evening was not easy, it was pretty cold, I went out with a long pants and a short shirt to keep my body warm, after I went back I headed for a not very small hill, and walked upstairs, went home and did some stress on the bar
As you can see I am going down fairly uniformly, my problem is weekends, another problem I have is that I am going down very slowly to my many hundreds of workouts, I have to deal with it, in my opinion eating more during the day can help.
Bar Brothers training included a lot of cardio, with my biggest goal being to sweat in a crazy amount, that is how I feel about doing something, after which I ate tuna with eggs again, and I had an evening.
Good night.


Date Day Selector Task
The date day selector task displays an Options tab containing a combo box. The choices in the combobox are:
- Select date - a date selector appears
- Today
- Tomorrow
- Yesterday
- Current data of last year
- Current day of next year
- Current day of last month
- Current day of next month
- N days ago - an input field prompts for an integer
- N days from now - an input field prompts for an integer
When a selection made and values are specified in any dependent controls the following macro variables are created and set as follows:
- dataday - the date selected or a function that calculates the value of the selection, formatted as DDMMMYYYY
- dateday_rel - a code that represents the selection made
- dateday_label - the common name of the selection
An example of the code generated by this task when "N days from now" is selected and a value of 9 is specified for "Number of days":
%global dateday;
%global dateday_rel;
%global dateday_label;
%let dateday = %sysfunc(intnx(Day, %sysfunc(date()), +9, s), DATE9.);
%let dateday_label = 9 days from now;
%let dateday_rel = D9D;
%put _GLOBAL_;
The macro variable values set by this example code are as follows if today is March 21, 2017:
GLOBAL DATEDAY 30MAR2017
GLOBAL DATEDAY_LABEL 9 days from now
GLOBAL DATEDAY_REL D9D


About Me
To start things off, I will be giving a little splurge about myself on this page. My name is Omar Chinchilla, and I live in Fresno,CA. I have two sisters, one that's older and one that is younger. So that makes me a middle child, YAY.
I graduated high school in 2014 and am now pursuing a new career path at FCC. My favorite food is Mexican(Big burritos and Tortas). I am also a MCU fan. RIP Tony Stark.
I was born on December 1st 1996 in Ventura California. I moved here when I was three in august of 2000. My parents have been married for almost 25 years and they are both from Guatemala. They met in Ventura and got married shortly thereafter. Most of they're family lives in different parts of Guatemala, and we haven't been back there since the summer of 2007.
My trip to Guatemala
That trip to Guatemala was really fun. I remeber being embraced by my grandparents, both my mom and dad's sides, constantly. We traveled to meet different family members each day, if they were close by. I fthere was more traveling required, then we would wait a few days. We stayed there a total of 8 weeks, and when it was finally time to leave I didn't want to. I was heartbroken. Primarily because of the family members we left behind, but also because of the 4 story house we apparently own there. That's crazy.
Conclusion
I hope that this little info of my life helps give you a starting point for my webpage. I hope that you learn a little more about me as you look through my website. It was fun reminiscing on some of these items. Have fun!


Check out cool stuff on next page
For my independent project, I am going to work on Brilliant courses, and hopefully give a teachback on what I've learned. First I am going to start with Logic courses 1, 2 and then Joy of Problem solving. I think that these will be useful for coding, helping me look at programming more logically, and giving myself the courage to problem solve when hit with a road block. I will take that knowledge into actual programming courses such as, Computer Science Fundamentals, Algorithm Fundamentals and Programming with Python. If complete all of these and have time for a second project, I would like to learn website design. Will add more details when I come closer to it.
Thats It!
Although I was unsure of where to start in the beginning, these brilliant courses have been incredible for me to expand my understanding of logic, and help me know that even when I can't figure something out, or something seems impossible, there is always a solution and a way to get there. My project has consisted of Logic course 1 on Brilliant. I have documented my progress through demonstated understanding of logic in the teachback presentation and by posting certain logic problems on my website that I found very interesting.
Although I belive that I applied a lot of effort to my project, I had some set backs when I was unable to access my brilliant account. As of now I am 1/3 done with the first logic course, and although it doesn't sound like much, it is a very long course and a lot of the problems like the Futoshiki one that I have shown above, can take me up to fourty minutes for a single problem which is why I am still so impressed that Mr. Golanka got it in less than 5.) , and even just 1 lesson(there are 38 lesson) can consist of 10-15 problems. I am working my way through it and would like to finish soon so I can start on actual programming.
The difficulty of my project I believe would range from a 6-7. Although the problems that I face in the course are quite challenging, I have not dived into any real programming besides for building this website. By the end of the year I want to be able to have java script code on one of my pages and figure out a path I want to take for possibly bridge, over the summer and college. This has been a great opportunity for me to expand my understanding of all types of programming and how many paths there are to take when wanting to learn code.
I am going to continue with the Brilliant logic course and try to finish it up quickly. When I'm done I will either begin work on Unity or Website design.


about
My name is Aaron Lebo. I am from Dallas, Texas. I've been doing computer programming in a number of languages since 2005, and have a PhD in political science at the University of Texas at Dallas. I'm fascinated by the ability of information and communication to change the world for the better.
I own a red-nosed pitbull named Teddy Roosevelt.
Please check out comprop:
Computational Propaganda on reddit.com (2013-2022).
blog posts
{% for post in site.posts %}
- {{ post.date | date_to_string }} » {{ post.title }}
{% endfor %}
other media
highlighted open source projects
- comanche: a 3d WebGL engine
- prose: a simple language inspired by Io and Ioke that compiles to Clojure and ClojureScript
- dissent: Implementation of a decentralized, transferable, and open software license system using the Bitcoin protocol
- updn: Reddit-alike where submissions and voting use Bitcoin
- TwoRavens: A web application for data exploration, statistical analysis, model construction and meta analysis tools, that integrates with Zelig and Dataverse


Hitler house to become police station
The house where Adolf Hitler was born will be turned into a police station, Austria's interior minister says, after years of debate over how best to prevent it becoming a pilgrimage site for neo-Nazis.
Having recently carried out a compulsory purchase of the house in Braunau am Inn, a town on the border with Germany, Austria will invite architects to submit plans for a redesign of the building. It will house the local police force's offices, the Interior Ministry said in a statement on Tuesday.
"The house's future use by the police should send an unmistakable signal that this building will never again evoke the memory of National Socialism," Interior Minister Wolfgang Peschorn, who serves in a provisional government of civil servants, said.
Architects from across the European Union will be invited to submit plans for the building's redesign this month and a jury of experts and public officials will pick the winning design in the first half of next year, the Interior Ministry said.
Although Hitler was born in Braunau in 1889, Austria argued for decades that it was the first victim of National Socialism, having been annexed by Hitler's Germany in 1938.
Recent governments have, however, recognised that Austrians were also perpetrators of Nazi crimes and that there was little resistance to Hitler's rule.


Atomic Tests
- Test Units: Each input that has specific data requirements
- Unit Score: For each test unit, complete each of the following tests and sum the test credits to get the score
Test that instructions are persistent
Test Procedure
- Check that instructions for input data requirements are available on the page or view
- Check that the instructions are persistent
Expected Results
All checks are true. Credit: 1
Test that instructions are adjacent to inputs
Test Procedure
- Check that instructions for input data requirements are available on the page or view
- Check that the instructions are adjacent to the input
Expected Results
All checks are true. Credit: 1
Test that instructions are predictably located
Test Procedure
- Check that instructions for input data requirements are available on the page or view
- Check that instructions display in a standard location
Expected Results
All checks are true. Credit: 1
Test that instructions are programmatically defined and associated
Test Procedure
- Check that instructions for input data requirements are available on the page or view
- Check that instructions are programmatically defined and associated with the input
Expected Results
All checks are true. Credit: 1
Scoring
Score: Percentage of inputs with specific data requirements on a page, screen, or view that have persistent instructions that are adjacent to inputs, predictably located, and programmatically defined and associated.
- Calculate the total possible credits (total test units x total tests)
- Calculate the total credits (sum of test unit scores)
- Express total credits as a percentage of total possible credits (total credits / total possible credits)
The following example shows scoring for a page that has two inputs with specific data requirements.
| Data | Score |
|---|---|
| Date of birth input | 3 |
| Credit card number input | 2 |
| Total credits | 5 |
| Total possible credits | 8 (2 inputs x 4 tests) |
| Score | 62.5% |
Holistic Tests
To be developed.


--- title: Home description: Just Writing! ---
/* C */ printf("No tagline! Just writing!\n"); // C++ std::cout << "No tagline! Just writing!" << std::endl; ; Common Lisp (format t "No tagline! Just writing!~%")
read more...


VIDEO
Watch: A voice for Xinjiang detainees
by Scilla AlecciZumrat Dawut, a Uighur woman who said she spent three months in a detention camp, has spoken out about her experience in China’s internment camps in Xinjiang.
“I am now in a free world,” she told us. But others, including her family, remain inside the camps despite having committed no crime. “They do not have a voice. They cannot speak… So now I have the chance. And I choose to be their voice.”


pythainlp.ulmfit¶
The ulmfit.utils
is utils for ULMFit model.
Modules¶
-
pythainlp.ulmfit.utils.
get_texts
(df)[source]¶ Meth: get_texts get tuple of tokenized texts and labels Parameters: df (pandas.DataFrame) – pandas.DataFrame with label as first column and text as second column Returns: - tok - lists of tokenized texts with beginning-of-sentence tag xbos as first element of each list
- labels - list of labels
-
pythainlp.ulmfit.utils.
get_all
(df)[source]¶ Meth: get_all iterate get_texts for all the entire pandas.DataFrame Parameters: df (pandas.DataFrame) – pandas.DataFrame with label as first column and text as second column Returns: - tok - lists of tokenized texts with beginning-of-sentence tag xbos as first element of each list
- labels - list of labels
-
pythainlp.ulmfit.utils.
numericalizer
(df, itos=None, max_vocab=60000, min_freq=2, pad_tok='_pad_', unk_tok='_unk_')[source]¶ Meth: numericalize numericalize tokenized texts for: * tokens with word frequency more than min_freq * at maximum vocab size of max_vocab * add unknown token _unk_ and padding token _pad_ in first and second position * use integer-to-string list itos if avaiable e.g. [‘_unk_’, ‘_pad_’,’first_word’,’second_word’,…]
Parameters: - df (pandas.DataFrame) – pandas.DataFrame with label as first column and text as second column
- itos (list) – integer-to-string list
- max_vocab (int) – maximum number of vocabulary (default 60000)
- min_freq (int) – minimum word frequency to be included (default 2)
- pad_tok (str) – padding token
- unk_token (str) – unknown token
Returns: - lm - numpy.array of numericalized texts
- tok - lists of tokenized texts with beginning-of-sentence tag xbos as first element of each list
- labels - list of labels
- itos - integer-to-string list e.g. [‘_unk_’, ‘_pad_’,’first_word’,’second_word’,…]
- stoi - string-to-integer dict e.g. {‘_unk_’:0, ‘_pad_’:1,’first_word’:2,’second_word’:3,…}
- freq - collections.Counter for word frequency
-
pythainlp.ulmfit.utils.
merge_wgts
(em_sz, wgts, itos_pre, itos_cls)[source]¶ Parameters: - df (pandas.DataFrame) – pandas.DataFrame with label as first column and text as second column
- em_sz (int) – size of embedding vectors (pretrained model is at 300)
- wgts – saved pyTorch weights of pretrained model
- itos_pre (list) – integer-to-string list of pretrained model
- itos_cls (list) – integer-to-string list of current dataset
Returns: merged weights of the model for current dataset
-
pythainlp.ulmfit.utils.
document_vector
(ss, m, stoi, tok_engine='newmm')[source]¶ Meth: document_vector get document vector using pretrained ULMFit model
Parameters: Returns: numpy.array of document vector sized 300
-
class
pythainlp.ulmfit.utils.
ThaiTokenizer
(engine='newmm')[source]¶ -
static
proc_all
(ss)[source]¶ Meth: proc_all runs proc_text for multiple sentences Parameters: text (str) – text to process Returns: processed and tokenized text
-
static
proc_all_mp
(ss)[source]¶ Meth: proc_all runs proc_text for multiple sentences using multiple cpus Parameters: text (str) – text to process Returns: processed and tokenized text
-
proc_text
(text)[source]¶ Meth: proc_text procss and tokenize text removing repetitions, special characters, double spaces Parameters: text (str) – text to process Returns: processed and tokenized text
-
static
replace_rep
(text)[source]¶ replace_rep()
replace 3 or above repetitive characters with tkrep :param str text: text to process :return: processed text where repetitions are replaced by tkrep followed by number of repetitions Example:>>> from pythainlp.ulmfit.utils import ThaiTokenizer >>> tt = ThaiTokenizer() >>> tt.replace_rep('คือดียยยยยย') คือดีtkrep6ย
-
static


flappi
Flexible API builder gem for Rails
Flappi allows Rails APIs to be defined using a simple DSL that avoids repeated and fragmented code and allows the API definition to reflect the request/response structure. Support is provided for versioning (semantic with the addition of 'flavours') and documentation (using apiDoc).
Interface documentation is here
Quickstart with Rails (4-6)
Add to Gemfile:
gem 'flappi', git: 'git@github.com:sharesight/flappi.git'
Bundle install:
bundle install
Create your initialization file, e.g. in 'initializers/flappi.rb'
Flappi.configure do |conf|
conf.definition_paths = { 'default' => 'api_definitions' } # Normally under your controller path
end
Create a controller and route, e.g in 'controllers/adders_controller':
class AddersController < ApplicationController
def show
Flappi.build_and_respond(self)
end
end
and in 'config/routes.rb':
resource :adder
Flappi (currently) users the regular Rails routing and controller framework, so this is much as for an ordinary controller.
(If you try the endpoint http://localhost:3000/adder now, you should get an error like: 'Endpoint Adders is not defined to API Builder')
Now define the endpoint using the Flappi DSL. In 'controllers/api_definitions/adders.rb':
module ApiDefinitions
module Adders
include Flappi::Definition
def endpoint
title 'Add numbers'
http_method 'GET'
path '/adder'
# We define two query parameters, 'a' is required
param :a, type: Integer, optional: false
param :b, type: Integer
# IRL, this would probably query your ActiveRecord model, reporting engine
# or other artefact to get a returned record - we just add two numbers together
# the result of this is the context for the response
query do |params|
{result: params[:a].to_i + (params[:b].try(:to_i) || 0) }
end
end
# Build a record with the one result field
# Notice how just specifying a name is enough to access the value
def respond
build do
field :result, type: Integer
end
end
end
end
Now, if you access: http://localhost:3000/adder.json?a=4 you should see the result:
{
"result": 4
}
and similarly http://localhost:3000/adder.json?a=4&b=22 (etc)


Are the spores brown?
Yes
No
Help, I'm not sure!
Are the spores white, pinkish, yellow or lilac tinged?
Yes
No
Help, I'm not sure!
Are the mature gills pale or brightly colored?
Yes
No
Help, I'm not sure!
You may have found an Agaricus.
View Agaricus
Start Over


Kyle I S Harrington /<EMAIL_ADDRESS>Some slides adapted from K. Harrington's CS-135 Machine Learning course at Tufts University.
|
Class: Play tennis? Attributes:
|
Nodes are attributes
Branches are values of attributes
Leafs are classes
How do we choose the best attribute?
Which is better A1 or A2?
Entropy describes how unpredictable information is.
|
$Entropy(S)$ is the expected number of bits needed to encode a class of a randomly drawn member of the sample set (under the optimal, shortest-length code)
An optimal length code uses $-log_2 p$ bits to encode a message of probability p
i.e. if $p=0.01$, then the optimal code length is $6.64$
and if $p=0.99$, then the optimal code length is $0.01$
Recall that our sample set $S$ has $p_\oplus$ and $p_\ominus$ proportions of $\oplus$ and $\ominus$ classes
Hence, to encode a random member of $S$, weigh the probability of drawing a member of the class by the optimal length code of the class:
$p_\oplus (-log_2 p_\oplus) + p_\ominus ( -log_2 p_\ominus )$
$Entropy(S) \equiv -p_\oplus log_2 p_\oplus - p_\ominus log_2 p_\ominus$
How can we use entropy in this decision?
$Gain(S,A)$ is the expected reduction in entropy by sorting on attribute $A$
$Gain(S,A) \equiv Entropy(S) - \displaystyle \sum_{v \in Values(A)} \frac{|S_v|}{|S|} Entropy(S_v)$
|
|
|
|
ID3 Algorithm: grow decision tree using information gain
For any given training set
Is it always possible to build a tree?
If so, will it be a good tree?
Only 1 hypothesis (decision tree)
If an early split goes wrong, we're stuck with it!
Uses class statistics, robust to noise
Inductive bias of ID3: tends to prefer shorter trees
Favors shorter trees/more information gain closer to the root
The bias arises from the search, not the search space
Occam's razor: the simplest hypothesis that fits is the best one
Let's describe the error of a hypothesis $h$ as $error(h)$
Now consider specific error measurements:
Hypothesis $h$ overfits if:
$error_S(h) < error_S(h')$
and
$error_D(h) > error_D(h')$
Not enough examples on some attributes
Noisy data
Stop growing when a new split isn't statistically significant
Grow and prune post-hoc
Limitations?
The input to a ML algorithm/model is composed features (aka attributes)
The output is a class or a value
Can we just take tons of measurements, feed them into our ML algorithm, and start making predictions?
What can we do about this?
Our dataset $D$ has $N$ dimensions, for $N$ features
Instance transformations reduce the number of dimensions by transforming the features themselves
If we had a dataset with red, green, blue, and yellow features (N=4),
Then we might transform the dataset to $( red - green ) / (red + green)$ and $ (blue-yellow) / (blue + yellow)$
Principle component analysis (PCA) maps from one set of axes to orthogonal axes
Roughly speaking, project onto the axes of highest variation
Eigenface reduces faces to low-dimensional space
| Bases | Generated faces |
Filter irrelevant features based upon the dataset
Ranking features based upon correlation between feature and class
$Rank(f) = \frac{ E[( X_f - \mu_{X_f} ) ( Y - \mu_Y ) ] }{ \sigma_{X_f} \sigma_Y }$
where $f$ is the feature of interest, and $Y$ is the class
Mutual information between a feature and class
$Rank(f) = \displaystyle \sum_{X_f} \displaystyle \sum_Y p(X_f,Y) log \frac{ p(X_f,Y) }{ p(X_f) p(Y) }$
where $f$ is the feature of interest, and $Y$ is the class
What issues could there be?
How necessary is this?
Issues:
What is appealing about this?
Advantages of using validation sets
Features are tailored to ML algorithm
Considers different ways of combining features
Start with subsets of only 1 feature
Grow subset of features by adding 1 new feature per iteration
Start with the full set of features
Eliminate 1 feature per iteration
Exhaustive search (consider all subsets)
Alternative AI methods (simulated annealing, genetic algorithms, ...)
Feature subset search is NP-hard
Filtering: 1-step process, considers features independently
Wrapper: iterates through subsets of features, selects subset that matches ML algorithm
Scale the values into the range $[0,1]$
$x \leftarrow \frac{ x - x_{min} }{ x_{max} - x_{min} }$
Scale based on training set only
Scale the distribution to have mean=0 and std=1
$x \leftarrow \frac{ x - \mu_X }{ \sigma_X }$
Scale based on training set only
Some algorithms only work on discrete features
We may need to discretize real-valued features
Calculate the histogram
This divides the values into bins
Alternatively, use a heuristic/ad-hoc method to discretize in a useful way
E.G. Build a decision tree, let the DT algorithm discretize, and use the split values of the optimized tree
Some features are unordered (i.e. Browsers = [ Firefox, Chrome, Safari ])
Most common approach is to use unit vectors:
| Firefox | Chrome | Safari |
| 1 | 0 | 0 |
| 0 | 1 | 0 |
| 0 | 0 | 1 |
2 players, 19 by 19 board
$10^{761}$ possible games (# chess games $\leq 40$ moves $\approx 10^{43}$)
Goal: encircle opponent's pieces to claim territory
Uses convolutional neural networks for processing/representing the game
Trained with expert data and self-play using reinforcement learning
Day 2 of competition - start
What are the machine learning questions in gameplay?
What are the machine learning questions in gameplay?
Game AI and reinforcement learning use an agent-centric terminology
In 2 player, zero-sum games both players want to win
From some state of the game, we can predict a sequence of alternating actions where
Image from Maschelos at English Wikipedia
MCTS is a randomized algorithm to sample possible outcomes
Idea: Simulate game play from a relevant board state and store outcome. Do this many times.
But what if the game tree is huge?
There are about $10^{761}$ possible paths in the Go game tree
A Go board is basically an image (2D pixels with value: empty/black/white)
Input neurons in CNNs have "receptive fields" that cover patches of an input
Image from UFLDL, Stanford
Convolution is the process of taking a kernel, sliding it over an input image, and taking an innner product
Image from UFLDL, Stanford
Pooling is an aggregation over a pool of units/neurons
Image from UFLDL, Stanford
Generalized logistic function, to squash K-dimensional values
Choose action $a$ with probability:
$\frac{e^{Q_t(a) / \tau}}{\sum^K_{b=1} e^{Q_t(b)/ \tau}}$
where $Q_t(a)$ is the value of action $a$ at time $t$
Normal neural network training methods apply
Image from Silver et al, 2016
Agent transitions through states by making actions, while receiving rewards
Image from the RL book by Sutton and Barto
In RL, agents attempt to maximize reward obtained in the long-term
Rewards can be described as a summed sequence:
$R_t = r_{t} + r_{t+1} + r_{t+2} + ... + r_{T}$
The core of most RL algorithms is to estimate a value function:
$V^{\pi} (s) = E_{\pi} \{ R_t | s_t = s \}$
Learning the value function $V^{\pi}$ is accomplished by trial-and-error and reinforcement via reward signal
Dynamic programming is used to do this
We'll cover specifics in the RL lectures


Bootstrap's responsive grid comes in 4 sizes or "breakpoints": tiny (xs), small(sm), medium(md) and large(lg). These 4 grid sizes enable you create responsive layouts that behave accordingly on different devices.
Learn MoreYour site looks good everywhere
Easy to theme and customize with SASS
A mature, well-tested, stable codebase
What could be easier? Get started fast with this landing page starter theme.

There's good reason why Bootstrap is the most used frontend framework in the world.
Bootstrap is matured and well-tested. It's a stable codebase that provides consistency.
We love feedback. Fill out the form below and we'll get back to you as soon as possible.


Teacher union to sue Quebec on religious symbols ban
GATINEAU, Quebec (AP) - A union federation representing 45,000 teachers in Quebec is suing the Canadian province over its ban on the wearing of religious symbols by many public employees.
The lawsuit by the Fédération Autonome de l'Enseignement challenges a state secularism law passed this year that prohibits some civil servants from wearing symbols of religion, such as hijabs and crosses, while at work.
The most contentious rule is that any new police officers, judges, lawyers and teachers are banned completely from wearing any religious symbols while on duty. Existing employees get an exception.
A student studying to become a teacher and Montreal's English school board are among those who have also filed lawsuits.
Nour Farhat, who wears a hijab and studied law to become a prosecutor, is among those affected by the law.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.


fun regEx(patternString: String, word: String): String
regular expression search
patternString - : the regular expression pattern
patternString
word - : the word that will be searched in
word
Return a string value of what was found


CLIENT EXPOSURE
Eunice Colmon is called upon for her organizational behavior expertise and dynamic presentation style by government agencies,
non-profits, educational institutions, and corporations across a broad spectrum of industries, including financial services,
technology, telecommunications, healthcare, insurance, logistics, and manufacturing.
Corporate
- Merrill Lynch
- Wakefern
- DuPont
- AT&T
- Toys R Us
- IBM
- SWK Technologies
- Janssen Pharmaceutical
- Aventis
- Quest Diagnostics
- St. Barnabas Hospital
- Chubb Insurance
- Almetek Industries
- Bombardier
- Lee Hecht Harrison
- Bulbrite Industries
- Mack Boring & Parts Co.
- Kuehne & Nagel
- Cartridge Actuated Devices
- MJHS Foundation
- Marsh and McLennan
Government
- State Of New Jersey
- Newark Housing Authority
- County of Somerset
- Salem County, NJ
- DOHMH-City of New York
- EPA-Cincinnati
- National Transit Institute
- USDA, The Graduate School
Non-Profit/Educational Institutions
- InterAgency Council on Developmental Disabilities
- American Cancer Society
- YMCA of Ridgewood
- Integrity House
- LADACIN Network
- United Methodist Communities
- John A. Hartfort Foundation
- Fairleigh Dickinson University
- Rutgers University School of Social Work
- Rutgers University Government Services
- Seth Boyden
- Catonsville Community
- Catholic Charities
- Lower East Service
- North Hudson Community Act Corp
Conferences
- Sino-American Pharmaceutical Professionals Association, Princeton University, NJ
- Merrill Lynch Affinity Best Practices, Hopewell, NJ
- Lower East Service Center, New York, NY
- Federally Employed Women National Annual Training, Anaheim, CA and Washington D. C.
- Residential Seminar for the Administrative Professional, Ocean City, MD
- NJ Annual Public Purchasing Conference, Atlantic City, NJ
- MD Education Opportunity, Baltimore, MD
Eunice enjoys every opportunity to help organizations develop competent, reliable managers and powerhouse teams driven by
vision, mission, and purpose. She looks forward to continuing her trusted partnerships and sparking new collaborations focused
on inspiration and excellence.


You need a browser that supports the HTML5 canvas element to view this.
Amount of nodes:
(recommend < 10000)
( Move every
milliseconds )
Process
Clear


| get_eurocordex_stations_indices | R Documentation |
We have a data.frame with station information and want to know, in which model grid cell boxes these stations are located.
get_eurocordex_stations_indices(file, stations, var_lon = "lon", var_lat = "lat", col_lon = "lon", col_lat = "lat")
file |
path (directory and name) of a netCDF file, in which den model grid is defined |
stations |
data.frame containing the stations information as columns station_name, lon, and lat |
var_lon |
character, optional: name of the longitude variable in file |
var_lat |
character, optional: name of the latitude variable in file |
col_lon |
character, optional: name of the longitude column in stations |
col_lat |
character, optional: name of the latitude column in stations |
data.frame containing the stations information as columns station_name, idx_lon, and idx_lat; if the stations are not on the model grid, idx_lon and idx_lat of the nearest grid cell are provided
## EXAMPLE 1: # construct data: stations <- data.frame(c('abc', 'def', 'ghi', 'jkl'), c(10.31, 11.12, 9.2, 9.31), c(55.19, 54.77, 55.02, 53.2), c(44, 1, 5, 107), stringsAsFactors = FALSE) names(stations) <- c('station_name', 'lon', 'lat', 'elev') # we need to have some file with EURO-CORDEX data somewhere. file = './tasmin_EUR-11_ICHEC-EC-EARTH_rcp26_r12i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20101231.nc' # call the function idx_stations <- get_eurocordex_stations_indices(file, stations) print(idx_stations) # station_name idx_lon idx_lat # 1 abc 219 256 # 2 def 223 252 # 3 ghi 213 255 # 4 jkl 212 239 ## EXAMPLE 2: ## If we have different column names in the stations data.frame # construct data: stations <- data.frame(c('abc', 'def', 'ghi', 'jkl'), c(10.31, 11.12, 9.2, 9.31), c(55.19, 54.77, 55.02, 53.2), c(44, 1, 5, 107), stringsAsFactors = FALSE) names(stations) <- c('station_name', 'long', 'lati', 'elev') # we need to have some file with EURO-CORDEX data somewhere. file = './tasmin_EUR-11_ICHEC-EC-EARTH_rcp26_r12i1p1_CLMcom-CCLM4-8-17_v1_day_20060101-20101231.nc' # call the function idx_stations <- get_eurocordex_stations_indices(file, stations, col_lon = 'long', col_lat = 'lati') print(idx_stations) # station_name idx_lon idx_lat # 1 abc 219 256 # 2 def 223 252 # 3 ghi 213 255 # 4 jkl 212 239 # Used by `read_eurocordex_data`. Please look into that function's code for further usage examples.


public class KeyEvent extends Event<KeyListener>
Event.Type<H>
| Modifier and Type | Field and Description |
|---|---|
static int |
ACTION_KEY_PRESS
The event type for a focus being transfered to this control
with the ENTER or ACTION keys.
|
int |
key
The key pressed or entered by other means (grafitti input).
|
static int |
KEY_PRESS
The event type for a key press event.
|
int |
modifiers
The state of the modifier keys when the event occured.
|
static int |
SPECIAL_KEY_PRESS
The event type for a device key press event.
|
| Constructor and Description |
|---|
KeyEvent()
Constructs a KeyEvent, assigning the type as KEY_PRESS.
|
KeyEvent(int type,
int key,
int modifiers)
Creates a new instance of KeyEvent with the specified type, key and modifiers.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispatch(KeyListener listener) |
boolean |
isActionKey()
Returns true if the key press is an ACTION or ENTER one.
|
boolean |
isDownKey()
Returns true if the key press is any kind of the possible ones that means Down.
|
boolean |
isNextKey()
Returns true if the key press is any kind of the possible ones that means forward
(TAB, PAGE_DOWN, DOWN, RIGHT, etc).
|
boolean |
isPrevKey()
Returns true if the key press is any kind of the possible ones that means previous
(PAGE_UP, UP, LEFT, etc)
|
boolean |
isUpKey()
Returns true if the key press is any kind of the possible ones that means UP.
|
String |
toString() |
clearQueue, getNextAvailableEventId, isAvailable, touch
public static final int KEY_PRESS
public static final int ACTION_KEY_PRESS
public static final int SPECIAL_KEY_PRESS
public int key
SpecialKeys
public int modifiers
SpecialKeys
public KeyEvent()
public KeyEvent(int type, int key, int modifiers)
type
- the KeyEvent type, must be either KEY_PRESS
, ACTION_KEY_PRESS
or
SPECIAL_KEY_PRESS
key
- the input keymodifiers
- state of the modifier keys for this eventtotalcross.lang.IllegalArgumentException
- if the type argument is not equal to KEY_PRESS
, ACTION_KEY_PRESS
or
SPECIAL_KEY_PRESS
.KEY_PRESS
,
ACTION_KEY_PRESS
,
SPECIAL_KEY_PRESS
public boolean isActionKey()
public boolean isUpKey()
public boolean isDownKey()
public boolean isNextKey()
public boolean isPrevKey()
public String toString()
toString
in class Event<KeyListener>
public void dispatch(KeyListener listener)
dispatch
in class Event<KeyListener>


interface VideoRenderView : VideoSink
VideoRenderView is the type of VideoSink used by the VideoTileController
EglVideoRenderView |
EglVideoRenderView is a VideoRenderView which requires EGL initialization to render VideoFrameTextureBuffer buffers. The VideoTileController should automatically manage (init and release) any bound tiles, but if it is desired to use a view outside of the controller (e.g. in pre-meeting device selection), users will need to call init and release themselves interface EglVideoRenderView : VideoRenderView |


sorted_v = Vectors.sort(v); (sorted_v, indices) = Vectors.sort(v, ascending=true);
Function sort(..) sorts a Real vector v in ascending order and returns the result in sorted_v. If the optional argument "ascending" is false, the vector is sorted in descending order. In the optional second output argument the indices of the sorted vector with respect to the original vector are given, such that sorted_v = v[indices].
(v2, i2) := Vectors.sort({-1, 8, 3, 6, 2}); -> v2 = {-1, 2, 3, 6, 8} i2 = {1, 5, 3, 4, 2}
function sort extends Modelica.Icons.Function; input Complex v[:] "Vector to be sorted"; input Boolean ascending = true "= true if ascending order, otherwise descending order"; input Boolean sortFrequency = true "= true, if sorting is first for imaginary then for real value; = false, if sorting is for absolute value"; output Complex sorted_v[size(v, 1)] = v "Sorted vector"; output Integer indices[size(v, 1)] = 1:size(v, 1) "sorted_v = v[indices]"; end sort;


Lichess.org
See my studies, analyse my profile
I have been attracted to chess since I read a
book
about chess opening names, by Nathan Rose.
My studies
My profile


 DIE!!!
aside from that, well done, although it's
a very very strange website here... :)


The Visibility Project supports public education efforts which lead to interactions, conversations, and relationships between citygoers and Seattle's homeless population.