The recent state-of-the-art advancements in vehicular ad hoc networks (VANETs) have led to the emergence and rapid proliferation of the promising notion of the Internet-of-Vehicles (IoV), wherein vehicles exchange safety-critical messages with one another to ensure safe, convenient, and highly efficient traffic flows. Nevertheless, such inter-vehicular communication could not be realized until the network is completely secured as the dissemination of even a single malicious message may jeopardize the entire network. Accordingly, numerous trust models have been proposed in the research literature to ensure the identification and elimination of malicious vehicles from a network. These trust models primarily depend on the aggregation of both direct and indirect observations, and which themselves are computed depending on the diverse influential parameters pertinent to dynamic and distributed networking environments. Still, optimum weights need to be allocated to these parameters for generating accurate and intuitive trust values. Furthermore, once the trust for a target vehicle has been computed, a specific threshold value equal to the minimum acceptable trust score has been selected for identifying the malicious vehicles. Quantification of these weights and selecting of an optimal threshold poses a significant challenge in VANETs. Accordingly, this paper focuses on employing machine learning techniques as to cope with the said problems in VANETs. It thus utilizes a real IoT data set by transforming it into an IoV format and computes the feature matrix for three parameters, i.e., similarity, familiarity, and packet delivery ratio, in two different ways, (a) all of the stated parameters computed by each trustor for a trustee are treated as individual features, and (b) the mean of each single parameter computed by all of the trustors for a trustee is regarded as a collective feature. Different machine learning algorithms were employed for classifying vehicles as trustworthy and untrustworthy. Simulation results revealed that the classification via the mean parametric scores yielded much more accurate results in contrast to the one which takes into account the parametric score of each trustor for a trustee on an individual basis.