Coronal mass ejections (CMEs) are one of the major disturbance sources of space weather. Therefore, it is of great significance to determine whether CMEs will reach the earth. Utilizing the method of logistic regression, we first calculate and analyze the correlation coefficients of the characteristic parameters of CMEs. These parameters include central position angle, angular width, and linear velocity, which are derived from the Large Angle and Spectrometric Coronagraph (LASCO) images. We have developed a logistic regression model to predict whether a CME will reach the earth, and the model yields an F1 score of 30% and a recall of 53%. Besides, for each CME, we use the recommendation algorithm to single out the most similar historical event, which can be a reference to forecast CMEs geoeffectiveness forecasting and for comparative analysis.