Source author record

Rui Hao

Rui Hao appears in the imported research catalog. Authorship, coauthor and topic links are available while profile ownership is still unclaimed.

ResearcherUnclaimed source record

Catalog footprint

What is connected

4works
4topics
4close collaborators

Actions

Connect this record

Log in to claim

Research graph

See the researcher in context

Open full explorer

Inspect adjacent papers, topics, institutions and collaborators without losing the researcher page.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Published work

4 published item(s)

preprint2021arXiv

PyART: Python API Recommendation in Real-Time

API recommendation in real-time is challenging for dynamic languages like Python. Many existing API recommendation techniques are highly effective, but they mainly support static languages. A few Python IDEs provide API recommendation functionalities based on type inference and training on a large corpus of Python libraries and third-party libraries. As such, they may fail to recommend or make poor recommendations when type information is missing or target APIs are project-specific. In this paper, we propose a novel approach, PyART, to recommend APIs for Python programs in real-time. It features a light-weight analysis to derives so-called optimistic data-flow, which is neither sound nor complete, but simulates the local data-flow information humans can derive. It extracts three kinds of features: data-flow, token similarity, and token co-occurrence, in the context of the program point where a recommendation is solicited. A predictive model is trained on these features using the Random Forest algorithm. Evaluation on 8 popular Python projects demonstrates that PyART can provide effective API recommendations. When historic commits can be leveraged, which is the target scenario of a state-of-the-art tool ARIREC, our average top-1 accuracy is over 50% and average top-10 accuracy over 70%, outperforming APIREC and Intellicode (i.e., the recommendation component in Visual Studio) by 28.48%-39.05% for top-1 accuracy and 24.41%-30.49% for top-10 accuracy. In other applications such as when historic comments are not available and cross-project recommendation, PyART also shows better overall performance. The time to make a recommendation is less than a second on average, satisfying the real-time requirement.

preprint2016arXiv

Studying on Opinion Evolution by Hamilton-Jacobi Equation

A physical description of an opinion evolution is conducted based on the Hamilton-Jacobi equation derived from a generalized potential and the corresponding Langevin equation. The investigation mainly focuses on the heterogeneities such as age, connection circle and overall quality of the participants involved in the opinion exchange process. The evolutionary patterns of opinion can be described by solution of the Hamilton-Jacobi equation, information entropy. The results show that the overall qualities of the participants play critical roles in forming an opinion. The higher the overall quality is, the easier the consensus can reach. The solution also demonstrates that the age and the connection circle of the agents play equally important roles in forming an opinion. The essence of the age, overall quality, and connection circle corresponds to the maturity of thought (opinion inertia), reason and intelligence, influence strength of the environment, respectively. So the information entropy distributes in the phase planes (two variable combinations out of the three---age, connection circle and overall quality) exhibit the evolution rules of an opinion.

preprint2016arXiv

Towards Understanding What Contributes to Forming an Opinion

Opinion evolution mechanism can be captured by physics modeling approaches. In this context, a kinetic equation is established by defining a generalized displace (cognitive-level), a driving force and the related generalized potential, information quantity, altitude. It has been shown that the details of opinion evolution depends the type of the driving force, self-dominated driving or environment- dominated driving. In the former case, the participants can have their altitudes changed in the process of competition between the self-driving force and environment-driving force. In the latter case, all of the participants are pulled by the environment. Some regularity behind the dynamics of opinion is also revealed, for instance, the information entropy decays with time in a special way, etc. the results may help us to get some deep understandings to formation of a public opinion.

preprint2011arXiv

Extraordinary acoustic reflection enhancement by acoustically-transparent thin plates

We report an observation of the extraordinary high reflection of acoustic waves in water by thin epoxy plates partitioned by subwavelength cuts, whereas such plates without structure are acoustically-transparent as the acoustic properties of epoxy are close to water. It is demonstrated that this exotic phenomenon results from the resonant excitation of the local modes within the individual pieces derived by the cuts. The experiment agrees well with the theory.